1 / 8

The class NP

CSC 4170 Theory of Computation. The class NP. Section 7.3. 7.3.a. The HAMPATH problem. A Hamiltonian path in a directed graph G is a directed path that goes through each node exactly once. We consider a special case of this problem where the start node and target node are fixed.

stacie
Download Presentation

The class 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. CSC 4170 Theory of Computation The class NP Section 7.3

  2. 7.3.a The HAMPATH problem A Hamiltonian path in a directed graph G is a directed path that goes through each node exactly once. We consider a special case of this problem where the start node and target node are fixed. HAMPATH= {<G,s,t> | G is a directed graph with a Hamiltonian path from s to t} 1 5 3  PATH? s t  HAMPATH? 4 2 6 1 5 3  HAMPATH? s t 4 2 6

  3. 7.3.b Polynomial verifiability Does this graph have a Hamiltonian path? s t

  4. 7.3.c The COMPOSITES problem COMPOSITES = {x | x=pq for some integers p,q>1} 15COMPOSITES ? 17COMPOSITES ? 77COMPOSITES ? 10403COMPOSITES ? 997,111,111,911,111,119,131,119,871 COMPOSITES ? COMPOSITES is very easily seen to be verifiablein polynomial time. But only a few years ago it was proven that it is also decidable in polynomial time. The same question, however, remains open for HAMPATH --- one of the seven $1,000,000 questions!

  5. 7.3.d Giorgi JaparidzeTheory of Computability NP in terms of nondeterministic Turing machines Definition NPis the class of languages decided by some nondeterministic polynomial time Turing machine.

  6. 7.3.e Giorgi JaparidzeTheory of Computability The CLIQUE problem A k-clique in an undirected graph is a subgraph with k nodes, wherein every two nodes are connected by an edge. On the right we see a 5-clique CLIQUE = {<G,k> | G is an undirected graph witha k-clique} Theorem 7.24CLIQUENP. Proof. Here is a polynomial time NTM N deciding CLIQUE: N = “On input <G,k>: 1. Nondeterministically select a subset c of k nodes of G. 2. Test whether G contains all edges connecting nodes in c. 3. If yes, accept; otherwise reject.”

  7. 7.3.f Giorgi JaparidzeTheory of Computability SUBSET-SUM = {<S,t> | S is a multiset of integers and, for some RS, the sum of all elements ofRequalst} The SUBSET-SUM problem Theorem 7.25SUBSET-SUMNP. Proof. Here is a polynomial time NTM N deciding SUBSET-SUM: N = “On input <S,t>: 1. Nondeterministically select a subset c of S. 2. Test whether the elements of c sum up to t. 3. If yes, accept; otherwise reject.”

  8. 7.3.g Giorgi JaparidzeTheory of Computability This is what we know: This is what we do not know: P = NP? NP = coNP? P = NP coNP? P NP coNPEXPTIME NP  coNP≠ EXPTIME Definitions coNP = {L | L is the complement of some language in NP} EXPTIME = TIME(2n1)  TIME(2n2)  TIME(2n3)  … P vs. NP vs. coNP vs. EXPTIME P: membership can be decided quickly NP: membership can be verified quickly coNP: membership can be refuted quickly EXPTIME: none of the above

More Related