This preview has intentionally blurred parts. Sign up to view the full document

View Full Document

Unformatted Document Excerpt

- 27 3/24/08 NP-complete sequencing pro... NP: problems whose solution can be eficiently (poly-time) veried. Ex: Compositeness: Given n-bit number x, in x composite? Hint: a pair y,z > 1 such that yz = x. NP-Complete: a problem X which is in NP and every other problem Y in NP has a poly-time reduction FROM Y TO X. Ex. Ind. Set, 3 SAT. Alt def: a problem X which is in NP and there exists NPC problem Y which has a poly-time reduction from Y to X. 2 easy reductions from ind. set. (1) CLIQUE: Given undirected graph G = (V, E) and a number k > 0. Output yes if G has a subgraph H with k vertices and every 2 vertices of H are joined by an edge. (H is a k-clique.) Take (G, k) an instance of IND. SET. Construct G which has same vertex set and (u,v) E(G ) <=> (u,v) E(G). (1) Reduction runs in poly-time. YES! O(n2) (2) If G has k-ind set, G has a k-clique. (3) If G has no k-ind set, G has no k-clique. (contrapos.) (2) VERTEX COVER: A vertex cover of an undirected graph G=(V,E) is a set of S vertices such that every edge has 1 endpt in S. Given (G,k) does G have a vertex cover of k vertices? rewrite: A vertex cover is a set S such that every edge has 1 endpt in S. S is a vertex cover <=> S is an indep. set. (G, k) is a yes inst. of VTX COVER <=> (G, n-k) is yes inst. of IND SET. where n = # of vertices of G. Hamiltonian Cycle: Given directed G=(V,E) Does there exist a sequence v1, v2, ..., vn 27-1 containing every vertex once and only once such that (vi, vi+1)E i and (vn, v1)E. YES NO Reduce from 3SAT. variable gadget? Any object that has exactly 2 settings In the absence of clause gadgets the settings of dierent vars. dont conict. clause gadget? Bidirectional path: (These correspond to vars.) LR corresp. to true RL corresp. to false Given 3SAT instance with x1, ..., xn and clauses c1, ..., cm Suppose c1 = (x1 x2 xn) Either P1 or P2 or Pn . 27-2 Claim; This graph has exactly 2n Ham. cycles, corresponding to choosing or on each path. 27-3 27-4 ... View Full Document

End of Preview

Sign up now to access the rest of the document