← Student tools · Problem 26 · Lecture 11 · Round 2 (30 pts)

SAT ≤p 3SAT · auxiliary-variable splitting

Every CNF clause is rewritten so every clause has exactly three literals — without changing satisfiability and in polynomial time.

CLO-4R2·30 ptsL11
🔊 Listen

SAT asks: given an arbitrary CNF formula, is there an assignment that satisfies it? 3SAT is the same question but restricted to formulas where every clause has exactly three literals. Cook–Levin proves SAT is NP-complete. Once we reduce SAT to 3SAT in polynomial time, 3SAT inherits the NP-completeness — and because 3SAT has a clean uniform shape, it becomes the starting point for almost every other NP-completeness proof in the chain (CLIQUE, VERTEX-COVER, HAM-PATH, SUBSET-SUM…).

Goal of the reduction

Given a CNF formula φ over variables x1, …, xn with clauses of arbitrary width, build in polynomial time a 3CNF formula φ′ such that φ is satisfiable iff φ′ is satisfiable.

The whole trick is one rule applied repeatedly. We replace each clause of width k with a chain of clauses of width 3, glued together by fresh auxiliary variables. The chain has the property that any satisfying assignment of the chain implies at least one of the original literals was true, and conversely if one of the original literals is true the chain can be satisfied by an appropriate choice of auxiliaries.

🔊 Listen
From a width-k clause to a chain of width-3 clauses k = 4 (ℓ₁ ∨ ℓ₂ ∨ ℓ₃ ∨ ℓ₄) (ℓ₁ ∨ ℓ₂ ∨ a₁) ∧ (¬a₁ ∨ ℓ₃ ∨ ℓ₄) k = 5 (ℓ₁ ∨ … ∨ ℓ₅) (ℓ₁ ∨ ℓ₂ ∨ a₁) ∧ (¬a₁ ∨ ℓ₃ ∨ a₂) ∧ (¬a₂ ∨ ℓ₄ ∨ ℓ₅) k ≥ 4 (ℓ₁ ∨ … ∨ ℓ_k) (ℓ₁ ∨ ℓ₂ ∨ a₁) ∧ (¬a₁ ∨ ℓ₃ ∨ a₂) ∧ … ∧ (¬a_{k−3} ∨ ℓ_{k−1} ∨ ℓ_k) k = 2 (ℓ₁ ∨ ℓ₂) (ℓ₁ ∨ ℓ₂ ∨ p) ∧ (ℓ₁ ∨ ℓ₂ ∨ ¬p) k = 1 (ℓ₁) (ℓ₁ ∨ p ∨ q) ∧ (ℓ₁ ∨ p ∨ ¬q) ∧ (ℓ₁ ∨ ¬p ∨ q) ∧ (ℓ₁ ∨ ¬p ∨ ¬q) k = 3 leave unchanged — already 3-literal

The two "pad" cases (k = 1 and k = 2) are the ones students forget. The auxiliary variables p, q there are fresh — each clause-pad gets its own. The four-clause padding for k = 1 forces ℓ1 to be true in every satisfying assignment, which is exactly what the unit clause (ℓ1) demands. The two-clause padding for k = 2 forces ℓ1 ∨ ℓ2 for the same reason: no choice of p can satisfy both clauses unless ℓ1 ∨ ℓ2 already holds.

🔊 Listen
Forward direction (⇒)

Suppose φ is satisfiable under assignment τ. Take any clause C of width k ≥ 4. Some literal ℓj in C is true under τ. Walk the chain left to right and set each auxiliary ai to true while i < j − 1, then to false from i = j − 1 onward. Every chain-clause becomes satisfied: the early ones because their ai is true; the clause containing ℓj because ℓj is true; the later ones because their ¬ai is true.

Reverse direction (⇐)

Suppose φ′ is satisfied under τ′. Project τ′ back to the original variables. Claim: at least one ℓj of the original clause C is true. Suppose for contradiction that all1, …, ℓk are false. Then the first chain-clause forces a1 = true (else nothing in it is satisfied). The second chain-clause now needs a2 = true (its ¬a1 is false and both literals are false). Propagating, every ai = true. But the final chain-clause is (¬ak−3 ∨ ℓk−1 ∨ ℓk) — ¬ak−3 is false, ℓk−1 and ℓk are false — contradiction. So some ℓj must be true.

🔊 Listen

Take the formula

φ = (x₁ ∨ x₂ ∨ ¬x₃ ∨ x₄ ∨ ¬x₅) ∧ (¬x₁ ∨ x₃) ∧ (x₂)

Three clauses of widths 5, 2, 1. Apply the rules:

Result: a 3CNF with 9 clauses and 5 new variables — same satisfiability as φ. Sanity check: original has 3 clauses summing to 5+2+1 = 8 literals, output has 9 clauses summing to 27 literals; the growth is linear in the size of φ.

🔊 Listen
Split a 4-literal clause Auto-plays
🔊 Listen

For a clause of width k, the splitting produces:

So if φ has m clauses with total literal count L, the output 3CNF has at most L clauses and L auxiliary variables in the worst case. The reduction runs in O(L) time — clearly polynomial in |φ|. Padding for k = 1 or 2 adds at most 4 clauses each, again linear.

🔊 Listen
🔊 Listen
🔊 Listen

Sipser: §7.4, Theorem 7.32 (the canonical statement of this reduction). Lecture notes: Module 5, slide 4 (the NP-complete chain starting from SAT). MIT 18.404J Lecture 16 covers the same construction with a slightly different diagram.