1 / 7

NP-Completeness

NP-Completeness. Section 7.1 Fri, Dec 9, 2005. Polynomial-Time Reductions. A function f :  *   * is polynomial-time computable if there exists a polynomially bounded Turing Machine that computes f .

selima
Download Presentation

NP-Completeness

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. NP-Completeness Section 7.1 Fri, Dec 9, 2005

  2. Polynomial-Time Reductions • A function f : * * is polynomial-time computable if there exists a polynomially bounded Turing Machine that computes f. • A reduction from a language L1 to a language L2 is a polynomial reduction if it is polynomial-time computable.

  3. Example • The Vertex Cover Problem (VC) is polynomial reducible to the Clique Problem (CLIQ). • Let (G, k) be in instance of CLIQ, where G = (V, E) is a graph and k is a nonnegative integer. • Create a graph G' = (V', E'): • V' = V. • eijE' if and only if eij E. • Let k' = n – k, where n is the number of vertices in G. • Then (G', k') is an instance of VC.

  4. Example • Let  be the function mapping (G, k) to (G', k'). • Theorem: The function  is a reduction of CLIQ to VC. • Proof (): • Let (G, k) be an instance of CLIQ and let (G', k') = (G, k). • Suppose S  V is a clique of size k in G. • We will show that S' = V – S is a vertex cover in G'. • Suppose that eij  E'. • Then eij  E, so vi or vj  S. • Therefore, vi or vj  S'. • Thus, eij is “covered” by a vertex in S'.

  5. Example • Proof (): • Suppose S'  V' is a vertex cover of size n – k. • Let vi and vj be vertices not in S', i.e., vi, vj  S. • Then eij  E'. • Therefore, eij  E. • Thus, S is a clique of size k.

  6. NP-Completeness • A language L is called NP-complete if • L is in NP, and • For every language L1 in NP, there is a polynomial reduction from L1 to L.

  7. NP-Completeness • Theorem: Let L be NP-complete. Then P = NP if and only if L P. • That is, if a single NP-complete language can be shown to be decidable deterministically in polynomial time, then all problems that are decidable nondeterministically in polynomial time will be decidable deterministically in polynomial time.

More Related