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

Cook–Levin tableau · TM run as SAT formula

Encode an entire computation as a nk×nk grid; 2×3 windows become SAT clauses.

CLO-4R2·30 ptsL11
🔊 Listen

This is the founding theorem of NP-completeness. Before Cook (1971) and Levin (1973) independently proved it, NP existed as a class but no problem was known to be "the hardest". Cook–Levin pinned the title on SAT and started the chain reaction that today covers thousands of problems — 3SAT, CLIQUE, VERTEX-COVER, HAMPATH, TSP, SUBSET-SUM, 3-COLOR, INTEGER-PROGRAMMING, …

The key insight: a Boolean formula can simulate a TM. Any problem in NP has a polynomial-time verifier; the verifier is a TM; encode its computation as a formula. That formula is satisfiable iff some certificate makes the verifier accept — which is exactly the NP membership question.

Cook–Levin (1971/73)

SAT is NP-complete. For every L ∈ NP there is a polynomial-time computable map x ↦ φx such that x ∈ L iff φx is satisfiable.

Big consequence: a polynomial-time SAT solver would collapse NP to P, breaking modern cryptography (RSA, AES are not directly NP-hard, but most public-key assumptions live in or near NP). This is why the P vs NP question is the most famous open problem in computer science.

🔊 Listen

Pick L ∈ NP with poly-time verifier V. By definition:

So the entire run of V uses at most nk tape cells in at most nk time steps. We arrange this as a grid:

The tableau
  • Rows · time steps t = 0, 1, …, nk.
  • Columns · tape positions p = 0, 1, …, nk.
  • Cell (t, p) · holds one symbol from Γ ∪ Q (a tape symbol, or a state-marker indicating the head is here).

Each cell becomes a set of Boolean variables: xt,p,s = "cell (t,p) holds symbol s". The variable count is nk · nk · |Γ ∪ Q| = polynomial.

🔊 Listen

We assemble φx = φcell ∧ φstart ∧ φaccept ∧ φmove.

Family What it says Form
φcellEach cell holds exactly one symbol.(∨s xt,p,s) ∧ ¬(xt,p,s∧xt,p,s')
φstartRow 0 = the start configuration on (x, c). c-bits are free.x0,0,q₀ ∧ x0,1,x₁ ∧ …
φacceptSome cell anywhere contains qaccept.t,p xt,p,qₐ
φmoveEvery 2×3 window is δ-consistent.(t,p)w ∈ legal "window = w"
Why 2×3 windows suffice

A TM transition touches one cell (head position) and may change its two neighbours' relationship (head moves L or R). So checking two consecutive rows × three adjacent columns is enough to certify one δ-step. Tile the tableau with all such windows; if every one is legal, the whole run is legal.

🔊 Listen
Fill the tableau cell-by-cell Auto-plays
🔊 Listen

Suppose L is SUBSET-SUM and the verifier V takes n bits and runs in n² steps:

Input size n Tableau cells (n²×n²) Variables (× |Γ∪Q| ≈ 20) Move-clauses (≤ 100 per cell)
1010 000~200 000~1 000 000
10010⁸~2·10⁹~10¹⁰
100010¹²~2·10¹³~10¹⁴

Polynomial — but the constant matters. In practice, modern SAT solvers handle problems with millions of variables. The Cook–Levin reduction is theoretical; tighter reductions (e.g. directly to 3SAT) are used for practical NP-completeness work.

🔊 Listen

From Cook–Levin, every other NP-complete proof follows a fixed pattern: "reduce SAT (or 3SAT) to my problem."

Karp's 1972 paper added 21 problems to the family in one stroke. Garey & Johnson's 1979 book catalogued hundreds.

🔊 Listen
  1. "The tableau is the SAT formula." No — the tableau is a thought picture. The formula encodes constraints about the tableau using Boolean variables.
  2. Confusing rows with tape, columns with time. The convention here is rows = time, columns = position. Pick one and stick with it.
  3. Encoding wide TMs. If the TM uses |Γ| = 100 symbols, each cell needs 100 variables. Still polynomial — but watch the constants.
  4. Forgetting φcell. Without "exactly one symbol per cell" clauses, a satisfying assignment could put two symbols in one cell. The construction breaks.
  5. "This proves SAT is in NP." SAT ∈ NP needs a separate (easy) argument: guess the assignment, verify. Cook–Levin proves the hardness direction.
🔊 Listen
🔊 Listen

Total time: 12 minutes.