lecture_17 - The first NP-complete problem The...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: The first NP-complete problem The Satisfiability problem (SAT): Given a formula F, find a satisfying truth assignment or else report that none exists. E.g., (x 1 ∨ x 2 ) ∧ (~ x 2 ) : x 1 = true, x 2 = false x 2 ∧ (~ x 2 ) : no satisfying assignment exists. 1 Theorem [Cook 71]: SAT is NP-complete. CNFSAT CNFSAT CNFSAT CNFSAT Definition. A formula F is in conjunctive normal form ( CNF ) if F is in the form (x 1 ∨ x 2 ∨ ~x 4 ) ∧ (~x 2 ∨ x 5 ) ∧ (x 2 ∨ x 8 ∨ x 9 ) ∧ … I.e., F comprises several clauses connected with ∧ s, where a clause comprises literals (i.e., variables or their negations) onnected with . 2 connected with ∨ s. The CNFSAT problem: Given a CNF formula F, find a satisfying truth assignment or else report that none exists. Such structural restriction doesn’t make the formula satisfiability problem easier. We will prove that CNFSAT is also NP-complete. 3CNF 3CNF 3CNF 3CNF-SAT (3SAT) SAT (3SAT) SAT (3SAT) SAT (3SAT) Further restriction: 3CNF-formula is a CNF formula in which every clause contains exactly 3 literals. he 3CNFSAT (or simply SAT problem: Given a 3CNF 3 The 3CNFSAT (or simply 3SAT ) problem: Given a 3CNF- formula F, determine whether F is satisfiable. Fact. (1) SAT, CNFSAT, 3CNFSAT ∈ NP; (2) 3CNFSAT ≤ p CNFSAT ≤ p SAT Today’s roadmap Tool: Suppose A ≤ p B and A is NP-complete. Then B is NP-complete. SAT ≤ p CNFSAT conclusion: CNFSAT is NP-complete CNFSAT ≤ p 3 CNFSAT (more commonly known as 3SAT) onclusion: 3CNFSAT is NP omplete 4 conclusion: 3CNFSAT is NP-complete 3 CNFSAT ≤ p Clique conclusion: Clique is NP-complete Clique ≤ p Vertex Cover conclusion: Vertex Cover is NP-complete 3 CNFSAT ≤ p Knapsack conclusion: Knapsack is NP-complete SAT CNFSAT 3CNFSAT Clique Knapsack … Vertex Cover SAT ≤ p CNFSAT SAT : Give a formula F, find a satisfying truth assignment … Example of a formula : ~(((x 1 ∨ x 2 ) ∧ ~x 4 )) ∧ (~x 2 ∨ x 5 )) ∨ (x 2 ∨ ( x 8 ∧ x 9 ) ) … CNFSAT : Given a CNF-formula F’, find … Example of a CNF-formula : (x 1 ∨ x 2 ∨ ~x 4 ) ∧ (~x 2 ∨ x 5 ) ∧ (x 2 ∨ x 8 ∨ x 9 ) ∧ … 5 What is the 1st thing to do ? • Let F be any Boolean formula. Show that, in polynomial time, F can be transformed to a CNF-formula F’ such that F has a satisfying assignment ⇔ F’ has a satisfying assignment . a clause A literal is a variable or its neagation 2-step transformation: F → F 1 → F 2 Step 1 : Transform F to an equivalent formula F 1 such that all ~ (negation) operators are applied to variables only. Tools: ~(E ∧ E’) ≡ ~E ∨ ~E’; ~(E ∨ E’) ≡ ~E ∧ ~E’; 6 ~~E ≡ E E.g., ~(~(x1 ∧ x2) ∨ x3) is logically equivalent to (x1 ∧ x2) ∧ ~x3 Step 2 : Transform F 1 to a CNF-formula F 2 recursively ....
View Full Document

This note was uploaded on 03/01/2010 for the course CS 1234 taught by Professor Chan during the Spring '10 term at University of the Bío-Bío.

Page1 / 37

lecture_17 - The first NP-complete problem The...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online