l14-handout

l14-handout - Lecture 14/15: More NP-completeness Outline...

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

View Full Document Right Arrow Icon
Lecture 14/15: More NP-completeness David Dill Department of Computer Science 1 Outline NP-completeness finish CSAT 3SAT Independent Set (IS) Node Cover (NC) 2 From NNF to CNF Assume formula is in NNF now. A recursive function tocnf : nnf formulas cnf formulas can be defined to convert a formula to CNF, which will be a list of clause formulas. tocnf ( α ) returns [[ α ]] if α is a literal. All other formulas are either or formulas. tocnf ( α β ) = append ( tocnf ( α ) , tocnf ( β )) The tricky case is tocnf ( α β ) . How do we combine tocnf ( α ) and tocnf ( β ) in polynomial time? Suppose tocnf ( α ) = [ g 1 , g 2 , . . . , g p ] and tocnf ( β ) = [ h 1 , h 2 , . . . , h q ] where g i and h j are clause formulas. [ g 1 , g 2 , . . . , g p ] represents the logical formula g 1 g 2 . . . g p , and h is also a conjunction. We need a CNF formula that is “equivalent” to ( g 1 g 2 . . . g p ) ( h 1 h 2 . . . h q ) . 3 From NNF to CNF, continued Here is something that doesn’t work: We could use distributive law to distribute over . But that gives exponential blowup in the formula size! Instead, use a trick: add new variables to the clause formulas. Then create a fresh variable y and convert the formulas to ( y g 1 ) ( y g 2 ) . . . ( y g p ) ( ¬ y h 1 ) ( ¬ y h 2 ) . . . ( ¬ y h q ) . Intuition: If y = T , the whole formula is true IFF the h clauses are true. 4
Background image of page 1

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

View Full DocumentRight Arrow Icon
Correctness of CNF conversion The second transformation preserves satisfiability, but not logical equivalence. Def: φ 1 is equisatisfiable with φ 2 if if φ 1 is satisfiable iff φ 2 is satisfiable. Thm: The logical formula represented by tocnf ( α ) is equisatisfiable to α . Proof sketch: By induction on the structure of propositional formulas. Suppose α is an NNF formula and β = tocnf ( α ) .
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/08/2011 for the course CS 154 taught by Professor Motwani,r during the Winter '08 term at Stanford.

Page1 / 3

l14-handout - Lecture 14/15: More NP-completeness Outline...

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

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