This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full 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 3SAT Satisfiability (SAT) Given a set of clauses C 1 , . . . , C k over variables X = { x 1 , . . . , x n } is there a satisfying assignment? Satisfiability (3SAT) 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? CookLevin Theorem Theorem (CookLevin) 3SAT is NPcomplete. 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 3SAT to Independent Set Thm. 3SAT ≤ P Independent Set Proof. Suppose we have an algorithm to solve Independent Set, how can we use it to solve 3SAT? To solve 3SAT: • 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? 3SAT ≤ 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
 Fall '07
 staff
 Graph Theory, NPcomplete problems, hamiltonian cycle, Computational problems in graph theory, Travelling salesman problem, Hamiltonian path problem

Click to edit the document details