Presentation is loading. Please wait.

Presentation is loading. Please wait.

NP-Completeness A problem is NP-complete if: It is in NP

Similar presentations


Presentation on theme: "NP-Completeness A problem is NP-complete if: It is in NP"— Presentation transcript:

1 NP-Completeness A problem is NP-complete if: It is in NP
Every NP problem is reduced to it (in polynomial time)

2 Observation: If we can solve any NP-complete problem in Deterministic Polynomial Time (P time) then we know:

3 Observation: If we prove that we cannot solve an NP-complete problem in Deterministic Polynomial Time (P time) then we know:

4 Cook’s Theorem: The satisfiability problem is NP-complete Proof: Convert a Non-Deterministic Turing Machine to a Boolean expression in conjunctive normal form

5 An NP-complete Language
Cook-Levin Theorem: Language SAT (satisfiability problem) is NP-complete Proof: Part1: SAT is in NP (we have proven this in previous class) Part2: reduce all NP languages to the SAT problem in polynomial time Prof. Busch - LSU

6 Other NP-Complete Problems:
The Traveling Salesperson Problem Vertex cover Hamiltonian Path All the above are reduced to the satisfiability problem

7 Observations: It is unlikely that NP-complete problems are in P The NP-complete problems have exponential time algorithms Approximations of these problems are in P

8 NP-complete Languages
Prof. Busch - LSU

9 Polynomial Time Reductions
Polynomial Computable function : There is a deterministic Turing machine such that for any string computes in polynomial time: Prof. Busch - LSU

10 is polynomial time reducible to language
Definition: Language is polynomial time reducible to language if there is a polynomial computable function such that: Prof. Busch - LSU

11 Suppose that is polynomial reducible to . If then .
Theorem: Suppose that is polynomial reducible to . If then Proof: Let be the machine that decides in polynomial time Machine to decide in polynomial time: On input string : 1. Compute 2. Run on input 3. If acccept Prof. Busch - LSU

12 Example of a polynomial-time reduction:
We will reduce the 3CNF-satisfiability problem to the CLIQUE problem Prof. Busch - LSU

13 Each clause has three literals
3CNF formula: literal clause Each clause has three literals Language: 3CNF-SAT ={ : is a satisfiable 3CNF formula} Prof. Busch - LSU

14 A 5-clique in graph Language: CLIQUE = { : graph contains a -clique}
Prof. Busch - LSU

15 3CNF-SAT is polynomial time reducible to CLIQUE
Theorem: 3CNF-SAT is polynomial time reducible to CLIQUE Proof: give a polynomial time reduction of one problem to the other Transform formula to graph Prof. Busch - LSU

16 Transform formula to graph. Example:
Clause 2 Create Nodes: Clause 3 Clause 1 Clause 4 Prof. Busch - LSU

17 Add link from a literal to a literal in every
other clause, except the complement Prof. Busch - LSU

18 Resulting Graph Prof. Busch - LSU

19 End of Proof The formula is satisfied if and only if
the Graph has a 4-clique End of Proof Prof. Busch - LSU

20 NP-complete Languages
We define the class of NP-complete languages Decidable NP NP-complete Prof. Busch - LSU

21 A language is NP-complete if:
is in NP, and Every language in NP is reduced to in polynomial time Prof. Busch - LSU

22 If a NP-complete language is proven to be in P then:
Observation: If a NP-complete language is proven to be in P then: Prof. Busch - LSU

23 Decidable NP P NP-complete ? Prof. Busch - LSU


Download ppt "NP-Completeness A problem is NP-complete if: It is in NP"

Similar presentations


Ads by Google