{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lecture_17

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

This preview shows pages 1–9. Sign up to view the full content.

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.

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

View Full Document
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) connected with s. 2 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 -SAT (3SAT) SAT (3SAT) SAT Further restriction: 3CNF -formula is a CNF formula in which every clause contains exactly 3 literals. The 3CNFSAT (or simply 3SAT ) problem: Given a 3CNF- 3 formula F, determine whether F is satisfiable. Fact. (1) SAT, CNFSAT, 3CNFSAT NP; (2) 3CNFSAT p CNFSAT p SAT

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

View Full Document
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) conclusion: 3CNFSAT is NP-complete 4 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

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

View Full Document
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 . Note that F 1 can always be decomposed into the following three possible forms: E E’ , where E and E’ are formulas (but not necessarily CNF-formulas) 7 E E’ a literal (i.e., x i , ~x i ) . NB. F 1 can’t be of the form ~E, where E is a formula involving operators, i.e., more complicated than a variable.

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

View Full Document
Step 2 : Recursive transformation of F 1 If F 1 is in the form of E E’ (where E and E’ are formulas) (a) Transform E to a CNF formula C 1 C 2 C l (b) Transform E’ to a CNF formula D 1 D 2 D k F 1 [C 1 C 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 37

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

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

View Full Document
Ask a homework question - tutors are online