np completeness np completeness was introduced by stephen
play

NP Completeness NP-completeness was introduced by Stephen Cook in - PowerPoint PPT Presentation

NP Completeness NP-completeness was introduced by Stephen Cook in 1971 in a foundational paper. Leonid Levin independently introduced the same concept and proved that a variant of SAT is NP-complete. 1. S. Cook. The Complexity of Theorem-Proving


  1. NP Completeness

  2. NP-completeness was introduced by Stephen Cook in 1971 in a foundational paper. Leonid Levin independently introduced the same concept and proved that a variant of SAT is NP-complete. 1. S. Cook. The Complexity of Theorem-Proving Procedures. STOC, 1971. 2. L. Levin. Universal Search Problems. PINFTRANS: Problems of Information Transmission, 1973. (Translated by Trakhtenbrot) Computational Complexity, by Fu Yuxi NP Completeness 1 / 76

  3. The question “ P ? = NP ” became known since 1971. Computational Complexity, by Fu Yuxi NP Completeness 2 / 76

  4. Synopsis 1. NP-Completeness 2. Cook-Levin Theorem 3. Karp Theorem 4. Ladner Theorem 5. Baker-Gill-Solovay Theorem 6. On Relativization Computational Complexity, by Fu Yuxi NP Completeness 3 / 76

  5. NP-Completeness Computational Complexity, by Fu Yuxi NP Completeness 4 / 76

  6. G¨ odel proved (1931): Theorem Proving is undecidable. G¨ odel questioned (1956): What happens if we are only interested in theorems with short proofs? Computational Complexity, by Fu Yuxi NP Completeness 5 / 76

  7. From now on “polynomial time” is abbreviated to “P-time”. Computational Complexity, by Fu Yuxi NP Completeness 6 / 76

  8. On the Definition of NP Theorem . A language L ⊆ { 0 , 1 } ∗ is in NP if and only if there exists a polynomial p : N → N and a P-time TM M , called a verifier for L , such that for every x ∈ { 0 , 1 } ∗ , x ∈ L iff ∃ u ∈{ 0 , 1 } p ( | x | ) . M ( x , u ) = 1 . If x ∈ L and u ∈ { 0 , 1 } p ( | x | ) satisfy M ( x , u )=1, then we call u a certificate for x with respect to L and M . A sequence of successful choices can be seen as a certificate. Conversely a certificate can be generated nondeterministically. Computational Complexity, by Fu Yuxi NP Completeness 7 / 76

  9. NP and Efficient Verifiability P : The class of efficiently solvable problems. NP : The class of efficiently verifiable problems. ◮ A problem in P will be called a P-problem. ◮ A problem in NP will be called an NP-problem. Computational Complexity, by Fu Yuxi NP Completeness 8 / 76

  10. NP-Problems 1. IndSet , TSP , Subset Sum , 0 / 1 IntProg , dHamPath 2. Graph Isomorphism , Factoring ◮ Babai’s result in 2015, 2 polylog . ◮ Prime Factoring is NP-complete. 3. Linear Programming , Primality Computational Complexity, by Fu Yuxi NP Completeness 9 / 76

  11. One can reduce one problem to another without even knowing any solutions to either. Computational Complexity, by Fu Yuxi NP Completeness 10 / 76

  12. Karp Reduction Suppose L , L ′ ⊆ { 0 , 1 } ∗ . We say that L is Karp reducible to L ′ , denoted by L ≤ K L ′ , if there is a P-time computable function r : { 0 , 1 } ∗ → { 0 , 1 } ∗ such that for every x ∈ { 0 , 1 } ∗ , x ∈ L iff r ( x ) ∈ L ′ . If L ≤ K L ′ ≤ K L ′′ then L ≤ K L ′′ . Computational Complexity, by Fu Yuxi NP Completeness 11 / 76

  13. Hardness and Completeness We say that L ′ is NP-hard if L ≤ K L ′ for every L ∈ NP . We say that L ′ is NP-complete if L ′ is NP-hard and L ′ ∈ NP . Fact . 1. If language L is NP-hard and L ∈ P , then P = NP . 2. If language L is NP-complete, then L ∈ P iff P = NP . Computational Complexity, by Fu Yuxi NP Completeness 12 / 76

  14. Does there exist an NP-complete problem any way? Computational Complexity, by Fu Yuxi NP Completeness 13 / 76

  15. Bounded Halting Problem Theorem . The following language is NP-complete: TMSAT def = {� α, x , 1 n , 1 t � | ∃ u ∈{ 0 , 1 } n . M α ( x , u ) outputs 1 in t steps } . Let L ∈ NP be decided by a q -time TM M using p -size certificate. Then “ x ∈ L ” iff ∃ u ∈ { 0 , 1 } p ( | x | ) . M ( x , u ) outputs 1 in q ( | x | + p ( | x | )) steps iff “ � � M � , x , 1 p ( | x | ) , 1 q ( | x | + p ( | x | )) � ∈ TMSAT ”. The Karp reduction maps x onto � � M � , x , 1 p ( | x | ) , 1 q ( | x | + p ( | x | )) � . Computational Complexity, by Fu Yuxi NP Completeness 14 / 76

  16. � � A language L ⊆ { 0 , 1 } ∗ is in coNP def = L | L ∈ NP if there exists a polynomial p : N → N and a P-time TM M such that x ∈ L iff ∀ u ∈{ 0 , 1 } p ( | x | ) . M ( x , u )=1 for every x . P ⊆ coNP ∩ NP . Computational Complexity, by Fu Yuxi NP Completeness 15 / 76

  17. P = NP Implies coNP = NP . Computational Complexity, by Fu Yuxi NP Completeness 16 / 76

  18. Theorem . If P = NP then EXP = NEXP . Proof. Suppose L ∈ NEXP is accepted by an NDTM in 2 n c time. Then � � x 01 2 | x | c L pad = | x ∈ L ∈ NP . By assumption L pad ∈ P . But then L ∈ EXP . The padding technique used in this proof was introduced by Berman and Hartmanis. 1. Berman and Hartmanis. On Isomorphisms and Density of NP and Other Complete Sets. STOC, 1976. Computational Complexity, by Fu Yuxi NP Completeness 17 / 76

  19. Cook-Levin Theorem Computational Complexity, by Fu Yuxi NP Completeness 18 / 76

  20. Conjunctive Normal Form A CNF formula has the form   � �  , v i j i j where v i j is called a literal, and � j v i j a clause. A literal is either a propositional variable, or the negation of a propositional variable. A k CNF formula is a CNF formula in which all clauses contain at most k literals. Computational Complexity, by Fu Yuxi NP Completeness 19 / 76

  21. The First Natural NP -Complete Problem SAT is the language of all satisfiable CNF formulae. ◮ The set of the unsatisfiable DNF’s is the complement of SAT . ◮ The set of the satisfiable DNF’s is in P . Computational Complexity, by Fu Yuxi NP Completeness 20 / 76

  22. 2SAT Fact . 2 SAT ∈ P . x ∨ y for example is understood as both an edge from x to y and an edge from y to x . A 2 SAT ∈ P formula ϕ is unsatisfiable if and only if there is some z such that z is reachable from z . Computational Complexity, by Fu Yuxi NP Completeness 21 / 76

  23. 3SAT Fact . SAT ≤ K 3 SAT . Proof. For example u 1 ∨ u 2 ∨ u 3 ∨ u 4 ∨ u 5 is satisfiable iff ( u 1 ∨ u 2 ∨ v ) ∧ ( ¬ v ∨ u 3 ∨ w ) ∧ ( ¬ w ∨ u 4 ∨ u 5 ) is satisfiable. Corollary . 3 SAT is NP-complete if SAT is NP-complete. Computational Complexity, by Fu Yuxi NP Completeness 22 / 76

  24. Cook-Levin Theorem Theorem (Cook, 1971; Levin, 1973). SAT is NP-complete. Computational Complexity, by Fu Yuxi NP Completeness 23 / 76

  25. Variable Equality Intuitively the formula ( x 1 ∨ y 1 ) ∧ ( x 1 ∨ y 1 ) ∧ . . . ∧ ( x n ∨ y n ) ∧ ( x n ∨ y n ) is equivalent to ( x 1 = y 1 ) ∧ . . . ∧ ( x n = y n ) . Computational Complexity, by Fu Yuxi NP Completeness 24 / 76

  26. Formula Defining a Boolean Function Claim . For every Boolean function f : { 0 , 1 } ℓ → { 0 , 1 } , there is an ℓ -variable CNF formula ϕ f of size ℓ 2 ℓ such that ϕ f ( u ) = f ( u ) for every u ∈ { 0 , 1 } ℓ , where the size of a CNF formula is defined to be the number of ∨ / ∧ symbols. Let ϕ f be � C v ( z 1 , . . . , z ℓ ) v ∈{ 0 , 1 } ℓ ∧ f ( v )=0 where for each v , C v ( v ) = 0 and C v ( u ) = 1 for every u � = v . Computational Complexity, by Fu Yuxi NP Completeness 25 / 76

  27. Proof of Cook-Levin Theorem Suppose L ∈ NP . Let M be a P-time TM and p a polynomial such that for every x ∈ { 0 , 1 } ∗ , x ∈ L iff ∃ u ∈{ 0 , 1 } p ( | x | ) . M ( x , u ) = 1. Wlog, we may assume that M is oblivious. We shall construct a P-time computable function ϕ : L → SAT such that “ ϕ x ∈ SAT iff x ∈ L ”, which is equivalent to saying that ϕ x ∈ SAT iff ∃ u ∈{ 0 , 1 } p ( | x | ) . M ( x ◦ u ) = 1 . Computational Complexity, by Fu Yuxi NP Completeness 26 / 76

  28. Proof of Cook-Levin Theorem The idea is that ϕ x should be a CNF formula such that ◮ it reflects the execution sequence of M ( x ◦ u ) from the initial configuration to the final configuration, and ◮ M ( x ◦ u ) = 1 iff the CNF formula is satisfiable. Computational Complexity, by Fu Yuxi NP Completeness 27 / 76

  29. Proof of Cook-Levin Theorem We choose to encode snapshots rather than configurations. ◮ “Computation is local.” The i -th snapshot z i depends only on z i − 1 , prev ( i ), inputpos ( i ). ◮ The current state is calculated from z i − 1 . ◮ The symbol at the input tape is read at inputpos ( i ). ◮ The other symbols are collected from prev ( i )’s. Computational Complexity, by Fu Yuxi NP Completeness 28 / 76

  30. Proof of Cook-Levin Theorem Now x ∈ L if and only if ∃ y ∈ { 0 , 1 } | x | + p ( | x | ) . ∃ z 1 . . . z T ( | x | ) .ϕ x ( y , z 1 , . . . , z T ( | x | ) ) where ϕ x ( y , z 1 , . . . , z T ( | x | ) ) is the conjunction of the following propositions. 1. x is a prefix of y ; 2. z 1 encodes the initial snapshot; 3. z T ( | x | ) encodes the final snapshot with output 1; 4. z prev ( i ) , z i − 1 , z i and y inputpos ( i ) must satisfy the relationship imposed by the transition function. The size of z i is bounded by (3 c + log n )2 3 c +log n , where c is the size of snapshot. Conclude that ϕ x ( y , � z ) is of polynomial length. Computational Complexity, by Fu Yuxi NP Completeness 29 / 76

  31. Proof of Cook-Levin Theorem ϕ x ( y , � z ) is constructed in P-time. ◮ Calculate | x ◦ u | in P-time, and ◮ Simulate M on 0 | x ◦ u | in P-time to calculate ◮ the head positions at the i -th step, and ◮ for each work tape the largest j < i such that at the j -th step the head of the work tape was scanning the same cell as it is scanning at the i -th step. Computational Complexity, by Fu Yuxi NP Completeness 30 / 76

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