Exercise

Encode a Computation Tableau as SAT

Build Cook–Levin variables and local constraints, then prove correctness and polynomial size.

Assignment sources

Noy 2025 high-quality exam preparation and community solutionsCommunity solutionפתרון מטלה 3 - סיבוכיות.pdfAssignment 3High-quality preparation and community solution — not official

Problem

Let NN be a one-tape NTM deciding LL in time T(n)≥nT(n)\ge n. Given xx, construct in polynomial time a Boolean formula ΦN,x\Phi_{N,x} satisfiable exactly when NN has an accepting computation on xx. Specify tableau variables, uniqueness, start, transition, and acceptance constraints, and bound the formula size.

Prerequisites

Know the unit definitions and how resources are measured against encoded input length. Distinguish a conditional theorem, a reduction, and an algorithm.

Hint 1

Use a combined alphabet containing tape symbols and state-marked symbols.

Hint 2

Each cell contains exactly one symbol; express this by one at-least-one clause and pairwise exclusions.

Hint 3

Legality of consecutive rows is local to constant-width windows.

Full solution

Normalize NN so it has one accepting state that persists once entered, and pad accepting computations to exactly T=T(∣x∣)T=T(|x|) steps. In TT steps the head visits only O(T)O(T) cells, so use a (T+1)×(2T+1)(T+1)\times(2T+1) tableau. Let Γ′\Gamma' contain every tape symbol and every pair [q,a][q,a] meaning “the head is here, the state is qq, and the scanned symbol is aa.” Introduce Xt,i,sX_{t,i,s} for every row tt, cell ii, and s∈Γ′s\in\Gamma'.

Cell constraints require exactly one symbol:

⋁s∈Γ′Xt,i,s\bigvee_{s\in\Gamma'}X_{t,i,s}

and, for distinct s,s′s,s', clauses (¬Xt,i,s∨¬Xt,i,s′)(\neg X_{t,i,s}\vee\neg X_{t,i,s'}). The start constraints are unit clauses fixing row zero to the initial configuration on xx, blanks elsewhere, and the start-state marker at the first input symbol. Boundary cells may be fixed to blanks with guards wide enough that no TT-step computation reaches beyond them.

For transitions, observe that the contents of cell ii in row t+1t+1 depend only on cells i−1,i,i+1i-1,i,i+1 in row tt and on one chosen transition of NN. Since NN and Γ′\Gamma' are fixed, the set of legal constant-size windows is finite. Forbid every illegal pair of neighboring windows by a constant-width CNF clause. Overlapping windows ensure a single globally consistent successor row and exactly one head marker. Nondeterministic alternatives remain as different satisfying assignments; the formula does not choose one in advance.

Acceptance can be required by

⋁t,i,aXt,i,[qacc,a],\bigvee_{t,i,a}X_{t,i,[q_{\rm acc},a]},

or, after making acceptance persistent and padding, by requiring an accepting marker in the final row. A satisfying assignment gives one symbol per cell. Start clauses identify row zero, local clauses make every next row a legal successor, and the acceptance clause yields an accepting computation. Conversely, an accepting computation fills the variables and satisfies every constraint. This proves both directions.

There are O(T2∣Γ′∣)O(T^2|\Gamma'|) variables. Exactly-one clauses contribute at most O(T2∣Γ′∣2)O(T^2|\Gamma'|^2) literals, and local constraints contribute O(T2)O(T^2) constant-size clauses because the machine is fixed. The direct formula is polynomial in T(n)T(n), hence polynomial in nn when TT is polynomial. If a strict 3CNF output is required, replace long disjunctions by chains of auxiliary variables, increasing size only linearly. The construction algorithm enumerates cells and fixed templates, so its running time is polynomial in the output size.

Checkpoints

Check both logical directions, halting of every relevant branch, and that output length and construction time are polynomial in the encoded input length.

Common mistakes

  • Writing only local transition constraints without exact-one cell constraints.
  • Assuming a deterministic successor for a nondeterministic machine.
  • Counting T2T^2 cells but not the literals needed for exclusivity.
Guided construction

Cook–Levin tableau

Step 1 of 7
Input x = 10 · time bound T = 3 · tableau width S = 5
t=0
⊢
[q0,1]
0
□
□

Sources and verification

  • Merged summary, pp. 50-54
  • 2026 transcripts 12-13
  • Sipser 3e, sec. 7.4
  • Arora-Barak draft, sec. 2.3
  • Catalog mapping: data/exercises.json; statements and solutions are independently written; personal submissions are non-authoritative.

Provenance and confidence

The exercise is an original synthesis. Confidence reflects verification of the mathematical claim against the textbook sources listed above; course sources are used only where direct coverage is identified.