P, NP, Co-NP, Self Reductions

P, NP, Co-NP, Self Reductions

CS 473: Algorithms Chandra Chekuri [email protected] 3228 Siebel Center University of Illinois, Urbana-Champaign Fall 2010 Chekuri CS473 1 Complementation Self Reduction Part I Complementation and Self-Reduction Chekuri CS473 2 Recap Complementation Motivation Self Reduction co-NP Definition Relationship between P, NP and co-NP The class P A language L (equivalently decision problem) is in the class P if there is a polynomial time algorithm A for deciding L; that is given a string x, A correctly decides if x L and running time of A on x is polynomial in x , the length2 of x. j j Chekuri CS473 3 Recap Complementation Motivation Self Reduction co-NP Definition Relationship between P, NP and co-NP The class NP Two equivalent definitions: Language L is in NP if there is a non-deterministic polynomial time algorithm A (Turing Machine) that decides L. For x L, A has some non-deterministic choice of moves that will make2 A accept x For x L, no choice of moves will make A accept x 62 L has an efficient certifier C( ; ). · · C is a polynomial time deterministic algorithm For x L there is a string y (proof) of length polynomial in x such that2 C(x; y) accepts j j For x L, no string y will make C(x; y) accept 62 Chekuri CS473 4 Recap Complementation Motivation Self Reduction co-NP Definition Relationship between P, NP and co-NP Complementation Definition Given a decision problem X , its complement X¯ is the collection of all instances s such that s X 62 Equivalently, in terms of languages: Definition Given a language L over alphabet Σ, its complement L¯ is the language Σ∗ L. − Chekuri CS473 5 Technicality: SAT¯ also includes strings that do not encode any valid SAT formula. Typically we ignore those strings because they are not interesting. In all problems of interest, we assume that it is \easy" to check whether a given string is a valid instance or not. Recap Complementation Motivation Self Reduction co-NP Definition Relationship between P, NP and co-NP Examples PRIME = n n is an integer and n is prime PRIME¯ = fn j n is an integer and n is not ag prime PRIME¯ = COMPOSITEf j g SAT = ' ' is a SAT formula and ' is satisfiable SAT¯ = f' j ' is a SAT formula and ' is not satisfiableg SAT¯ = UnSATf j g Chekuri CS473 6 Recap Complementation Motivation Self Reduction co-NP Definition Relationship between P, NP and co-NP Examples PRIME = n n is an integer and n is prime PRIME¯ = fn j n is an integer and n is not ag prime PRIME¯ = COMPOSITEf j g SAT = ' ' is a SAT formula and ' is satisfiable SAT¯ = f' j ' is a SAT formula and ' is not satisfiableg SAT¯ = UnSATf j g Technicality: SAT¯ also includes strings that do not encode any valid SAT formula. Typically we ignore those strings because they are not interesting. In all problems of interest, we assume that it is \easy" to check whether a given string is a valid instance or not. Chekuri CS473 6 Proof. If X is in P let A be a polynomial time algorithm for X . Construct polynomial time algorithm A0 for X¯ as follows: given input x, A0 runs A on x and if A accepts x, A0 rejects x and if A rejects x then A0 accepts x. Only if direction is essentially the same argument. Recap Complementation Motivation Self Reduction co-NP Definition Relationship between P, NP and co-NP P is closed under complementation Proposition Decision problem X is in P if and only if X¯ is in P. Chekuri CS473 7 Recap Complementation Motivation Self Reduction co-NP Definition Relationship between P, NP and co-NP P is closed under complementation Proposition Decision problem X is in P if and only if X¯ is in P. Proof. If X is in P let A be a polynomial time algorithm for X . Construct polynomial time algorithm A0 for X¯ as follows: given input x, A0 runs A on x and if A accepts x, A0 rejects x and if A rejects x then A0 accepts x. Only if direction is essentially the same argument. Chekuri CS473 7 given CNF formulat ', is ' unsatisfiable? Easy to give a proof that ' is satisfiable (an assignment) but no easy (known) proof to show that ' is unsatisfiable! Recap Complementation Motivation Self Reduction co-NP Definition Relationship between P, NP and co-NP Asymmetry of NP Definition Nondeterministic Polynomial Time (denoted by NP) is the class of all problems that have efficient certifiers. Observation To show that a problem is in NP we only need short, efficiently checkable certificates for \yes"-instances. What about \no"-instances? Chekuri CS473 8 Easy to give a proof that ' is satisfiable (an assignment) but no easy (known) proof to show that ' is unsatisfiable! Recap Complementation Motivation Self Reduction co-NP Definition Relationship between P, NP and co-NP Asymmetry of NP Definition Nondeterministic Polynomial Time (denoted by NP) is the class of all problems that have efficient certifiers. Observation To show that a problem is in NP we only need short, efficiently checkable certificates for \yes"-instances. What about \no"-instances? given CNF formulat ', is ' unsatisfiable? Chekuri CS473 8 Recap Complementation Motivation Self Reduction co-NP Definition Relationship between P, NP and co-NP Asymmetry of NP Definition Nondeterministic Polynomial Time (denoted by NP) is the class of all problems that have efficient certifiers. Observation To show that a problem is in NP we only need short, efficiently checkable certificates for \yes"-instances. What about \no"-instances? given CNF formulat ', is ' unsatisfiable? Easy to give a proof that ' is satisfiable (an assignment) but no easy (known) proof to show that ' is unsatisfiable! Chekuri CS473 8 Above problems are complements of known NP problems (viewed as languages). Recap Complementation Motivation Self Reduction co-NP Definition Relationship between P, NP and co-NP Examples Some languages UnSAT: CNF formulas ' that are not satisfiable No-Hamilton-Cycle: graphs G that do not have a Hamilton cycle No-3-Color: graphs G that are not 3-colorable Chekuri CS473 9 Recap Complementation Motivation Self Reduction co-NP Definition Relationship between P, NP and co-NP Examples Some languages UnSAT: CNF formulas ' that are not satisfiable No-Hamilton-Cycle: graphs G that do not have a Hamilton cycle No-3-Color: graphs G that are not 3-colorable Above problems are complements of known NP problems (viewed as languages). Chekuri CS473 9 Definition co-NP is the class of all decision problems X such that X¯ NP. Examples, UnSAT, No-Hamiltonian-Cycle, No-3-Colorable.2 Recap Complementation Motivation Self Reduction co-NP Definition Relationship between P, NP and co-NP NP and co-NP NP Decision problems with a polynomial certifier. Examples, SAT, Hamiltonian Cycle, 3-Colorability Chekuri CS473 10 Recap Complementation Motivation Self Reduction co-NP Definition Relationship between P, NP and co-NP NP and co-NP NP Decision problems with a polynomial certifier. Examples, SAT, Hamiltonian Cycle, 3-Colorability Definition co-NP is the class of all decision problems X such that X¯ NP. Examples, UnSAT, No-Hamiltonian-Cycle, No-3-Colorable.2 Chekuri CS473 10 co-NP has checkable proofs for strings NOT in the language. Recap Complementation Motivation Self Reduction co-NP Definition Relationship between P, NP and co-NP co-NP L is a language in co-NP implies that there is a polynomial time certifier/verifier C( ; ) such that · · for s L there is a proof t of size polynomial in s such that C(s; t62) correctly says NO j j for s L there is no proof t for which C(s; t) will say NO 2 Chekuri CS473 11 Recap Complementation Motivation Self Reduction co-NP Definition Relationship between P, NP and co-NP co-NP L is a language in co-NP implies that there is a polynomial time certifier/verifier C( ; ) such that · · for s L there is a proof t of size polynomial in s such that C(s; t62) correctly says NO j j for s L there is no proof t for which C(s; t) will say NO 2 co-NP has checkable proofs for strings NOT in the language. Chekuri CS473 11 Recap Complementation Motivation Self Reduction co-NP Definition Relationship between P, NP and co-NP Natural Problems in co-NP Tautology: given a Boolean formula (not necessarily in CNF form), is it true for all possible assignments to the variables? Graph expansion: given a graph G, is it an expander? A graph G = (V ; E) is an expander iff for each S V with S V =2, N(S) S . Expanders are⊂ very important graphsj j ≤ j inj theoreticalj j ≥ computer j j science and mathematics. Chekuri CS473 12 Proposition P = co-P. Proposition P NP co-NP. ⊆ \ Saw that P NP. Same proof shows P co-NP ⊆ ⊆ Recap Complementation Motivation Self Reduction co-NP Definition Relationship between P, NP and co-NP P, NP, co-NP co-P: complement of P. Language X is in co-P iff X¯ P 2 Chekuri CS473 13 Proposition P NP co-NP. ⊆ \ Saw that P NP. Same proof shows P co-NP ⊆ ⊆ Recap Complementation Motivation Self Reduction co-NP Definition Relationship between P, NP and co-NP P, NP, co-NP co-P: complement of P. Language X is in co-P iff X¯ P 2 Proposition P = co-P. Chekuri CS473 13 Saw that P NP. Same proof shows P co-NP ⊆ ⊆ Recap Complementation Motivation Self Reduction co-NP Definition Relationship between P, NP and co-NP P, NP, co-NP co-P: complement of P.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    63 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us