sat - CMSC 451: SAT, Coloring, Hamiltonian Cycle, TSP...

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 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: 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 wont 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 cant 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

This note was uploaded on 01/13/2012 for the course CMSC 423 taught by Professor Staff during the Fall '07 term at Maryland.

Page1 / 44

sat - CMSC 451: SAT, Coloring, Hamiltonian Cycle, TSP...

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

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