{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

sat - CMSC 451 SAT Coloring Hamiltonian Cycle TSP Slides By...

Info iconThis preview shows pages 1–9. 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 Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: CMSC 451: SAT, Coloring, Hamiltonian Cycle, TSP Slides By: Carl Kingsford Department of Computer Science University of Maryland, College Park Based on Sects. 8.2, 8.7, 8.5 of Algorithm Design by Kleinberg & Tardos. Boolean Formulas Boolean Formulas: Variables: x 1 , x 2 , x 3 (can be either true or false ) Terms: t 1 , t 2 , . . . , t ‘ : t j is either x i or ¯ x i (meaning either x i or not x i ). Clauses: t 1 ∨ t 2 ∨ ··· ∨ t ‘ ( ∨ stands for “OR”) A clause is true if any term in it is true . Example 1: ( x 1 ∨ ¯ x 2 ) , ( ¯ x 1 ∨ ¯ x 3 ) , ( x 2 ∨ ¯ v 3 ) Example 2: ( x 1 ∨ x 2 ∨ ¯ x 3 ) , ( ¯ x 2 ∨ x 1 ) Boolean Formulas Def. A truth assignment is a choice of true or false for each variable, ie, a function v : X → { true , false } . Def. A CNF formula is a conjunction of clauses: C 1 ∧ C 2 , ∧··· ∧ C k Example: ( x 1 ∨ ¯ x 2 ) ∧ ( ¯ x 1 ∨ ¯ x 3 ) ∧ ( x 2 ∨ ¯ v 3 ) Def. A truth assignment is a satisfying assignment for such a formula if it makes every clause true . SAT and 3-SAT Satisfiability (SAT) Given a set of clauses C 1 , . . . , C k over variables X = { x 1 , . . . , x n } is there a satisfying assignment? Satisfiability (3-SAT) Given a set of clauses C 1 , . . . , C k , each of length 3 , over variables X = { x 1 , . . . , x n } is there a satisfying assignment? Cook-Levin Theorem Theorem (Cook-Levin) 3-SAT is NP-complete. Proven in early 1970s by Cook. Slightly different proof by Levin independently. Idea of the proof: encode the workings of a Nondeterministic Turing machine for an instance I of problem X ∈ NP as a SAT formula so that the formula is satisfiable if and only if the nondeterministic Turing machine would accept instance I . We won’t have time to prove this, but it gives us our first hard problem. Reducing 3-SAT to Independent Set Thm. 3-SAT ≤ P Independent Set Proof. Suppose we have an algorithm to solve Independent Set, how can we use it to solve 3-SAT? To solve 3-SAT: • you have to choose a term from each clause to set to true , • but you can’t set both x i and ¯ x i to true . How do we do the reduction? 3-SAT ≤ P Independent Set x 1 x 3 x 2 x 2 x 4 x 3 x 1 x 4 x 2 (x 1 ∨ x 2 ∨ x 3 ) ∧ (x 2 ∨ x 3 ∨ x 4 ) ∧ (x 1 ∨ x 2 ∨ x 4 ) Proof Theorem This graph has an independent set of size k iff the formula is satisfiable. Proof. = ⇒ If the formula is satisfiable, there is at least one true literal in each clause. Let S be a set of one such true literal from each clause. | S | = k and no two nodes in S are connected by an edge....
View Full Document

{[ snackBarMessage ]}

Page1 / 44

sat - CMSC 451 SAT Coloring Hamiltonian Cycle TSP Slides By...

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

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