1 / 10

Complements of Languages in NP

Complements of Languages in NP. Osama Awwad Department of Computer Science Western Michigan University April 3, 2014. Complement classes. In general, if C is a complexity class co-C is the complement class, containing all complements of languages in C L  C implies (* - L)  co-C

raoul
Download Presentation

Complements of Languages in NP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Complements of Languages in NP Osama Awwad Department of Computer Science Western Michigan University April 3, 2014

  2. Complement classes • In general, if C is a complexity class • co-Cis the complement class, containing all complements of languages in C • L  C implies (* - L)  co-C • (* - L) C implies L  co-C • Some classes closed under complement: • e.g. co-P = P

  3. Co-P = P • Given a polynomial-time TM M for L, we can modify M to accept the complement of L as follows: • Make each accepting state of M a nonaccepting state from which there are no moves. Thus, if M accepts, the new TM (L) will halt without accepting. • Create a new state q, which is the only accepting state in the new TM. For each state-symbol combination that has no move, the new TM enters state q, whereupon it accepts and halts.

  4. Co-NP • NP (nondeterministic polynomial-time): class of problems for which, if the answer is yes, then there's a polynomial-size proof of that fact that you can check in polynomial time. • Co-NP: The set of languages whose complements are in NP

  5. Example • Input: graph G=(V,E) • Does G have a Hamiltonian cycle? • Hamiltonian cycle: cycle visiting each vertex exactly once • If G has a Hamiltonian cycle then let us take a promised Hamiltonian cycle – we can check if this is indeed one in O(n) time! • Hamiltonian cycle is in NP • Does G have no Hamiltonian cycle?

  6. Is it true that CoNP = NP? x  L Can we transform this machine: x  L x  L x  L qaccept qreject into this machine? qaccept qreject

  7. NP-Complete and Co-NP • Every language in P has its complement also in P, and therefore in NP. • We believe that none of the NP-complete problems have their complements in NP. no NP-complete problem is in Co-NP. • We believe the complements of NP-complete problems, which are by definition in Co-NP, are not in NP.

  8. NPC Co-NP NP P NP-Complete and Co-NP Co-NPC

  9. NP-Complete and Co-NP • Theorem NP=co-NP if and only if the complement of some NP-complete problem is in NP.

  10. Proof • (Only if): Should NP and Co-NP be the same • Every NP-complete problem L, being in NP, is also in co-NP • The complement of a problem in Co-NP is in NP  the complement of L is in NP • (If) • Let P be an NP-complete problem • Suppose Pc is in NP • For each L in NP, there is a polynomial-time reduction of L to P • Lc is polynomial reducible to Pc _ Lc is in NP

More Related