the cook levin theorem
play

The Cook-Levin Theorem Matvey Soloviev (Cornell University) CS 4820, - PowerPoint PPT Presentation

The Cook-Levin Theorem Matvey Soloviev (Cornell University) CS 4820, Summer 2020 1 Today By using our formal definition of nondeterministic Turing machines, we will prove the existence of a universal polynomial time. This problem will be


  1. The Cook-Levin Theorem Matvey Soloviev (Cornell University) CS 4820, Summer 2020 1

  2. Today By using our formal definition of nondeterministic Turing machines, we will prove the existence of a universal polynomial time. This problem will be provably hard under the assumption that any problem in NP is. 2 subproblem which every problem in NP can be reduced to in

  3. Hardness from reductions, made concrete (1) Before, we talked about how a reduction from P to Q lets us infer hardness of Q from hardness of P conceptually. Let’s make a concrete instance of the statement. Proposition Suppose P is a problem for which there exists no polynomial-time algorithm, and there is a polynomial- time reduction from P to Q . Then there is no polynomial-time algorithm for Q . 3

  4. Hardness from reductions, made concrete (1) Before, we talked about how a reduction from P to Q lets us infer hardness of Q from hardness of P conceptually. Let’s make a concrete instance of the statement. Proposition Suppose P is a problem for which there exists no polynomial-time algorithm, and there is a polynomial- time reduction from P to Q . Then there is no polynomial-time algorithm for Q . 3

  5. Hardness from reductions, made concrete (1) Before, we talked about how a reduction from P to Q lets us infer hardness of Q from hardness of P conceptually. Let’s make a concrete instance of the statement. Proposition Suppose P is a problem for which there exists no polynomial-time algorithm, and there is a polynomial- time reduction from P to Q . Then there is no polynomial-time algorithm for Q . 3

  6. Hardness from reductions, made concrete (2) Proof. Suppose not, and there is in fact a polynomial-time Plug this algorithm into the reduction. By definition of a polynomial-time reduction, we obtain a correct algorithm that solves size- n instances of P in time h n g n O p f n . Since all of f , g and h are polynomials, this is again a polynomial (check this!). But then we actually do have a polynomial-time algorithm for P , contradicting the assumption. 4 algorithm for Q that runs in time O ( p ( n )) .

  7. Hardness from reductions, made concrete (2) Proof. Suppose not, and there is in fact a polynomial-time Plug this algorithm into the reduction. By definition of a polynomial-time reduction, we obtain a correct algorithm that Since all of f , g and h are polynomials, this is again a polynomial (check this!). But then we actually do have a polynomial-time algorithm for P , contradicting the assumption. 4 algorithm for Q that runs in time O ( p ( n )) . solves size- n instances of P in time h ( n ) + g ( n ) · O ( p ( f ( n ))) .

  8. Hardness from reductions, made concrete (2) Proof. Suppose not, and there is in fact a polynomial-time Plug this algorithm into the reduction. By definition of a polynomial-time reduction, we obtain a correct algorithm that Since all of f , g and h are polynomials, this is again a polynomial (check this!). But then we actually do have a polynomial-time algorithm for P , contradicting the assumption. 4 algorithm for Q that runs in time O ( p ( n )) . solves size- n instances of P in time h ( n ) + g ( n ) · O ( p ( f ( n ))) .

  9. Hardness from reductions, made concrete (2) Proof. Suppose not, and there is in fact a polynomial-time Plug this algorithm into the reduction. By definition of a polynomial-time reduction, we obtain a correct algorithm that Since all of f , g and h are polynomials, this is again a polynomial (check this!). But then we actually do have a polynomial-time algorithm for 4 algorithm for Q that runs in time O ( p ( n )) . solves size- n instances of P in time h ( n ) + g ( n ) · O ( p ( f ( n ))) . P , contradicting the assumption. ✷

  10. Boolean formulae A Boolean formula is an expression generated recursively by the grammar assignment is itself a function from V to truth values. 5 φ, ψ ::= φ ∧ ψ | φ ∨ ψ | ¬ φ | x , y , z , . . . | ( φ ) , where x , y , z , . . . ∈ V are variable names, which represents a function from assignments to truth values { T , F } . An For instance, φ = x ∧ ( y ∨ z ) → ( ¬ v ) .

  11. i n i is called a clause. Conjunctive normal form A Boolean formula is said to be in conjunctive normal form (CNF) if it is of the form Each i 1 6 ( ℓ 1 , 1 ∨ . . . ℓ 1 , n 1 ) ∧ . . . ∧ ( ℓ m , 1 ∨ . . . ∨ ℓ m , n m ) , where each ℓ i , j is a literal: that is, either a variable v ∈ V or the negation ¬ v of one. For example, ( x ∨ ¬ z ) ∧ ( y ∨ z ∨ x ∨ v ) ∧ ( x ) .

  12. Conjunctive normal form A Boolean formula is said to be in conjunctive normal form (CNF) if it is of the form 6 ( ℓ 1 , 1 ∨ . . . ℓ 1 , n 1 ) ∧ . . . ∧ ( ℓ m , 1 ∨ . . . ∨ ℓ m , n m ) , where each ℓ i , j is a literal: that is, either a variable v ∈ V or the negation ¬ v of one. For example, ( x ∨ ¬ z ) ∧ ( y ∨ z ∨ x ∨ v ) ∧ ( x ) . Each ( ℓ i , 1 ∨ . . . ∨ ℓ i , n i ) is called a clause.

  13. The CNF-SAT problem The conjunctive normal form Boolean satisfiability problem (CNF-SAT) is: Given a Boolean formula in CNF, does there exist any assignment to its variables that makes this formula true? This problem is in NP: We can write out the assignment (as a string of the form x T y F ) and use it as a certificate. 7

  14. The CNF-SAT problem The conjunctive normal form Boolean satisfiability problem (CNF-SAT) is: Given a Boolean formula in CNF, does there exist any assignment to its variables that makes this formula true? This problem is in NP: We can write out the assignment (as a 7 string of the form x �→ T , y �→ F , . . . ) and use it as a certificate.

  15. The Cook-Levin Theorem Theorem (Cook-Levin) The CNF-SAT problem is NP-complete. 8

  16. That is, we need to show that there exists a polynomial-time reduction from every problem in NP to CNF-SAT. Proof of Cook-Levin: High-level overview (1) We already know that the problem is in NP, so it just remains to establish that it is NP-hard. 9

  17. Proof of Cook-Levin: High-level overview (1) We already know that the problem is in NP, so it just remains to establish that it is NP-hard. reduction from every problem in NP to CNF-SAT. 9 That is, we need to show that there exists a polynomial-time

  18. if and only if M P accepts the string polynomial-time Turing machine M P which decides P . Proof of Cook-Levin: High-level overview (2) Boolean formula rejected. 4. Accept if the algorithm accepted. Reject if the algorithm 3. Run our algorithm for CNF-SAT on this formula. . which has a satisfying assignment M P , write out a specially prepared CNF We will establish this as follows: 2. In time polynomial in to P . 1. Read the input following reduction: Using our knowledge of this machine, we can write the Since P is in NP, there must exist a nondeterministic Let P be an arbitrary problem in NP. 10

  19. if and only if M P accepts the string polynomial-time Turing machine M P which decides P . Proof of Cook-Levin: High-level overview (2) Boolean formula rejected. 4. Accept if the algorithm accepted. Reject if the algorithm 3. Run our algorithm for CNF-SAT on this formula. . which has a satisfying assignment M P , write out a specially prepared CNF We will establish this as follows: 2. In time polynomial in to P . 1. Read the input following reduction: Using our knowledge of this machine, we can write the Since P is in NP, there must exist a nondeterministic Let P be an arbitrary problem in NP. 10

  20. if and only if M P accepts the string Proof of Cook-Levin: High-level overview (2) Boolean formula rejected. 4. Accept if the algorithm accepted. Reject if the algorithm 3. Run our algorithm for CNF-SAT on this formula. . which has a satisfying assignment M P , write out a specially prepared CNF We will establish this as follows: 2. In time polynomial in to P . 1. Read the input following reduction: Using our knowledge of this machine, we can write the Since P is in NP, there must exist a nondeterministic Let P be an arbitrary problem in NP. 10 polynomial-time Turing machine M P which decides P .

  21. if and only if M P accepts the string Proof of Cook-Levin: High-level overview (2) Boolean formula rejected. 4. Accept if the algorithm accepted. Reject if the algorithm 3. Run our algorithm for CNF-SAT on this formula. . which has a satisfying assignment M P , write out a specially prepared CNF We will establish this as follows: 2. In time polynomial in to P . 1. Read the input following reduction: Using our knowledge of this machine, we can write the Since P is in NP, there must exist a nondeterministic Let P be an arbitrary problem in NP. 10 polynomial-time Turing machine M P which decides P .

  22. if and only if M P accepts the string Proof of Cook-Levin: High-level overview (2) Boolean formula rejected. 4. Accept if the algorithm accepted. Reject if the algorithm 3. Run our algorithm for CNF-SAT on this formula. . which has a satisfying assignment M P , write out a specially prepared CNF We will establish this as follows: 2. In time polynomial in following reduction: Using our knowledge of this machine, we can write the Since P is in NP, there must exist a nondeterministic Let P be an arbitrary problem in NP. 10 polynomial-time Turing machine M P which decides P . 1. Read the input α to P .

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend