COMS 482: unofficial class blog

Lecture 23: 3-SAT

Posted in Class Notes by Elliott Back on March 16th, 2005.

Introductory Definitions:

A boolean variable is a variable that can either be assigned one of true or false. A term is either a boolean variable or its negation. A clause is built using terms and V (or operator).

SAT (Satisfiability):

Given a set of clauses c1 … ck over the variables x1 … xn, is there way to assign True and False to variables so that all clauses evaluate to true? SAT <=p 3-SAT <=p Independent Set.

3-SAT:

Given clauses c1 … ck each of length 3 over the variables x1 … xn, is there way to assign True and False to variables so that all clauses evaluate to true?

Claim: “3-SAT is NP-Complete”

Proof: Given a certificate (a set of assignments to variables) we can check in polynomial time that this satisfies all of the clauses. Next we want to show that 3-SAT reduces to independent set. Let’s map 3-SAT to a graph structure, obeying the following rules:

  • Make sure there is at least one true term in each clause so that all clauses are thus true.
  • Make sure x and !x are not both true

3-SAT Requirements

We can use these rules to construct a graph of k triangular clauses, connecting all x and !x between clauses. The independent set of this graph is the solution to 3-SAT:

3-SAT and Independent Set

Proof that 3-SAT reduces to Independent Set:

Claim: The original clauses can all be satisfied iff the graph has an independent set of size k.

Proof (=>): Suppose there exists a satisfying assignment. Then each clause has 1 or more true terms: Choose one of them. Put these into set S: we have k of them. For any 2 vertices in S there is no edge between them because 1) edges in the cause are not chosen and 2) edges between clauses are not chosen because a variable cannot be both true and false. So, S is an independent set.

Proof (<=): Assume we have an independent set S of size k. No 2 vertices can be in the same clause, so each clause has 1 vertex in S. For each vertex in S, we set the corresponding term to be true. X and !x are not both in S, so they cannot both be true. Make leftover variables either true or false. Each clause is satisfied by this assignment.

This entry was posted on Wednesday, March 16th, 2005 at 5:25 pm and is tagged with graph structure, polynomial time, true term, true claim, true x, vertices, clauses, vertex, negation, xn, boolean, ck, choose one, variables, lt, proof, definitions, np, map. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback.

Leave a Reply

Powered by WP Hashcash