IP = PSPACE via arithmetization and the sum-check protocol, then the PCP theorem NP = PCP[O(log n), O(1)] — proofs checkable in O(1) bits — so approximating Max-3-SAT is NP-hard.
Last updated 27 June 2026
Lecture 7 — Interactive Proofs & the PCP Theorem
Course 2-INF-135/15 Pravdepodobnostné algoritmy, LS 2025/26.
Source slides: RA_slidy_IPaPSPACEPCPstart_tlac.pdf (38 p., IP = PSPACE + start of PCP),
RA_PCP_komplet.pdf (42 p., the full PCP proof), book chapter
PCP_kniha.pdf [Crescenzi–Kann style text] (46 p., ch. 7 “The PCP theorem”).
Štátnicové syllabus topics covered: interactive proofs and IP = PSPACE; the sum-check
protocol and arithmetization; the PCP theorem NP = PCP[O(log n), O(1)]; the two readings
of it (locally checkable proofs and hardness of approximation); the proof via linear /
low-degree encodings and the composition lemma; inapproximability of Max-3-SAT and of
the maximum independent set / clique.
The one-paragraph map of the whole lecture
There are two big theorems here, and they are siblings: both replace a combinatorial check
(“is this formula satisfiable?”) by an algebraic one (“do these polynomials agree?”).
The first is IP = PSPACE: a polynomial-time, coin-flipping verifier chatting with an
all-powerful but untrusted prover can be convinced of exactly the PSPACE statements. The
engine is arithmetization — turn a Boolean formula into a polynomial — plus the
sum-check protocol, where the verifier never computes a giant sum itself but forces the
prover to “open up” the sum one variable at a time, spot-checking each step at a random point.
The second, the centrepiece, is the PCP theorem:
NP=PCP[O(logn),O(1)].
Every NP statement has a (polynomially long) written proof that a verifier can check by
tossing O(logn) coins and reading only a constant number of its bits — yet still
catch any false “proof” with probability ≥21. Read one way, this is astonishing:
correctness becomes a local property. Read the other way — the way the exam cares about —
it says approximating NP-hard optimization problems (Max-3-SAT, maximum clique,
maximum independent set) is itself NP-hard. The proof builds proofs you can check locally out
of three ingredients: linear-function encodings (giving long, exponential proofs),
low-degree-polynomial encodings (giving short, polynomial proofs with polylog queries),
and a composition lemma that glues a long-but-few-queries verifier inside a
short-but-many-queries one to get the best of both: logarithmic randomness and constant
queries.
Part A — Interactive proofs and IP = PSPACE
A.1 What an interactive proof is
Picture a student (the prover P) trying to convince a teacher (the verifier V)
that “x∈L.” It is an exam by conversation: they exchange messages, and the teacher
has the last word.
Verifier V — a probabilistic, polynomial-time algorithm. It tosses private
coins (the prover does not see V’s random bits) and sends/receives polynomially many
messages of polynomial length.
Prover P — unbounded computational power, but untrusted. It will say anything to
be believed.
The pair (P,V) is an interactive protocol for L if:
Intuition. If the statement is true, some honest prover convinces V every time. If
it is false, then no prover — however clever or malicious — fools V more than half the
time; any false “proof” gets caught by V’s coins with probability ≥21. The
private coins are the teacher’s secret: the student must commit to answers before learning
what the teacher will check.
IP is the class of languages with such a protocol. The 21 is cosmetic —
repeat and take majority to push the error to 2−k.
A.2 The easy half: IP ⊆ PSPACE
A PSPACE machine can simulate the whole game tree of conversations without writing it down
all at once. The verifier uses r(n) random bits and the prover sends messages of length
m(n). We want to know:
∀r∃m:V(r)(P(m),x)=1?
More precisely, the optimal prover maximizes V’s acceptance probability, and that maximum is
prover strategymaxrPr[V accepts].
Polynomial space suffices to recurse over all message sequences m∈{0,1}m(n) and
average over all coin sequences r∈{0,1}r(n) — exponentially many, but explored one
branch at a time, reusing space. So IP⊆PSPACE.
A.3 The hard half: PSPACE ⊆ IP, via the PSPACE-complete problem TQBF
It suffices to give a protocol for one PSPACE-complete problem; everything else reduces to
it. That problem is TQBF (true quantified Boolean formulas):
B=∀x1∃x2∀x3⋯∃xnΦ(x1,…,xn).
The whole trick of this part is to arithmetize and then run sum-check. We warm up on a
counting version where the idea is cleanest.
Warm-up: arithmetization and #3SATD∈ IP
Arithmetize a Boolean formulaφ — translate logic into a polynomial Pφ
over the integers (working mod a prime later):
¬x⇝(1−x),x∧y⇝x⋅y,x∨y⇝1−(1−x)(1−y).
For a 3-CNF φ with m clauses, Pφ(X1,…,Xn)=∏j≤mpj(X1,…,Xn), and crucially
φ(x1,…,xn)=1⟺Pφ(X1,…,Xn)=1on 0/1 inputs.
Now #3SATD={(Φ,K)∣Φ is a 3-CNF with exactly K satisfying assignments}.
The number of satisfying assignments is just a sum of the polynomial over the cube:
#Φ=b1∈{0,1}∑⋯bn∈{0,1}∑PΦ(b1,…,bn).
So (Φ,K)∈ #3SATD iff this sum equals K. The verifier cannot compute a sum over
2n points — but the sum-check protocol lets it verify the claim while reading almost
nothing itself.
The sum-check protocol
Setup: a polynomial g(X1,…,Xn) of total degree d, an integer K, a prime p. We
want to verify
K≡pb1∈{0,1}∑⋯bn∈{0,1}∑g(b1,…,bn).
The verifier “peels one variable at a time”:
If n=1:V just checks g(0)+g(1)=K directly and accepts/rejects.
If n≥2:V wants the univariate polynomial obtained by summing out all but the
first variable,
h(X1)=b2∑⋯bn∑g(X1,b2,…,bn).V asks P for it. P sends some univariate s(X1) (claimed to equal h).
V checks the consistency at the boundary: s(0)+s(1)=K? If not, reject.
If yes, V picks a random point a∈RGF(p) and recurses: verify that
s(a)=b2∑⋯bn∑g(a,b2,…,bn),
i.e. a sum-check on one fewer variable with new target K′:=s(a).
Why this is sound — the punchline. Suppose the prover lied, s=h. Two non-equal
univariate polynomials of degree ≤d over GF(p) agree on at most d points,
so a randoma has s(a)=h(a) with probability ≥1−d/p. But if s(a)=h(a),
the prover is now stuck having to prove a new false statement about g(a,⋅) — the
lie is pushed down one level, never erased. Over n rounds,
Pr[V rejects a false claim]≥(1−pd)n≥1−pnd,
which is close to 1 once p is a polynomially long prime. The prover’s only escape would
be to guess V’s random a in advance — impossible with private coins.
This is the whole soul of interactive proofs: the verifier never does the big computation;
it forces the prover to reveal it step by step and audits each step at a random point.
TQBF ∈ IP — the two complications and their fixes
For B=∀x1∃x2⋯Φ, arithmetize quantifiers too: negation only on
variables (¬x⇝1−x), then
∧⇝⋅,∨⇝+,∃⇝∑,∀⇝∏.
Then B is true iff its arithmetization
A=b1∏b2∑⋯bn∑PΦ(b1,…,bn)=0,
and we run a sum-check-style protocol (now mixing ∑ for ∃ and ∏ for
∀), peeling the leftmost quantifier each round, turning the bound variable into a
free one and sending a univariate polynomial g(z) with g(0)Jg(1)=K, where
J∈{+,⋅} is the operator being peeled.
Two things can go wrong, and the fixes are the examinable insight:
The numbers explode. A product of n factors can reach value O(22n) — doubly
exponential, too big to send. Fix: work modulo a prime p of polynomial bit-length.
Such a p exists with A≡p0⟺B true: if primes p1,…,pm each divided
A then their product would divide A, but p1⋯pm=Ω(22nd) while
A=O(22n) — a contradiction once we take enough primes. The prover sends p together
with a certificate of primality.
The degree explodes. Each ∏ over a variable can double the degree of remaining
polynomials, so after many ∀’s the univariate messages would have exponential
degree. Fix: put B into “simple” form — between any variable and its own
quantifier there is at most one ∀. Any QBF can be transformed to simple form with
only polynomial growth (re-introduce a fresh copy xi⇝xji after each
∀, enforcing equality xi=xj⇝zizj+(1−zi)(1−zj)). For a
simple QBF, the degree of the functional-form polynomial grows only linearly in
∣B∣, so all messages stay polynomial.
Correctness bound. If B is false, the verifier accepts with probability at most
t/p, where t is the degree of the functional form (linear in ∣B∣). Polynomial t,
polynomially-long prime p ⇒ negligible error. Hence PSPACE⊆IP,
and combined with A.2,
IP=PSPACE.
This matters for PCP because it immediately gives one boundary point of the PCP world:
PSPACE⊆PCP[poly,poly] (below).
Part B — PCP: definition and meaning
B.1 The definition
A probabilistically checkable proof flips the picture from Part A: instead of a live
conversation, the prover writes down a static proof string Π once, and the verifier
gets random access to it (an oracle) but only peeks at a few bits.
L∈PCP[r(n),q(n)] if there is a probabilistic polynomial-time verifier V that,
on input x, uses r(∣x∣)random bits and reads q(∣x∣)bits of a proof Π, with
x∈L⇒∃π:rPr[V(x,r)=1]=1(completeness),x∈/L⇒∀π:rPr[V(x,r)=1]<21(soundness).
The two parameters are randomness r and query complexity q — and we measure
efficiency by how stingy the verifier is with both.
A first example — PCP for graph non-isomorphism (GNI)
You are given two n-vertex graphs G0,G1 and want to be convinced they are not
isomorphic. The proof Π is a giant table: for everyn-vertex graph H, Π(H)
records which of G0,G1 it is isomorphic to (if any):
Π(H)=iif H≅Gi.
The verifier: pick b∈R{0,1}, a random permutation τ, form H=τ(Gb) (a random
relabelling of Gb), and check Π(H)=b.
Why it works. If G0≅G1, an honest table answers correctly and V always
accepts. If G0≅G1, then H=τ(Gb) is isomorphic to both, so its scrambled
form leaks no information about which b was used — any table is right with probability
exactly 21. The randomness hides b; the verifier reads a single table entry.
B.2 The theorem and its two readings
NP=PCP[O(logn),O(1)].
Reading 1 — locally checkable proofs. Every NP statement has a polynomial-length proof
that can be verified by tossing O(logn) coins and reading a constant number of its
symbols. Correctness, normally a global property of a proof, can be made local and
spot-checkable: a wrong proof is wrong “almost everywhere,” so a constant-size random sample
exposes it.
Reading 2 — hardness of approximation (the exam’s favourite). PCP is equivalent to a
gap-producing reduction:
Theorem. There is a constant ρ<1 such that for every L∈NP there is a
polynomial-time f mapping instances to 3-CNF formulas with
x∈L⇒val(f(x))=1,x∈/L⇒val(f(x))<ρ,
where val is the maximum fraction of simultaneously satisfiable clauses.
The reduction creates a gap: satisfiable formulas stay fully satisfiable, unsatisfiable
ones become robustly unsatisfiable (you cannot even get a ρ-fraction). Consequences:
Corollary. If there is a ρ-approximation algorithm for Max-3-SAT, then
P=NP. (Run it on f(x): a value ≥ρ means x∈L, <ρ means
x∈/L — the gap is exactly what an approximation could not cross.)
Hence (Kráľovič’s inapproximability results): if P=NP, then
Max-3-SAT ∈/ PTAS and MaxClique ∈/ PTAS — no polynomial-time
approximation scheme exists. We work the independent-set / clique version out fully in
Part D, because two of the practice exams ask for exactly it.
B.3 The easy containments (and the exam-2 problem)
These you can prove by hand; they bracket the theorem and one of them is a standalone exam
question.
PSPACE⊆PCP[poly,poly] — because
IP=PSPACE (Part A) and an interactive proof with public randomness can
be written down as a checkable proof.
The proof is never longer than it needs to be: the only proof positions that can ever be
read are those queried for some random string, so effectively
∣Π∣≤q(n)⋅2r(n).
PCP[r,q]⊆NTIME(2O(r)⋅q) — a nondeterministic
machine guesses the (length-≤q2r) proof, then enumerates all 2r random
strings and accepts iff V accepts on every one.
PCP[logn,1]⊆NP — special case: 2O(logn)=poly,
so the guessed proof is polynomial and all poly random strings are checkable in
polynomial time.
PCP[logn,poly]=NP — the matching lower bound; “⊇”
is the harder construction (Part C, short proofs).
We may always assume soundness 21 (amplify to 2−c by repeating c times) and a
non-adaptive verifier — one that fixes all its queries up front as a function of its
coins, rather than letting later queries depend on earlier answers. (With a constant number of
queries, adaptive vs. non-adaptive makes no difference.)
Exam connection (exam-2, Problem 2).“Show, without invoking the PCP theorem, that if
3-SAT ∈PCP[21logn,c] then P=NP.”
The mechanism is the bound above. With r=21logn there are only 2r=n
random strings, and the verifier reads c bits for each, so only ≤cn proof
positions matter. Each random string ρ imposes one constraint on c of those proof
bits; perfect completeness means x∈3-SAT iff there is an assignment to those
proof bits satisfying alln constraints, while x∈/3-SAT leaves
every assignment failing more than half of them. So 3-SAT reduces to deciding a tiny
constraint system over O(n) Boolean variables — and the point the examiner wants is
that the proof has collapsed to polynomial size with a verifier whose coins are almost
gone, turning the probabilistic check into a deterministic search you can carry out
directly. State the key inequality ∣Π∣≤q⋅2r, build the constraint system, and
argue the gap makes the decision unambiguous.
B.4 The bridge: NP ⊆ PCP[log n, 1] ⟺ 3-SAT has an amplifying reduction
This lemma is how PCP and inapproximability are literally the same statement.
A polynomial-time f on 3-CNF formulas is a c-amplifying reduction (for c<1) if
maxSAT(φ)=1⇒maxSAT(f(φ))=1,maxSAT(φ)<1⇒maxSAT(f(φ))<c.
Satisfiable stays satisfiable; unsatisfiable becomes “at most a c-fraction satisfiable.”
Lemma.NP⊆PCP[logn,1]⟺ 3-SAT has an amplifying reduction.
(⇐) reduction ⇒ verifier. Given f, the proof is a satisfying assignment of
f(φ). The verifier picks a random clause of f(φ) (that costs O(logn)
coins), reads the 3 bitsΠ(i),Π(j),Π(k) for its variables, and checks the clause is
satisfied. If φ∈ SAT, some assignment satisfies all clauses ⇒ accept always. If
φ∈/ SAT, at most a c-fraction of clauses are satisfied ⇒ reject probability
≥1−c; repeat to push acceptance below 21. Constant queries, log randomness. ✓
(⇒) verifier ⇒ reduction. Given a verifier V for SAT using clogn coins and
t queries, construct f: for each random string r∈{0,1}clogn, the queried
positions i1,…,it and the accept predicate define a Boolean function
φr′(xi1,…,xit) with φr′=1⟺V accepts on r. Convert each
φr′ into 3-CNF φr (auxiliary variables), and set
f(φ):=r∈{0,1}clogn⋀φr.
If φ∈ SAT, the good proof satisfies all ⇒ f(φ)∈ SAT. If φ∈/ SAT,
soundness says Prr[φr(α)=0]≥21 for every assignment α, so with
t′=maxr(#clauses in φr) at least a 2t′1-fraction of clauses of
f(φ) is unsatisfied — i.e. maxSAT(f(φ))<c for c=1−2t′1. ✓
Part C — Proving the PCP theorem
C.1 The three-step plan
(1) long prooflinear functions(2) short prooflow-degree polys(3) composition
Every NP problem has an exponentially long proof checkable with O(1) queries.
Tool: arithmetization of Boolean formulas + linear functions and self-correction.
Result: NP⊆PCP[O(n3),O(1)].
Every NP problem has a polynomially long proof checkable with polylog queries.
Tool: low-degree polynomials (two distinct low-degree polynomials agree on few points)
low-degree test + sum-check. Result: NP⊆PCP[O(logn),O(log4n)].
The composition lemma glues a verifier inside another to combine “log randomness” with
“constant queries,” landing on NP=PCP[O(logn),O(1)].
The recurring slogans:
Arithmetization reduces satisfiability to an algebraic property.
Linear / low-degree functions are testable (you can check from a few samples that a
table is close to one) and self-correctable (you can recover a true value despite errors).
It is enough to do this for the NP-complete 3-CNF-SAT — validity there gives validity for
all of NP by reduction.
We need one shared definition first.
δ-close functions. For finite sets D,R and 0<δ<1, functions
f,g:D→R are δ-close if they disagree on at most a δ-fraction of inputs:
x∈DPr[f(x)=g(x)]≤δ.
A linear functionf:Z2m→Z2 satisfies f(x+y)=f(x)+f(y) for all
x,y. (Over Z2, this is the same as a degree-1 polynomial, i.e. f(x)=a⋅x.)
C.2 The long proof: NP ⊆ PCP[O(n³), O(1)]
C.2.1 The linearity test (Blum–Luby–Rubinfeld) and self-correction
Lemma (closeness to linear). Let δ<31 and g:Z2m→Z2
with Prx,y[g(x+y)=g(x)+g(y)]≤δ/2. Then there is a linearf that is
δ-close to g.
The witness is the majority vote:
f(x):=the b∈Z2 for which yPr[g(x+y)−g(y)=b]≥21.
The proof has three moves: (1) f,g are δ-close (else the rarely-violated additivity
would be violated too often — contradiction); (2) the vote is overwhelming, pa:=Prx[f(a)=g(a+x)−g(x)]≥1−δ, shown by a two-term expansion
1−δ≤z∈Z2∑(xPr[g(x+a)−g(x)=z])2≤pa;
(3) linearity of f: for fixed a,b, applying p⋅≥1−δ three times gives
xPr[f(a)+f(b)+g(x)=f(a+b)+g(x)]≥1−3δ>0(δ<31),
and since the event f(a)+f(b)=f(a+b) does not depend on x, its probability is 0 or
1 — and being >0, it is 1. So f is linear. □
Program LT (linearity test). Repeat k=⌈2/δ⌉ times: pick random
x,y∈Z2m, and if g(x)+g(y)=g(x+y) return NO; else YES.
If g is linear ⇒ always YES.
If g is notδ-close to any linear function ⇒ Pr[NO]≥21.
Program SCF (self-correction). To read the true value f(x) from a corrupted table g
that is δ-close to linear f: pick random y and return g(x+y)−g(y).
Returns f(x) with probability ≥1−2δ (because both y and x+y are uniform, each
is a good point except with probability δ, and f linear ⇒ f(x)=f(x+y)−f(y)).
Why self-correction, not just “read g(x)”? Reading g(x) directly errs with
probability ≤δ — better than 2δ. But SCF randomizes the access: the
point actually queried, x+y, is uniformly random, so different corrected reads are
(nearly) independent. That independence is what lets us union-bound over several reads in the
consistency and satisfiability tests.
C.2.2 Arithmetization for the long proof
Turn 3-SAT φ into a degree-3 polynomial Pφ over Z2:
literal u↦pu=1−xu,¬u↦pu=xu,clause C=l1∨l2∨l3↦PC=pl1pl2pl3,φ=C1∧⋯∧Cm↦Pφ=i=1∑mPCi.
Now PC(a)=0 exactly when clause C is satisfied, so
φ(a)=1⇒Pφ(a)=0,
but the converse fails — Pφ(a) counts (mod 2) the parity of unsatisfied clauses, so
an even number of failures hides itself. Fix with a random combination: for r∈Z2m,
Pφr=i=1∑mriPCi.
Using the fact that for v=0, Prr[∑irivi=1]=21:
φ(a)=1⇒∀r:Pφr(a)=0;φ(a)=0⇒rPr[Pφr(a)=1]=21.
So a random r catches an unsatisfying assignment with probability 21. (Picking a
random inputa instead wouldn’t help — we’d have to test all a.)
The key structural theorem lets us evaluate any degree-3 polynomial using three linear
functions of the assignment:
Theorem. For a=(a1,…,an)∈Z2n there exist three linear functions
Aa:Z2n→Z2, Ba:Z2n2→Z2,
Ca:Z2n3→Z2, such that every degree-3 polynomial p over n
variables satisfies
p(a1,…,an)=αp+Aa(qp,1)+Ba(qp,2)+Ca(qp,3),
where αp and the index-vectors qp,i depend only on p and are polynomial-time
computable.
Here Aa(x)=∑iaixi evaluates linear terms, Ba(y)=∑i,jaiajyij the
quadratic terms, Ca(z)=∑i,j,kaiajakzijk the cubic terms; and qp,i is the
characteristic vector of which monomials appear in p. The clever part: Aa,Ba,Ca depend
only on the assignment a (so they can be pre-tabulated as the proof), while the query
vectors qp,i depend only on the polynomial p (so the verifier computes them itself).
C.2.3 The verifier (Π = three linear-function tables)
The proof is a concatenation Π=A′B′C′ where ∣A′∣=2n, ∣B′∣=2n2, ∣C′∣=2n3
— the full value-tables of Aa,Ba,Ca for the (claimed) satisfying a. The verifier runs
three checks:
Linearity (Program LT on each of A′,B′,C′): each is δ-close to some linear
function — else caught with probability ≥21.
Consistency (Program CT): even if all three are linear, they must come from the samea, i.e. b~(i−1)n+j=a~ia~j and
c~(i−1)n2+(j−1)n+k=a~ia~ja~k. CT picks random x,x′, uses
SCF to read a=A′(x), a′=A′(x′), b=B′(x∘x′) (where (x∘x′)(i−1)n+j=xixj′),
and checks a⋅a′=b; similarly checks A′⋅B′ vs C′. (SCF’s randomization is what
makes the three reads independent enough to bound the error.)
Lemma. For δ<241 there is a constant k so that if no single a
makes A′,B′,C′δ-close to the linear functions with coefficients
a,a∘a,a∘a∘a, then one of k runs of LT/CT returns NO with probability
≥1−δ.
Satisfiability (Program CSAT): pick random r∈Z2m, compute
αPφr and the query vectors, use SCF to read a=A′(q1), b=B′(q2),
c=C′(q3), and check whether α+a+b+c=1 (i.e. Pφr(a)=1, a violation). If
so return NO. An unsatisfying a is caught with probability ≥21 by the random r.
Each test uses O(n3) random bits (a 3-CNF has ≤n3 clauses) and O(1) queries; repeat
a constant number of times. Therefore
NP⊆PCP[O(n3),O(1)].
The proof is exponentially long (tables of size up to 2n3) — which is the drawback we
fix next.
C.3 The short proof: NP ⊆ PCP[O(log n), O(log⁴ n)]
The same three-part skeleton (testable encoding → arithmetize → assemble), but the linear
functions are replaced by low-degree polynomials over a larger field, which encode the same
information in polynomial length.
Parameters (worth memorizing the scale)
symbol
meaning
value
n
# Boolean variables
≥3
q
a prime
≈100⌈log4n⌉
F=Zq
finite field
$
H⊆F
subset ${0,\dots,
H
k
# variables of the polynomials
≈logn/loglogn
d
total degree
$O(k
Fd,k
k-variate polynomials of degree d
—
C.3.1 Why polynomials encode well — the agreement lemma
Lemma (Schwartz–Zippel-style). Two distinct polynomials in Fd,k agree on at
most dqk−1 of the qk points of Fk; equivalently a nonzero degree-d polynomial
has ≤dqk−1 roots.
So the agreement fraction is ≤d/q<21. Consequently a function that is
δ-close (for δ<41) to some low-degree polynomial is close to a unique
one: polynomials make good error-correcting codes.
Low-degree extension (the encoding). A satisfying assignment is a function
a:Hk→{0,1} (we use ∣Hk∣≥n, so k-tuples of H index the n bits). Its encoding
is the unique low-degree polynomial agreeing with it on Hk:
Theorem. For f:Ht→{0,1} there is a uniquepf∈Ft∣H∣,t with
pf(y)=f(y) for all y∈Ht, namely pf(x)=∑h∈HtSh(x)f(h), where the
selectorSh is 1 at h and 0 on the rest of Ht.
This encodes n bits as qk field elements — a polynomial blow-up (vs. 2n before).
A correct proof is exactly a low-degree polynomial encoding a satisfying assignment.
C.3.2 The low-degree test and its correction
A polynomial restricted to any lineℓb,s={b+st∣t∈F} is a univariate
degree-d polynomial — and conversely:
g∈Fd,k⟺∀b,s:gb,s(t)=g(b+st)∈Fd,1.
Program LDT. With an auxiliary line-tableT:F2k→Fd+1 supplying, for each
line, the coefficients of the best-fitting univariate degree-d polynomial Pb,s: repeat
⌈3/δ⌉ times — pick a random line (b,s) and random point t, and reject if
Pb,s(t)=g(b+st).
g∈Fd,k ⇒ a line-table makes LDT always accept.
g not δ-close to any degree-d polynomial ⇒ for every T, LDT rejects with
probability ≥43. (Relies on a deep but here-omitted theorem: high success rate on
random lines ⇒ globally close to a low-degree polynomial.)
Cost: O(klogq) random bits, O(1) queries to g and T.
Program CLDP (correction, the analogue of SCF): to read f(x), pick a random line through
x, check the table agrees at a random point, and return Px,s(0). It returns the true
f(x) with probability ≥1−2δ−d/q.
C.3.3 Arithmetization revisited — characteristic functions and zero-testers
As before, each clause becomes one of four degree-3 monomials p0,…,p3 (indexed by how
many variables are negated; assume negated variables first and indices increasing). Define
clause-characteristic functionsχφj:H3k→{0,1}:
χφj(i1,i2,i3)=1⟺φ has a type-j clause on ui1,ui2,ui3.
Then a satisfies φ iff for all j and all (i1,i2,i3),
fφj(i1,i2,i3)=χφj(i1,i2,i3)⋅pj(ai1,ai2,ai3)=0.
Replace χφj and pj by their low-degree extensions gφj. Satisfaction
becomes: gφj≡0 on all of H3k. Note χφj depends only on
φ, so the verifier can compute it — each query to gφj becomes 3 queries to
fa.
Zero-testers — turn “identically zero” into “a sum is zero.”
Lemma. There is a family R of q3k polynomials (zero-testers) in
F3k∣H∣,3k such that for any f:H3k→Fnot identically zero,
R∈RPr[∑h∈H3kR(h)f(h)=0]≤1003.
Constructible in time qO(k)=poly(n).
Idea: form g(t1,…,t3k)=∑hf(h)∏itihi; then g≡0⟺f≡0 on
H3k, and by the agreement lemma a nonzero g vanishes on ≤3∣H∣k/q<1003 of
F3k. Each Rb(x)=s(b,x) has ∑hRb(h)f(h)=g(b), so a random b (i.e. random
zero-tester) catches a nonzero f.
C.3.4 The sum-check (again!), and assembling the short verifier
Checking gφj≡0 now reduces to checking a single sum $\sum_{h\in H^{3k}}
R(h)g^j_\varphi(h)=0$, done by sum-check — the same peel-one-variable idea as Part A, but
now over the field F and the cube H3k. Define partial-sum polynomials
gi(x1,…,xi)=∑yi+1,…,y3k∈Hf(x1,…,xi,yi+1,…,y3k),
which satisfy gi(x1,…,xi)=∑x∈Hgi+1(x1,…,xi,x) and
∑hf(h)=∑x1∈Hg1(x1).
Program Sum-Check (with table T of the partial-sum polynomials): check $\sum_{x\in H}
g’1(x)=0$; then for i=2..3k, pick random ri∈F and check $\sum{x\in H}g’i(x)=
g’{i-1}(r_{i-1}); finally check $f(r_1,\dots,r_{3k})=g'_{3k}(r_{3k}).
correct f summing to 0 ⇒ accepts; nonzero sum ⇒ rejects with prob ≥43 (each
round a wrong partial polynomial is exposed at the random ri with prob ≥1−d/q, and the
lie propagates).
Cost: O(klogq) random bits, one value of f and 3k(d+1) rows of T.
The short verifier. Proof = the low-degree extension fa, its line-table Ta, and the
partial-sum tables T0,T1,T2,T3 (one per clause type, for the product with a zero-tester).
The verifier (1) runs LDT to check fa is close to a degree-≤d polynomial; (2) for each
j, picks a random zero-tester R and runs Sum-Check on R⋅gφj (substituting 3
queries to fa for each query to gφj, using CLDP to read corrected values).
Counting:
randomness: O(klogq)=O(logn);
queries: O(1) values of fa (length O(logq)=O(loglogn) each) + O(1) entries of
Ta (length O(k∣H∣logq)=O(log2n)) + O(log2n) rows of Tj (length
O(log2n)) ⇒O(log4n) bits total.
NP⊆PCP[O(logn),O(log4n)].
C.4 The composition lemma — getting both at once
We now have two verifiers: one with constant queries but polynomial randomness (long
proof), one with logarithmic randomness but polylog queries (short proof). Composition
plugs the first inside the second to inherit the good parameter from each.
Composition lemma (informal). If NP⊆PCP[O(r1),O(q1)]and
there is an (r2,q2)-normal-form verifier for 3-SAT, then
NP⊆PCP[O(r1(n)+r2(kq1(n))),O(q2(kq1(n)))],k constant.
Why a “normal form” is needed. The composed verifier wants to check “A1 would accept
after reading these d1 words of Π1” — but it must not read those words itself (that
would re-introduce the large query count). The escape: have a second verifier A2 check this,
where A2 has access to a split encoding of the proof (an encoding of each row read by
A1, not of the whole proof). A normal-form verifier is exactly one wired to operate on
such an encoding:
(r,q)-normal form (sketch). It has an (ℓ,k⋅q)-encoding schemeE
(codewords are tables, with minimum distance δmin, ℓ(n)≤2hr(n)), uses
exactly hr(n) random bits, reads exactly d rows (a constant) whose indices depend only on
the coins, and behaves as: if the c encoding-tables are codewords decoding to a satisfying
assignment ⇒ accepts w.p. 1; if some table is far (≥δmin/3) from any codeword
⇒ accepts w.p. <21; if all tables are close but decode to a non-satisfying assignment
⇒ accepts w.p. <21.
Proof idea of the lemma. Let A1 witness NP⊆PCP[O(r1),O(q1)]
(on input of length n, uses h1r1(n) coins, reads d1 words of length k1q1(n)). For
each random string r, let y1r,…,yd1r be the words A1 reads and define
L′={(y1,…,yd1)∣A1 accepts when it reads them}.A1 runs in polynomial time, so L′∈P; let ΦAL′ be the 3-CNF from
Cook–Levin for it. Because there is a normal-form verifier A2 for 3-SAT, we can attach to
each random string r a sub-proof Π2r that A2 accepts (with the encoded rows
E2(y1r),…,E2(yd1r) as oracle) iff (y1r,…,yd1r)∈L′. The composed
proof table has two parts: the Π2r’s (first part) and the E2-encodings of the rows of
Π1 (second part). Its dimensions multiply out to
ℓ(n)≤2⋅2h1r1(n)⋅2h2r2(k1q1(n)) rows.
The composed verifier A: simulate A1 with coins r to get the row indices; then simulate
A2 with coins r′, oracle the encoded rows + Π2r; accept iff A2 accepts. Total
randomness h1r1(n)+h2r2(k1q1(n)).
Completeness:φ∈ SAT ⇒ honest Π1 makes A1 accept always ⇒ for every r
the encoded rows + Π2r make A2 accept w.p. 1 ⇒ A accepts w.p. 1.
Soundness:φ∈/ SAT ⇒ decoding the second part gives a table Π′ with
Pr[A1 accepts Π′]<21, so A1 rejects w.p. >21. For a rejecting
r, the read rows ∈/L′, so A2 rejects w.p. >21. Hence
Pr[A rejects]≥Pr[A1 rej]⋅Pr[A2 rej]>41 — amplify
below 21. □
The five-step assembly (this is the actual proof of the theorem):
Composition lemma (above).
NP⊆PCP[O(poly(n)),O(1)] — the long proof (C.2), put in
normal form (a (poly(n),1)-normal-form verifier exists).
NP⊆PCP[O(logn),O(polylog(n))] — the short proof (C.3),
put in normal form (a (logn,polylog(n))-normal-form verifier exists).
Compose 1+3+3: NP⊆PCP[O(logn),O(polyloglog(n))], since
log(kpolylogn)=O(logn) and $\mathrm{polylog}(k,\mathrm{polylog},n)=
\mathrm{polyloglog}(n)$.
Compose 1+2+4: NP⊆PCP[O(logn+poly(kpolyloglogn)),O(1)], and since the randomness is still O(logn),
NP=PCP[O(logn),O(1)].
The punchline of composition. Step 4 shrinks queries from polylog to polyloglog while
keeping log randomness; step 5 shrinks them to constant at the cost of only O(logn)
extra randomness. Each composition “spends a little randomness to buy back a lot of queries,”
and the parameters were chosen so the randomness never escapes O(logn).
Part D — The payoff: inapproximability (exam-1 P4, exam-3 P4)
This is what the PCP theorem is for, and two practice exams ask it directly: approximating
the maximum independent set is NP-hard. The bridge is the FGLSS graph.
Theorem. There is a constant 0<ρ<1 such that, if P=NP, no
polynomial-time algorithm can, for every graph G, output an independent set of size
≥ρ⋅α(G) (where α(G) is the maximum independent-set size).
Construction. Take an NP-complete L and its PCP verifier V (r=O(logn) coins,
q=O(1) queries, completeness 1, soundness <21). Build a graph Hx:
Vertices = accepting local views: pairs (ρ,a) where ρ is a random string and
a is an assignment to the q proof bits V reads on ρ such that Vaccepts.
There are ≤2r⋅2q=poly(n) vertices (since r=O(logn), q=O(1)).
Edges connect conflicting views: (ρ,a) and (ρ′,a′) are adjacent if they are
inconsistent — they assign different values to some proof position they both query (also,
two views with the same ρ conflict, so an independent set picks ≤1 view per random
string).
Key facts.
A proof Π yields an independent set: for each ρ on which V accepts, take the view
(ρ,a) matching Π. These are mutually consistent (all agree with Π) ⇒ independent.
Its size = number of accepted random strings.
x∈L: the honest Π is accepted on all2r strings ⇒ α(Hx)≥2r.
x∈/L: any independent set is a set of mutually consistent accepting views, i.e. it
defines a partial proof accepted on each chosen ρ; soundness says no proof is accepted on
≥21 of strings ⇒ α(Hx)<2r/2.
So α(Hx) jumps by a factor 2 between yes- and no-instances. A polynomial-time
algorithm approximating α within a factor better than 2 would cross the gap and
decide L ⇒ P=NP. Repeating the verifier (or graph products) pushes the gap
to any constant, giving inapproximability within every constant ρ<1.
Exam framing. State the vertex set (ρ,q), define the conflict edges precisely, then
prove the two bounds: x∈L⇒α(Hx)≥2r (one consistent view per string)
and x∈/L⇒α(Hx)<2r/2 (soundness). Conclude that a ρ-approximation
separates the cases. Clique is the complement: α(G)=ω(Gˉ), so the same gap
proves MaxClique inapproximable.
Closing themes table
Theme
Where it appears
The one-line idea
Arithmetization
IP=PSPACE; both PCP proofs
Logic → polynomials; satisfiability → an algebraic identity.
Sum-check / peel-a-variable
#3SATD, TQBF, short PCP
Don’t compute the giant sum; make the prover open it one variable at a time, audit at a random point.
Random spot-check of a lie
sum-check, LT, LDT
Two distinct low-degree polynomials agree rarely ⇒ a random point exposes a wrong one.
Testability
linearity test, low-degree test
From O(1) samples, decide if a table is close to a (linear / low-degree) function.
Self-correction
SCF, CLDP
Recover a true value from a corrupted-but-close table — and randomize the access so reads are independent.
Encoding = error-correcting code
linear (long), low-degree (short)
A “proof” is a codeword; being wrong is being far from every codeword, hence locally visible.
Composition
final assembly
Spend a little randomness to buy back many queries; iterate to reach O(logn) coins, O(1) queries.
Gap = inapproximability
Part D, exams
PCP soundness <21 becomes a factor-2 gap in α(G)/Max-3-SAT ⇒ approximation is NP-hard.
**$
\Pi
\le q\cdot 2^r$**
Exam connections recap
exam-2 Problem 2 (PCP[21logn,c]⇒ P=NP): use ∣Π∣≤q⋅2r;
with r=21logn only O(n) proof bits matter and the verifier nearly
derandomizes — see §B.3.
exam-1 Problem 4 / exam-3 Problem 4 (independent-set hardness via PCP): the FGLSS graph
Hx with vertices = accepting views, conflict edges, and the 2r vs 2r/2 gap — see Part D.
Definitions to have ready: PCP[r,q] (completeness 1, soundness <21); IP (private
coins, completeness/soundness); the gap statement of the PCP theorem; the amplifying-reduction
equivalence (§B.4).