Randomness in the verifier: BPP low in the polynomial hierarchy (Sipser–Gács); a prover + coin-flipping verifier captures PSPACE (IP=PSPACE via arithmetization, SumCheck); and, made local, PCP.
Last updated 27 June 2026
Lecture 6 — Complexity Theory II: Interactive Proofs, IP=PSPACE, and PCP
Course 2-INF-135/15 Pravdepodobnostné algoritmy, LS 2025/26.
Source slides: RA_zlozitostII_tlac.pdf (34 pages) and
RA_slidy_IPaPSPACEPCPstart_tlac.pdf (38 pages).
Štátnicové syllabus topics covered here: the polynomial hierarchy; BPP inside
the hierarchy (Sipser–Gács BPP⊆Σ2p∩Π2p);
interactive proofs IP, public vs. private coins, Arthur–Merlin classes AM/MA;
graph non-isomorphism GNI∈AM[2] and the set–lower-bound
protocol; IP=PSPACE via arithmetization and SumCheck;
the PCP theorem NP=PCP[logn,O(1)], linearity testing,
self-correction, and inapproximability.
The one-paragraph map of the whole lecture
So far “randomness” lived inside the algorithm. This lecture puts randomness
inside a verifier and asks what a coin-flipping checker can be convinced of.
Three movements, each a famous theorem.
Where does BPP sit? A randomized decider with two-sided error is not obviously
anywhere in the classical hierarchy. Sipser–Gács pins it down: $\mathrm{BPP}
\subseteq \Sigma_2^p \cap \Pi_2^p$ — only two quantifier alternations above P.
The whole proof is one clever idea: a large set of random witnesses can be
shifted a few times to cover the entire cube, a small one never can.
What can a prover convince a randomized verifier of? If the prover is
all-powerful and the verifier flips coins and interacts, the answer is
astonishingly large: IP=PSPACE (Shamir). The engine is
arithmetization — turn a Boolean formula into a polynomial — plus the
SumCheck protocol, where the verifier pins down a giant exponential sum by
asking for one low-degree polynomial per variable and spot-checking it at a random
point. The same idea handles graph non-isomorphism cheaply ($\mathrm{GNI}\in
\mathrm{AM}$), which is evidence that graph isomorphism is not NP-complete.
How short and how local can a proof be? Shockingly local. The PCP theorem
says NP=PCP[O(logn),O(1)]: every NP statement has a proof you
can verify by flipping O(logn) coins and reading only a constant number of
bits. Its alter ego is the hardness of approximation: getting a good
approximation for Max-3-SAT (or Max-Clique / Independent Set) is as hard as solving
it exactly. We build the bottom layer by hand: linearity testing,
self-correction, and arithmetization give $\mathrm{NP}\subseteq
\mathrm{PCP}[O(n^3),O(1)]$.
The unifying thread: arithmetization + a random spot-check. Convert “is this
formula satisfied / how many ways” into “does this polynomial equal that value,” then
exploit the one magic fact about low-degree polynomials — two different degree-d
polynomials agree on at most d points, so a random point exposes any lie.
Part I — The polynomial hierarchy and BPP
1. The polynomial hierarchy (PH)
NP is “∃ a short witness, checkable in poly time.” coNP is “∀ short
witnesses…”. The polynomial hierarchy is what you get by stacking quantifier
alternations. Fix a poly-time machine M and a polynomial q.
In general L∈Σip if there is a poly-time M and polynomial q with
x∈L⟺∃u1∀u2∃u3⋯QiuiM(x,u1,…,ui)=1,
with i alternating quantifiers (the uj∈{0,1}q(∣x∣)), starting with ∃.
The class Πip=coΣip starts with ∀. Then
Σ1p=NP,Π1p=coNP,PH=i≥1⋃Σip.
Intuition. Think of a two-player game with a bounded number of moves.
“∃y∀z” is “I (the prover) make a move y; you (the refuter) reply
z; I win iff M accepts.” Σi = the existential player moves first and the
game lasts i rounds. PH measures how many rounds of this debate you need.
A concrete Σ2p statement worth keeping: “k is the size of the maximum
independent set.” “∃ an IS of size k” is plain NP. “k is the maximum”
needs a second quantifier: ∃ an IS of size k such that ∀ vertex sets
of size k+1, that set is not independent — an ∃∀, i.e. Σ2p
statement.
Punchline — the collapse principle. The hierarchy is believed to be strict
(infinitely many genuinely harder levels), but it is fragile from below:
Σip=Πip⇒PH=Σip(collapse to level i),P=NP⇒PH=P.
One coincidence anywhere makes everything above it cave in. “PH collapses” is
therefore the standard way to say “this would be a shocking coincidence” — and it
is exactly the currency we will pay in §6 (if GI were NP-complete, PH collapses).
2. Adleman & the target: where is BPP?
Two facts frame the question. First, the easy non-uniform bound (proved earlier in
the course):
Theorem (Adleman).BPP⊆P/poly.
i.e. with polynomial advice (a good random string hard-wired per input length),
randomness is free. But P/poly contains undecidable languages — it is too coarse to
say BPP is “almost P.” We want a uniform bound. The headline:
Theorem (Sipser–Gács–Lautemann).BPP⊆Σ2p∩Π2p.
So a two-sided-error randomized class sits just two alternations above P — strong
evidence BPP is genuinely low (and consistent with the belief BPP = P).
3. The Sipser–Gács proof — covering the cube by shifts
Let M be a BPP machine for L using m=p(n) random bits. First amplify the
success probability (run many times, majority vote) until the error is below 2−n:
x∈L⇒∣Sx∣≥(1−2−n)2m,x∈/L⇒∣Sx∣<2m−n,
where Sx={r∈{0,1}m:M(x,r)=1} is the set of accepting random strings.
So “x∈L” ≈ “Sx is almost everything”; “x∈/L” ≈ “Sx is a
tiny 2−n sliver.”
The trick is to detect “big vs. tiny” with two quantifiers using XOR-shifts.
For t∈{0,1}m let Sx⊕t={r⊕t:r∈Sx} — the set translated by
t (a bijection of the cube, so ∣Sx⊕t∣=∣Sx∣). Set k=⌈m/n⌉.
Claim.x∈L⟺∃t0,…,tk∈{0,1}m∀r∈{0,1}m:i=0⋁k[r∈Sx⊕ti] —
i.e. a few shifts of Sx cover the entire cube. Equivalently ∀r∃i:M(x,r⊕ti)=1.
This is literally a Σ2p formula (∃ shifts ∀r). Two directions:
If x∈/L (Sx tiny), no shifts can cover. A union of k+1 shifts has size
at most
i=0⋃k(Sx⊕ti)≤(k+1)∣Sx∣≤(1+⌈nm⌉)2m−n<2m
for n≥2 — strictly smaller than the cube. So for every choice of shifts some
r is missed; the ∀r clause fails. (This is the Π2 half: $x\notin L
\Rightarrow \forall t_0\dots t_k\ \exists r\ \forall i\ M(x,r\oplus t_i)=0$.)
If x∈L (Sx huge), random shifts cover w.h.p. Pick t0,…,tk
uniformly. For a fixed r,
Pr[r∈/Sx⊕ti]=Pr[r⊕ti∈/Sx]=1−2m∣Sx∣≤2−n,
and the ti are independent, so Pr[r uncovered by all i]≤2−n(k+1).
Union bound over the 2m values of r:
Pr[∃r uncovered]≤2m⋅2−n(k+1)=2m−n(k+1)<1,
since n(k+1)≥n(nm+1)=m+n>m. Probability of failure <1 means some
choice of shifts covers everything — the ∃ is satisfiable. ∎
Professor-pleaser — the one idea. The whole theorem is a set-size test with
quantifiers: a set that fills almost the whole cube can be translated k+1 times
to tile the cube; a set that is an exponentially small sliver provably cannot — its
k+1 copies don’t have enough total mass. “∃ shifts that cover” is a
Σ2 sentence, and because BPP is closed under complement we also get the Π2
sentence, hence BPP⊆Σ2p∩Π2p. The probabilistic method
(“failure probability <1 ⇒ a good object exists”) is doing the existential work — the
same move as everywhere else in the course, now used to populate a quantifier.
Part II — Interactive proofs
4. What an interactive proof is
A classical NP-proof is a static string the verifier reads once. An interactive
proof is a conversation: a (possibly cheating) proverP of unbounded
computational power tries to convince a probabilistic, polynomial-time verifierV
that x∈L. They exchange messages; the verifier has the last word.
The cast.V = “the examiner”: poly-time, flips private coins.
P = “the student / oracle”: unlimited power, does not see V’s random bits
(in the private-coin model). The verifier must be convincible by a truthful prover
and un-foolable by a lying one.
x∈L⇒∃P:rPr[V accepts in (V,P)]≥32(completeness),x∈/L⇒∀P:rPr[V accepts in (V,P)]<31(soundness).
IP = languages with such a protocol (poly many rounds). As always, the
32/31 gap can be amplified to 1−2−n/2−n by repetition.
Why this is more powerful than NP. In NP the prover commits to one fixed proof.
Here the verifier asks random, unpredictable questions: the prover would have to
have prepared a consistent answer to all of them at once, which a cheating prover
cannot. The randomness is the verifier’s leverage. (NP = IP with zero coins and
one message.)
5. Public vs. private coins; Arthur–Merlin
The protocol above uses private coins: P never learns r. A weaker-looking model
uses public coins — the verifier’s messages are its random bits, sent in the
clear. This is the Arthur–Merlin model (Arthur = the poor mortal king who can only
flip coins; Merlin = the all-knowing wizard/prover).
MA (“Merlin then Arthur”): Merlin sends a proof y, then Arthur
flips z and checks.
x∈L⇒∃yzPr[V(x,y,z)=1]≥32,x∈/L⇒∀yzPr[V(x,y,z)=1]<31.
AM=AM[2] (“Arthur then Merlin”): Arthur flips y and sends
it, Merlin replies z, Arthur checks deterministically.
x∈L⇒yPr[∃zV(x,y,z)=1]≥32,x∈/L⇒yPr[∀zV(x,y,z)=0w.h.p.].
Public coins look strictly weaker — surely hiding the coins helps the verifier? The
surprise:
Theorem (Goldwasser–Sipser).IP[k]⊆AM[k+2].
Private coins buy almost nothing: any private-coin protocol becomes a public-coin one
with two extra rounds.
The mechanism: instead of secretly tossing r and acting on it, Arthur tosses public
coins, Merlin is then asked to certify properties of those coins (e.g. “this random
hash hit the set”) without further use of hidden randomness. The set–lower-bound
protocol below is exactly this in action.
6. Graph Non-Isomorphism is in AM — the set lower-bound protocol
The poster child: GNI (given G1,G2, decide G1≅G2). GNI is in coNP
(a single isomorphism refutes “non-isomorphic”), but no short certificate of
non-isomorphism is known — yet it has a 2-message Arthur–Merlin proof.
Theorem.GNI∈AM[2].
The idea: count by hashing. Consider the set of “graphs reachable from the inputs
together with a witnessing automorphism”:
S={(H,π):H≅G1 or H≅G2,π∈aut(H)}.
For each input Gi, the number of distinct labelings H≅Gi is
n!/∣aut(Gi)∣, and each such H contributes ∣aut(H)∣=∣aut(Gi)∣
pairs — so Gi alone contributes exactly n! pairs. Therefore
G1≅G2⇒∣S∣=n!,G1≅G2⇒∣S∣=2⋅n!.Non-isomorphism doubles the set. If Arthur can tell “size n!” from “size 2n!”
with Merlin’s help, he’s done. That is the generic problem:
Set lower-bound problem.P,V both know a set S⊆{0,1}m (membership
in S is certifiable) and a threshold K. We want a protocol where
if ∣S∣≥K, the prover convinces V w.h.p.;
if ∣S∣≤K/2, V rejects w.h.p.
(Here K=2⋅n! vs. ∣S∣=n!=K/2.)
The protocol uses pairwise-independent (universal) hashing. Pick k with
2k−2<K≤2k−1 and a hash family H(m,k) of functions
h:{0,1}m→{0,1}k that is pairwise independent: for any x=x′, the pair
(h(x),h(x′)) is uniform on {0,1}k×{0,1}k.
Protocol (one round, public coin).
Arthur picks h∈RH(m,k) and y∈R{0,1}k, sends (h,y).
Merlin sends some x∈S with h(x)=y, plus a certificate that x∈S.
Arthur accepts iff the certificate checks and h(x)=y.
Arthur is asking: “does the random hash bucket y contain an element of S?” A big
S hits a random bucket; a small S usually misses.
Lemma. Let h∈H(m,k), S⊆{0,1}m with ∣S∣≤2k−1, and
p=∣S∣/2k. Then
p≥h,yPr[∃x∈S:h(x)=y]≥43p.
(Even pointwise: for every fixed y, Prh[∃x∈S:h(x)=y]≥43p.)
Proof of the lower bound (inclusion–exclusion / Bonferroni). Let Ex be the event
h(x)=y. Then Pr[Ex]=2−k and (pairwise independence) Pr[Ex∩Ex′]=2−2k.
By Bonferroni,
Pr[x∈S⋃Ex]≥x∈S∑Pr[Ex]−21x=x′∑Pr[Ex∩Ex′]=2k∣S∣−2122k∣S∣2=p−21p2≥43p,
using p≤21. The upper bound p is the plain union bound. ∎
So the acceptance probability is ≥43p when ∣S∣≥K and ≤p when
∣S∣≤K/2 (where the relevant p halves) — a constant multiplicative gap. With the
calibration p∗=K/2k, Arthur accepts iff the fraction of accepting repetitions is at
least 85p∗; Chernoff over a constant number of repetitions pushes the
gap to 32 vs. 31. ∎
Professor-pleaser. GNI has no known short classical certificate, yet a verifier
who can flip coins decides it in two messages — by reducing “are these graphs
non-isomorphic” to “is this set twice as big,” and deciding that by checking
whether a random hash bucket is occupied. This is the prototype of “interaction +
randomness > static proof.”
7. The structure of AM and MA
A run of small but important structural facts (state them; the proofs reuse the
Sipser–Gács shift trick).
Perfect completeness. Both MA and AM can be made to never reject a true
statement:
MA: x∈L⇒∃yzPr[V(x,y,z)=1]=1;AM: x∈L⇒yPr[∃zV(x,y,z)=1]=1.
The proof is exactly the covering-by-shifts argument of §3: amplify so accepting
random strings fill almost the cube, then let the prover supply k+1 shifts
t0,…,tk that cover it; Arthur checks he accepts on some r⊕ti.
Collapse of the hierarchy of rounds. Public-coin interaction with a constant
number of rounds gives nothing beyond two:
MA⊆AM,AM[k]=IP[k]=AM[2]=AM(k=O(1)).
(“MAM=AM, AMM=AM” — adjacent same-player moves merge,
and a leading Merlin can be swapped past an Arthur.) So for constant rounds there is
essentially one Arthur–Merlin class, AM.
Location in PH. Unwinding the quantifiers:
MA⊆Σ2p∩Π2p,AM⊆Π2p.
Sketch for MA ⊆Π2p vs. the matching Σ2 characterization: a perfectly
complete MA is “x∈L⇒∃m∀rV(x,m,r)=1” (that’s Σ2),
while “x∈/L⇒∀m∃rV(x,m,r)=0” gives the Π2 side.
AM is “x∈L⇒∀r∃m” / “x∈/L⇒∃r∀m”
— a Π2 pattern.
Theorem (Boppana–Håstad–Zachos). If coNP⊆AM, then
PH=Σ2p (the hierarchy collapses to the second level).
Idea. Since AM⊆Π2p, it suffices to show $\Sigma_2^p\subseteq
\mathrm{AM}$ under the hypothesis. Take L∈Σ2p, so $x\in L\iff\exists y,(x,y)\in
L’$ with L′∈Π1p=coNP. Build an MAM protocol: Merlin sends y, then
run the assumed AM protocol for the coNP statement (x,y)∈L′. Thus $L\in
\mathrm{MAM}=\mathrm{AM}, so $\Sigma_2^p\subseteq\mathrm{AM}\subseteq\Pi_2^p, forcing the
collapse. ∎
Corollary (evidence GI is not NP-complete). If GI∈NPC, then
PH=Σ2p.
Why: if GI were NP-complete, then its complement GNI would be coNP-complete;
since GNI∈AM (§6) and AM is closed appropriately, every coNP
language reduces into AM, i.e. coNP⊆AM, and
Boppana–Håstad–Zachos collapses PH. Almost nobody believes PH collapses — so almost
nobody believes GI is NP-complete. This is the precise sense in which “graph
isomorphism is probably not NP-complete,” and AM is the tool that says it.
Part III — IP = PSPACE
The crowning theorem of interactive proofs: an all-powerful prover and a coin-flipping
verifier can settle any problem solvable in polynomial space.
Theorem (Shamir 1990).IP=PSPACE.
Two inclusions.
8. The easy direction: IP ⊆ PSPACE
Given an IP protocol, we want to decide, in polynomial space, whether the best prover
makes V accept with probability ≥32. The interaction is a game tree: at
each prover move we maximize, at each verifier coin-flip we average. The verifier
uses r(n) private random bits and the prover sends messages of length m(n); both
polynomial. We can evaluate the optimal acceptance probability by recursively walking
this tree — ∀r∈{0,1}r(n), simulating the V–P communication for each
prover response m∈{0,1}m(n) — reusing space across branches. Polynomial space
suffices because the tree has polynomial depth and we never store a whole level. ∎
9. The hard direction: PSPACE ⊆ IP — arithmetization
We give an interactive protocol for a PSPACE-complete problem, TQBF (true fully
quantified Boolean formulas). Warm up on counting first.
9a. Arithmetization — Boolean formulas become polynomials
Replace logic by arithmetic over the integers (later reduced mod a prime):
¬x⇝(1−x),x∧y⇝x⋅y,x∨y⇝1−(1−x)(1−y).
A formula φ(x1,…,xn) with m clauses becomes a polynomial
Pφ(X1,…,Xn)=∏j≤mpj(X1,…,Xn) that agrees with φ on
{0,1}n:
φ(x1,…,xn)=1⟺Pφ(x1,…,xn)=1.
Example: φ=(x∨y∨z)∧(¬x∨y∨z)∧(x∨¬y∨z)
arithmetizes to
Pφ=(1−(1−X)(1−Y)(1−Z))(1−X(1−Y)(1−Z))(1−(1−X)Y(1−Z)).
The number of satisfying assignments of φ is then an exponential sum:
#φ=b1∈{0,1}∑⋯bn∈{0,1}∑Pφ(b1,…,bn).
So #3SATD={(φ,K):φ has exactly K satisfying assignments}
becomes: “∑bPφ(b)=K.” We will verify such a sum interactively.
9b. The SumCheck protocol — the heart of everything
We must convince a poly-time verifier that
K≡pb1∈{0,1}∑⋯bn∈{0,1}∑g(b1,…,bn),
where g is a polynomial of degree ≤d in each variable, computed mod a prime
p. The verifier cannot evaluate the 2n-term sum directly. Instead it peels one
variable at a time and trusts the prover for a single-variable polynomial, then
spot-checks at a random point.
SumCheck (prime p, per-variable degree d).
If n=1:V checks g(0)+g(1)=K and accepts/rejects.
If n≥2:V asks P for the univariate polynomial
h(X1)=b2,…,bn∈{0,1}∑g(X1,b2,…,bn).P sends a polynomial s(X1) (claiming s=h), with s(0)+s(1)=K.
Vrejects if s(0)+s(1)=K. Otherwise it picks a random a∈RGF(p)
and recurses, verifying
s(a)≡pb2,…,bn∈{0,1}∑g(a,b2,…,bn)
— a SumCheck on n−1 variables with new target K′=s(a).
Why it is sound (the magic fact). If the prover lied, s=h as polynomials.
Two distinct degree-≤d polynomials agree on at most d points, so a uniformly
random a has s(a)=h(a) with probability ≤d/p. Unless the verifier is unlucky,
the lie propagates into the recursive call (now the prover must defend a false
K′=s(a)=h(a)). Over n levels,
Pr[V rejects a false claim]≥(1−pd)n≥1−pnd,
which is overwhelming for a large enough prime p. The verifier never computes the big
sum; it only forces the prover to be consistent between each claimed polynomial and
a random evaluation of the next.
This already gives #3SATD∈IP — and #3SATD is
#P-hard, so interactive proofs already reach the counting hierarchy.
9c. TQBF ∈ IP — handling quantifiers
A TQBF instance B=∀x1∃x2∀x3⋯∃xnφ(x1,…,xn)
arithmetizes by turning quantifiers into sum and product over {0,1}:
∃⇝∑,∀⇝∏,x∧y⇝xy,x∨y⇝x+y,¬x⇝(1−x).
Then
B∈TQBF⟺A=b1∏b2∑⋯bn∑Pφ(b1,…,bn)=0.
The protocol mirrors SumCheck, but a quantifier value is now defended by a univariate
polynomial g(z) with g(0)Jg(1)=K, where J=+ for an ∃ (∑) and
J=⋅ for a ∀ (∏); after checking, the verifier substitutes a random
a and recurses on the inner expression. Two technical obstacles must be handled —
they are the real content of the proof.
(i) The numbers are astronomically large. A closed QBF of size n can have
arithmetization value as big as O(22n) — because each ∀ (a product) can
square the magnitude. (E.g. ∏z1⋯∏zn(z1+⋯+zn) produces a
polynomial of degree 2n−1.) Fix: work modulo a prime p of polynomial bit-length.
We need A≡p0⟺B true, i.e. a prime that does not divide A. Since
A=O(22n) has at most ∼2n prime factors, and there are plenty of poly-length
primes, the prover can exhibit a prime p (with a primality certificate) for which
A≡p0. (If p1⋯pm all divided A then ∏pi=Ω(22nd)
would exceed A=O(22n) — impossible.)
(ii) The degree blows up. Products of quantifiers raise the polynomial’s degree
exponentially, and SumCheck needs low degree. Fix: make the QBF “simple.”
Simple QBF: between a variable and its own quantifier there is at most one∀ in between. Any QBF can be converted to a simple one with only polynomial
size growth, by re-introducing each variable as a fresh copy after each ∀ it
must “survive”:
…x∀yQ⇝…x…∀y∃x1(x1=x)∧Q,(xi=xj)⇝zizj+(1−zi)(1−zj).Key consequence: if B is simple, the degree of the polynomial describing the
“functional form” grows only linearly in ∣B∣ — so SumCheck stays efficient.
Correctness. With B simple, the degree t of the functional form is linear in
∣B∣, and the per-round error d/p accumulates over the rounds, giving
B false⇒Pr[V accepts]≤ppoly(∣B∣),
negligible for the chosen poly-length prime p. Combined with $\mathrm{IP}\subseteq
\mathrm{PSPACE}$ and the PSPACE-completeness of TQBF:
IP=PSPACE
A worked micro-example (from the slides). For
B=∀x1(¬x1∨∃x2∀x3(x1∧x2∨x3)) the
arithmetization is
A=z1∏[(1−z1)+A′z2∑z3∏(z1z2+z3)],K≡pA,K=2.
Each round: the prover sends a low-degree g(z) with g(0)Jg(1)=K (e.g.
g(z1)=z12+1 giving g(0)⋅g(1)=1⋅2=2=K ✓), the verifier checks it,
substitutes a random z1=a, updates K← (the value forced for that branch),
and recurses on the inner sum/product — peeling z2 (an ∃, so use “+”), then
z3 (a ∀, so use “·”), until no quantifiers remain.
Professor-pleaser — the whole arithmetization philosophy. A Boolean formula is a
brittle yes/no object; its polynomial lift is a rigid algebraic object that
cannot lie locally. Replace “does this formula hold” with “does this polynomial sum
to K mod p,” and the single fact “a nonzero low-degree polynomial has few roots”
turns one random evaluation into an avalanche of confidence. SumCheck is this fact
deployed n times. This same lift powers the PCP theorem next.
Part IV — Probabilistically Checkable Proofs (PCP)
10. The PCP model
Now make the verifier local: it does not read the whole proof, only a few bits of
it, chosen using a few random bits.
Definition.L∈PCP[r(n),q(n)] if there is a probabilistic poly-time
verifier V with oracle access to a proof string Π that
uses r(∣x∣)random bits and reads q(∣x∣)bits of Π (efficiency);
x∈L⇒∃Π:Prr[VΠ(x,r)=1]=1 (completeness, perfect);
x∈/L⇒∀Π:Prr[VΠ(x,r)=1]<21 (soundness).
A tiny PCP for GNI (to fix the picture). Let the proof be a giant table
Π(H)∈{0,1} indexed by all n-vertex graphs, intended to say “which input is
H isomorphic to.” V picks b∈R{0,1} and a random permutation τ, forms
H=τ(Gb), reads the single bit Π(H), and checks Π(H)=b. If $G_0\not\cong
G_1$, an honest table answers correctly every time. If G0≅G1, the graph H
could equally have come from either input, so the table is wrong with probability
≥21. (Reads one bit!)
Every NP language has proofs that a verifier checks by tossing O(logn) coins and
reading a constant number of bits — yet a false statement is caught with probability
≥21. Two readings, both fundamental.
Face 1 — locally checkable proofs. There exist robust proof formats: errors are
“spread out” so that inspecting O(1) random symbols already exposes any flaw. A correct
proof passes always; a proof of a false statement fails on a constant fraction of the
random checks.
Face 2 — hardness of approximation. This is the exam-relevant face.
Theorem (gap form). There is a constant ρ<1 such that for every L∈NP
there is a poly-time f mapping inputs to 3-CNF formulas with
x∈L⇒val(f(x))=1,x∈/L⇒val(f(x))<ρ,
where val = max fraction of simultaneously satisfiable clauses.
Corollary. There is ρ<1 such that a polynomial-time ρ-approximation for
Max-3-SAT implies P=NP. Consequently (unless P = NP):
Max-3-SAT∈/PTAS,MaxClique∈/PTAS,Independent Set is hard to approximate.
Intuition for “gap = inapproximability.” The reduction creates a promise gap:
either all clauses are satisfiable, or no assignment beats ρ. An approximation
algorithm that always got within a factor better than ρ could tell these two cases
apart — and that decides the original NP problem exactly. No gap-crossing algorithm
can exist unless P = NP. This is the standard route to Independent Set is hard to
approximate asked on the exams.
12. Basic PCP containments
Read these as “the model is robust and the constants are tunable”:
PSPACE⊆PCP[poly,poly] — immediate from
IP=PSPACE.
PCP[r(n),q(n)]⊆NTIME(2O(r(n))⋅q(n)) — the
proof has length ≤q(n)⋅2r(n) (only that many bits are ever queried), so a
nondeterministic machine can guess it. In particular $\mathrm{PCP}[\log n,1]\subseteq
\mathrm{NP}$ and PCP[logn,poly]=NP.
Soundness amplifies: repeating the verifier c times drops soundness error to
1/2c.
We assume a non-adaptive verifier (all queried positions fixed up front as a
function of the random string); for constant query count adaptive = non-adaptive.
13. PCP ⇔ gap-amplifying reductions
The bridge between “local proofs” and “inapproximability” is a single equivalence.
Definition (gap-amplifying / c-zosilňujúca reduction). For c<1, a poly-time
f on 3-CNF formulas such that
φ∈SAT⇒f(φ)∈SAT(maxSAT(f(φ))=1),φ∈/SAT⇒∀α:f(φ) satisfies ≤c-fraction of clauses(maxSAT(f(φ))<c).
It manufactures a gap where there was none.
Lemma.NP⊆PCP[logn,1]⟺ 3SAT has a gap-amplifying
reduction.
(⇐) gap reduction ⇒ local verifier. Given f, the verifier
on input φ uses the proof Π = a satisfying assignment of f(φ). It
picks a random clause of f(φ) (its three variable indices i,j,k need
O(logn) random bits), reads the 3 bitsΠ(i),Π(j),Π(k), and checks the
clause. If φ∈SAT, f(φ) is satisfiable, so an honest Π
passes always. If φ∈/SAT, every assignment leaves ≥(1−c) of the
clauses unsatisfied, so a random clause rejects with probability ≥1−c — amplify to
21. (O(logn) coins, 3 queries. ✓)
(⇒) local verifier ⇒ gap reduction. Take V for SAT using
clogn random bits and t queries. For each random string r∈{0,1}clogn
(there are only polynomially many), determine the queried positions i1,…,it and
the predicate “V accepts,” build a CNF φr′(xi1,…,xit) that is true
iff V(φ,r,⋅) accepts, convert it to 3-CNF φr with auxiliary variables,
and set
f(φ):=r∈{0,1}clogn⋀φr.
If φ∈SAT then (completeness) all φr are satisfiable
simultaneously, so f(φ)∈SAT. If φ∈/SAT then
(soundness) every assignment α has Prr[φr(α)=0]≥21; with
t′=maxr{#clauses in φr}, at least a d=1/(2t′) fraction of all
clauses of f(φ) are unsatisfied, so at most (1−d) are satisfied — a constant gap
c>1−d. ∎
Punchline.“Locally checkable proof” and “gap reduction” are literally the same
object viewed two ways: the verifier’s accepting condition on a random check is a
clause, and “caught with constant probability” is “constant fraction of clauses
violated.” This is why the PCP theorem and inapproximability are one statement.
14. Building the bottom layer by hand: NP ⊆ PCP[O(n³), O(1)]
The full PCP theorem composes three pieces:
Exponentially long proof, O(1) queries — via arithmetization (this section).
Polynomially long proof, polylog queries — via low-degree polynomial equality
tests.
A composition lemma stitching (1) into (2) to reach O(logn) coins, O(1)
queries.
We construct step 1: a constant-query verifier for 3-SAT with an exponential proof. The
tools are linear functions and their testability.
14a. δ-close functions, linear functions
For finite D,R and f,g:D→R, write Prx∈D{P(x)}=∣{x:P(x)}∣/∣D∣. Then
f,g are δ-close if
x∈DPr[f(x)=g(x)]≤δ.
A function f:Z2m→Z2 is linear if f(x+y)=f(x)+f(y) for all
x,y (equivalently f(x)=∑iaixi for some coefficient vector a).
Lemma (Blum–Luby–Rubinfeld). Let δ<31 and suppose
g:Z2m→Z2 satisfies
Prx,y[g(x+y)=g(x)+g(y)]≤δ/2. Then there is a linearf that is
δ-close to g, namely the “plurality vote”
f(x):=the b for which yPr[g(x+y)−g(y)=b]≥21.
The proof has three beats: (1)f,g are δ-close (else the linearity defect
would exceed δ/2, contradiction); (2) the vote is overwhelming,
pa:=Prx[f(a)=g(a+x)−g(x)]≥1−δ (bootstrapped from ≥21 using a
pairing/second-moment argument 1−δ≤pa2+(1−pa)2≤pa); (3)f is
linear, because for fixed a,b,
xPr[f(a)+f(b)+g(x)=f(a+b)+g(x)]≥1−3δ>0,
and that probability does not depend on x, so it is 0 or 1 — hence 1, i.e.
f(a)+f(b)=f(a+b).
14b. Two programs: Linearity Test and Self-Correction
Linearity Test (LT). Input δ<31, oracle g. Repeat k=⌈2/δ⌉
times: pick x,y∈RZ2m; if g(x)+g(y)=g(x+y) return NO. If all pass,
return YES.
g linear⇒YES;g not δ-close to linear⇒Pr[NO]≥21.
Self-Correcting (SCF). Input x; oracle g that is δ-close to a linear
f. Pick y∈RZ2m and return g(x+y)−g(y).
Pr[SCF(x)=f(x)]≥1−2δ.Why: both g(x+y)=f(x+y) and g(y)=f(y) have probability ≤δ (each of
x+y and y is uniform), and f linear gives f(x+y)−f(y)=f(x); union bound.
Intuition. A table that is mostly a linear function can be read reliably at any
single point by averaging over a random “detour” y — even at points where the table
is corrupted. The corruption is diluted because x+y and y are each individually
uniform. Self-correction is what lets a verifier trust an untrusted, slightly-wrong
table by reading just two of its entries.
14c. Arithmetizing 3-SAT over Z2, and the proof format
A different arithmetization, tuned for linearity. For a literal: u↦pu=1−xu,
¬u↦pu=xu (so pliteral=0 exactly when the literal is true).
A clause C=l1∨l2∨l3↦PC=pl1pl2pl3 (degree 3; PC=0 iff
C is satisfied). A formula Φ=C1∧⋯∧Cm is satisfied by a iff
allPCi(a)=0.
To test “all =0” with one random check, use:
Fact. For v∈Z2n, v=0: Prr[∑irivi=1]=21.
So take a random combination Pr,Φ=∑iriPCi. If a satisfies Φ,
then Pr,Φ(a)=0 for allr; if a fails some clause, $\Pr_r[P_{r,\Phi}(a)=1]
=\tfrac12$. (Choosing the random combination is essential — testing a fixed PΦ would
require checking all 2n assignments.)
Now the punchline that yields O(1) queries: Pr,Φ(a) is a polynomial of
degree ≤3 in a, so it expands as
p(a1,…,an)=α+i∈I1∑ai+(i,j)∈I2∑aiaj+(i,j,k)∈I3∑aiajak,
and each of these three sums is the value of a linear function evaluated at a fixed
“characteristic” point:
Aa(x)=i∑aixi,Ba(y)=i,j∑aiajyij,Ca(z)=i,j,k∑aiajakzijk,
linear on Z2n,Z2n2,Z2n3 respectively. Then
p(a)=α+Aa(q1)+Ba(q2)+Ca(q3),
where q1,q2,q3 are the characteristic vectors of the index sets I1,I2,I3.
Evaluating the clause-polynomial = reading three table entries — a constant!
The proof Π. A purported satisfying assignment a is encoded as the
concatenation of the three full truth-tables
Π∼A′∥B′∥C′,∣A′∣=2n,∣B′∣=2n2,∣C′∣=2n3
— exponentially long, but only O(1) entries are ever read. The verifier must
guard against a cheating proof in two ways: the tables might not be linear, and even if
each is close to some linear function, those functions might be inconsistent
(e.g. B not encoding the pairwise products of A’s coefficients).
14d. The verifier: LT + Consistency + Satisfiability
Three sub-tests, each O(1) queries, run with self-correction (SCF) so every read is
reliable:
Linearity (LT). Test that A′,B′,C′ are each δ-close to linear; if not, NO
with probability ≥21 (so we may assume genuine linear $\widetilde A,\widetilde
B,\widetilde C$ with coefficient vectors $\widetilde a,\widetilde a\circ\widetilde a,
\widetilde a\circ\widetilde a\circ\widetilde a$).
Consistency (CT). Check the tables describe the samea and that B,C
really hold the products: pick random x,x′, compute a=SCF(x,A′),
a′=SCF(x′,A′), b=SCF(x∘x′,B′) (where
(x∘x′)(i−1)n+j=xixj′); reject if a⋅a′=b. Similarly tie A,B to
C. This enforces aiaj=b(i−1)n+j and
aiajak=c(i−1)n2+(j−1)n+k.
Satisfiability (CSAT). Pick random r∈{0,1}m, compute the coefficients
α,I1,I2,I3 of Pr,Φ and their characteristic points; read
a=SCF(q1,A′), b=SCF(q2,B′), c=SCF(q3,C′); if
α+a+b+c=1 return NO (a violated clause was exposed), else YES.
Theorem. For δ<241 there is a constant number k of calls to LT and
CT such that, if no single a makes A′,B′,C′ jointly δ-close to the
linear functions with coefficients $\widetilde a,\widetilde a\circ\widetilde a,
\widetilde a\circ\widetilde a\circ\widetilde a, then with probability $\ge 1-\delta at
least one call returns NO. Hence
3-SAT∈PCP[O(n3),O(1)],soNP⊆PCP[O(n3),O(1)].
Randomness inside the verifier.BPP is low: Sipser–Gács shows
BPP⊆Σ2p∩Π2p because a near-full set of accepting random
strings can be shifted a few times to cover the cube while a tiny one cannot — a
two-quantifier size test. Interaction + coins beats static proofs: a coin-flipping
verifier decides GNI in two Arthur–Merlin messages by reducing non-isomorphism to
“is this set twice as big,” checked by a pairwise-independent hash hitting a random
bucket; the same logic (coNP⊆AM would collapse PH) says
GI is probably not NP-complete. With an all-powerful prover the reach is all of
PSPACE: IP=PSPACE via arithmetization (formula →
polynomial) and the SumCheck protocol, whose soundness is the single fact a
low-degree polynomial has few roots, so a random evaluation exposes any lie (with
mod-p arithmetic and “simple QBF” taming the size and degree). Made local, the same
algebra gives the PCP theorem NP=PCP[O(logn),O(1)]: proofs
checkable by O(1) random bit-reads, equivalently gap-amplifying reductions, hence
Max-3-SAT / Independent Set are hard to approximate unless P = NP. The bottom layer
is built by hand from linearity testing, self-correction, and a Z2
arithmetization giving NP⊆PCP[O(n3),O(1)].
arithmetize; SumCheck pins an exponential sum via one poly per variable
SumCheck soundness
distinct degree-d polys agree on ≤d points ⇒ random eval catches lies
TQBF ∈ IP
∃→∑,∀→∏; mod-p + “simple QBF” tame value & degree
PCP[r,q]
local verifier: r coins, q bit-reads; perfect completeness, soundness <21
PCP theorem
NP=PCP[O(logn),O(1)]: two faces — local proofs & inapproximability
Gap reduction
φ∈SAT ⇒ all clauses; φ∈/SAT ⇒<c-fraction; ≡PCP[log,1]
Linearity test / SCF
mostly-linear table is testable and self-correctable with O(1) reads
NP ⊆ PCP[n³,O(1)]
encode assignment as 3 linear tables A,B,C; LT + consistency + one random identity
Connections / threads to drill
Arithmetization is the through-line. Boolean → polynomial appears twice: globally
for SumCheck/IP=PSPACE (one polynomial per variable, random evaluation mod p) and
locally for PCP (three linear tables, random algebraic identity). The shared lemma is
“a nonzero low-degree polynomial has few roots.” Be able to state it and say where each
use deploys it.
PCP → Independent Set inapproximability is a recurring exam question (exam-1 Q4,
exam-3 Q4). Drill the chain: PCP theorem ⇒ gap version of Max-3-SAT
⇒ (via the standard FGLSS-style reduction) a graph where x∈L gives a
large independent set and x∈/L only a ρ-fraction one ⇒ a
c-approximation for IS would cross the gap and decide an NP-complete problem.
The set–lower-bound protocol (GNI ∈ AM) is the cleanest place to use
pairwise-independent hashing — ties back to Lecture 5’s universal hashing and the
general “estimate a set size by hashing into buckets” move.
“PH collapses” as a hardness disclaimer.coNP⊆AM,
P=NP, Σi=Πi — each forces a collapse and is therefore the
formal way to say “this would be a shock.” GI-not-NP-complete is the showcase.
Sipser–Gács reuses the probabilistic method (“failure probability <1 ⇒ good shifts
exist”) and the covering-by-shifts trick recurs in the perfect-completeness proofs
for MA/AM — same engine, three appearances.
[ ] Be ready to run SumCheck end-to-end on a 2–3 variable example and quote the
soundness 1−nd/p.
[ ] Be ready to state both faces of the PCP theorem and prove the
PCP[logn,1]⇔ gap-reduction equivalence (at least the easy
⇐ direction).
[ ] Be ready to explain self-correction (why reading two entries recovers a
corrupted table value) and why the proof needs three tables A,B,C plus a
consistency test.