CSC 320 Notes: SAT reduces to 3-SAT

The problem 3-SAT is defined like SAT except that each clause must contain exactly 3 variables.


Theorem: 3-SAT is NP-Complete.

Proof.
The first step in any NP-completeness proof is to argue that your problem is in NP. The problem 3-SAT is a yes/no question. A truth assignment can easily be checked in time proportional to the size of the original input.

Next, we show that a polynomial time algorithm for 3-SAT implies the existence of one for SAT. A SAT problem can be converted to an equivalent 3-SAT problem as follows:

  1. Clauses of size 1. Given a clause {z} in the SAT problem, place the four clauses: {z, y1, y2}, {z, ¬ y1, y2}, {z, y1, ¬ y2}, and {z, ¬ y1, ¬ y2} in the 3-SAT problem where y1 and y2 are new variables. Clearly, the only way to satisfy all four of these clauses is to set z to true.
  2. Clauses of size 2. Given a clause {z1, z2} in the SAT problem, place the two clauses: {z1, z2, y}, and {z1, z2, ¬ y} in the 3-SAT problem where y is a new variable. Clearly, the only way to satisfy both of these new clauses is to also satisfy the old clause.
  3. Clauses of size 3. Leave these as they are since they are already acceptable for 3-SAT.
  4. Clauses of size 4 or more. Given a clause {z1, z2, z3, ... zk} in the SAT problem where k>3, replace it by {z1, z2, y1},
    {¬ y1, z3, y2},
    {¬ y2, z4, y3},
    ...
    {¬ yk-4, zk-2, yk-3},
    {¬ yk-3, zk-1, zk}
    in the 3-SAT problem where y1, y2, ... yk-3, are new variables. If all the zi's are false, there is no way to satisfy all these clauses. If one is true, by choosing appropriate values for the yi's, all the clauses can be satisfied. Thus, this collection is satisfiable if and only if the original clause is satisfiable.

This does not constitute a proof of NP-completeness unless we can argue that the size of the new 3-SAT problem. problem is polynomially bounded by the size of the old SAT problem. Consider each case:
Size of clause # new literals size before size after
1 2 1 12
2 1 2 6
3 0 3 3
k>3 k-3 k k + 2(k-3)
In all cases, the size after is at most 12 times the original problem size.