SAT

In its general form, SAT concerns an expression in CNF (Conjunctive Normal Form). It’s many clauses, ANDed (∧) together. Each clause is a disjunction, a number of literals (variables or negated (¬) variables) ORed (∨) together. (a ∨ b ∨ c) ∧ (a ∨ b ∨ ¬c ∨ d) ∧ (c ∨ d) ∧ (b)

SAT ⇒ 3SAT

Say we have an arbitrary expression: (a ∨ b ∨ c) ∧ (a ∨ b ∨ ¬c ∨ d) ∧ (c ∨ d) ∧ (b) It’s CNF, but not 3-CNF. We want 3-CNF, because we want to work with 3SAT, which is easier than SAT. We want each disjunctive clause to be three exactly elements. How can we convert CNF to 3-CNF? There are several cases to consider:

Clause with one element

If we have a clause with one element, (b), we introduce a new variable x, and rewrite the single-element clause thus: (b) ≡ (b ∨ x) ∧ (b ∨ ¬x) If x=0 (false), then this reduces to If x=1 (true), then this reduces to ∴, (b) ≡ (b ∨ x) ∧ (b ∨ ¬x). Hooray! We’ve converted a one-element clause into two two-element clauses.

Or, you can just convert (b) to (b ∨ 0), if you allow boolean constants instead of literals. Or even (b ∨ b).

Clause with two elements

If we have a clause with two elements, (c ∨ d), we introduce a new variable y, and rewrite the single-element clause thus: (c ∨ d) ≡ (c ∨ d ∨ y) ∧ (c ∨ d ∨ ¬y) If y=0 (false), then this reduces to

If y=1 (true), then this reduces to

∴, (c ∨ d) ≡ (c ∨ d ∨ y) ∧ (c ∨ d ∨ ¬y). Hooray! We’ve converted a two-element clause into two three-element clauses.

Clause with three elements

Great!

Clause with more than three elements

Lemma: if the formula (A ∨ B) is satisfiable, that is, if there is a truth-assignment to A and B such that (A ∨ B) is true, then the formula (A ∨ z) ∧ (B ∨ ¬z), where z is a new variable, is satisfiable. This is true even if A and B are not simple variables, but instead expressions.

Think of it this way:

Or, as a truth table:

A B A ∨ B A ∨ z B ∨ ¬z (A ∨ z) ∧ (B ∨ ¬z)
0 0 0 z ¬z 0
0 1 1 z 1 z
1 0 1 1 ¬z ¬z
1 1 1 1 1 1

The last column is satisfiable, by an appropriate assignment to z, in all rows except the first one, where A ∨ B itself is not satisfiable. Therefore, the formulas A ∨ B and (A ∨ z) ∧ (B ∨ ¬z) have equal satisfiability.

This lets us break a lengthy clause into two smaller clauses. We can pull the last two components of the lengthy clause into a separate clause of length 3, replacing them with a new variable. This reduces the length of the first clause by one element. Rinse & repeat.