Main

Lecture 7: Interactive Proofs & PCP Theorem

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)].\mathrm{NP} = \mathrm{PCP}[\,O(\log n),\,O(1)\,].
Every NP statement has a (polynomially long) written proof that a verifier can check by tossing O(logn)O(\log n) coins and reading only a constant number of its bits — yet still catch any false “proof” with probability 12\ge \tfrac12. 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 PP) trying to convince a teacher (the verifier VV) that “xLx \in L.” It is an exam by conversation: they exchange messages, and the teacher has the last word.

The pair (P,V)(P,V) is an interactive protocol for LL if:

xL    P: Pr[V(P,x)=1]=1(completeness)x \in L \;\Rightarrow\; \exists P:\ \Pr[\,V(P,x)=1\,]=1 \qquad\text{(completeness)}
xL    P: Pr[V(P,x)=1]12(soundness)x \notin L \;\Rightarrow\; \forall P:\ \Pr[\,V(P,x)=1\,]\le \tfrac12 \qquad\text{(soundness)}

Intuition. If the statement is true, some honest prover convinces VV every time. If it is false, then no prover — however clever or malicious — fools VV more than half the time; any false “proof” gets caught by VV’s coins with probability 12\ge\tfrac12. The private coins are the teacher’s secret: the student must commit to answers before learning what the teacher will check.

IP\mathrm{IP} is the class of languages with such a protocol. The 12\tfrac12 is cosmetic — repeat and take majority to push the error to 2k2^{-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)r(n) random bits and the prover sends messages of length m(n)m(n). We want to know:

r m: V(r)(P(m),x)=1?\forall r\ \exists m:\ V^{(r)}(P(m),x)=1?
More precisely, the optimal prover maximizes VV’s acceptance probability, and that maximum is
maxprover strategy Prr[V accepts].\max_{\text{prover strategy}} \ \Pr_r[\,V \text{ accepts}\,].
Polynomial space suffices to recurse over all message sequences m{0,1}m(n)m\in\{0,1\}^{m(n)} and average over all coin sequences r{0,1}r(n)r\in\{0,1\}^{r(n)} — exponentially many, but explored one branch at a time, reusing space. So IPPSPACE\mathrm{IP}\subseteq\mathrm{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=x1x2x3xnΦ(x1,,xn).B=\forall x_1\,\exists x_2\,\forall x_3\cdots\exists x_n\,\Phi(x_1,\dots,x_n).
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_D \in IP

Arithmetize a Boolean formula φ\varphi — translate logic into a polynomial PφP_\varphi over the integers (working mod a prime later):

¬x(1x),xyxy,xy1(1x)(1y).\neg x \rightsquigarrow (1-x),\qquad x\wedge y \rightsquigarrow x\cdot y,\qquad x\vee y \rightsquigarrow 1-(1-x)(1-y).
For a 3-CNF φ\varphi with mm clauses, Pφ(X1,,Xn)=jmpj(X1,,Xn)P_\varphi(X_1,\dots,X_n)=\prod_{j\le m}p_j(X_1,\dots,X_n), and crucially
φ(x1,,xn)=1    Pφ(X1,,Xn)=1on 0/1 inputs.\varphi(x_1,\dots,x_n)=1 \iff P_\varphi(X_1,\dots,X_n)=1 \quad\text{on }0/1\text{ inputs.}

Example. φ=(xyz)(¬xyz)(x¬yz)\varphi=(x\vee y\vee z)\wedge(\neg x\vee y\vee z)\wedge(x\vee\neg y\vee z) gives Pφ=(1(1X)(1Y)(1Z))(1X(1Y)(1Z))(1(1X)Y(1Z)).P_\varphi=(1-(1-X)(1-Y)(1-Z))(1-X(1-Y)(1-Z))(1-(1-X)Y(1-Z)).

Now #3SATD_D ={(Φ,K)Φ=\{(\Phi,K)\mid \Phi is a 3-CNF with exactly KK 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).\#\Phi=\sum_{b_1\in\{0,1\}}\cdots\sum_{b_n\in\{0,1\}}P_\Phi(b_1,\dots,b_n).
So (Φ,K)(\Phi,K)\in #3SATD_D iff this sum equals KK. The verifier cannot compute a sum over 2n2^n 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)g(X_1,\dots,X_n) of total degree dd, an integer KK, a prime pp. We want to verify

Kpb1{0,1}bn{0,1}g(b1,,bn).K \equiv_p \sum_{b_1\in\{0,1\}}\cdots\sum_{b_n\in\{0,1\}} g(b_1,\dots,b_n).

The verifier “peels one variable at a time”:

Why this is sound — the punchline. Suppose the prover lied, shs\ne h. Two non-equal univariate polynomials of degree d\le d over GF(p)\mathrm{GF}(p) agree on at most dd points, so a random aa has s(a)h(a)s(a)\ne h(a) with probability 1d/p\ge 1-d/p. But if s(a)h(a)s(a)\ne h(a), the prover is now stuck having to prove a new false statement about g(a,)g(a,\cdot) — the lie is pushed down one level, never erased. Over nn rounds,

Pr[V rejects a false claim](1dp)n1ndp,\Pr[V \text{ rejects a false claim}] \ge \Big(1-\tfrac{d}{p}\Big)^{n}\ge 1-\tfrac{nd}{p},
which is close to 11 once pp is a polynomially long prime. The prover’s only escape would be to guess VV’s random aa 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=x1x2ΦB=\forall x_1\exists x_2\cdots\Phi, arithmetize quantifiers too: negation only on variables (¬x1x\neg x\rightsquigarrow 1-x), then

,+,,.\wedge\rightsquigarrow \cdot,\quad \vee\rightsquigarrow +,\quad \exists\rightsquigarrow\textstyle\sum,\quad \forall\rightsquigarrow\textstyle\prod.
Then BB is true iff its arithmetization
A=b1b2bnPΦ(b1,,bn)  0,A=\prod_{b_1}\sum_{b_2}\cdots\sum_{b_n} P_\Phi(b_1,\dots,b_n)\ \ne\ 0,
and we run a sum-check-style protocol (now mixing \sum for \exists and \prod for \forall), peeling the leftmost quantifier each round, turning the bound variable into a free one and sending a univariate polynomial g(z)g(z) with g(0)Jg(1)=Kg(0)\,J\,g(1)=K, where J{+,}J\in\{+,\cdot\} is the operator being peeled.

Two things can go wrong, and the fixes are the examinable insight:

  1. The numbers explode. A product of nn factors can reach value O(22n)O(2^{2^n}) — doubly exponential, too big to send. Fix: work modulo a prime pp of polynomial bit-length. Such a pp exists with A̸p0    BA\not\equiv_p 0 \iff B true: if primes p1,,pmp_1,\dots,p_m each divided AA then their product would divide AA, but p1pm=Ω(22nd)p_1\cdots p_m=\Omega(2^{2^n d}) while A=O(22n)A=O(2^{2^n}) — a contradiction once we take enough primes. The prover sends pp together with a certificate of primality.
  2. The degree explodes. Each \prod over a variable can double the degree of remaining polynomials, so after many \forall’s the univariate messages would have exponential degree. Fix: put BB into “simple” form — between any variable and its own quantifier there is at most one \forall. Any QBF can be transformed to simple form with only polynomial growth (re-introduce a fresh copy xixjix_i\rightsquigarrow x_{j_i} after each \forall, enforcing equality xi=xjzizj+(1zi)(1zj)x_i=x_j \rightsquigarrow z_iz_j+(1-z_i)(1-z_j)). For a simple QBF, the degree of the functional-form polynomial grows only linearly in B|B|, so all messages stay polynomial.

Correctness bound. If BB is false, the verifier accepts with probability at most t/pt/p, where tt is the degree of the functional form (linear in B|B|). Polynomial tt, polynomially-long prime pp ⇒ negligible error. Hence PSPACEIP\mathrm{PSPACE}\subseteq\mathrm{IP}, and combined with A.2,

 IP=PSPACE. \boxed{\ \mathrm{IP}=\mathrm{PSPACE}.\ }

This matters for PCP because it immediately gives one boundary point of the PCP world: PSPACEPCP[poly,poly]\mathrm{PSPACE}\subseteq\mathrm{PCP}[\mathrm{poly},\mathrm{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 Π\Pi once, and the verifier gets random access to it (an oracle) but only peeks at a few bits.

LPCP[r(n),q(n)]L\in\mathrm{PCP}[r(n),q(n)] if there is a probabilistic polynomial-time verifier VV that, on input xx, uses r(x)r(|x|) random bits and reads q(x)q(|x|) bits of a proof Π\Pi, with

xLπ: Prr[V(x,r)=1]=1(completeness),x\in L \Rightarrow \exists\pi:\ \Pr_r[V(x,r)=1]=1 \quad\text{(completeness)},
xLπ: Prr[V(x,r)=1]<12(soundness).x\notin L \Rightarrow \forall\pi:\ \Pr_r[V(x,r)=1]<\tfrac12 \quad\text{(soundness)}.

The two parameters are randomness rr and query complexity qq — 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 nn-vertex graphs G0,G1G_0,G_1 and want to be convinced they are not isomorphic. The proof Π\Pi is a giant table: for every nn-vertex graph HH, Π(H)\Pi(H) records which of G0,G1G_0,G_1 it is isomorphic to (if any):

Π(H)=iif HGi.\Pi(H)=i \quad\text{if } H\cong G_i.
The verifier: pick bR{0,1}b\in_R\{0,1\}, a random permutation τ\tau, form H=τ(Gb)H=\tau(G_b) (a random relabelling of GbG_b), and check Π(H)=b\Pi(H)=b.

Why it works. If G0≇G1G_0\not\cong G_1, an honest table answers correctly and VV always accepts. If G0G1G_0\cong G_1, then H=τ(Gb)H=\tau(G_b) is isomorphic to both, so its scrambled form leaks no information about which bb was used — any table is right with probability exactly 12\tfrac12. The randomness hides bb; the verifier reads a single table entry.

B.2 The theorem and its two readings

 NP=PCP[O(logn),O(1)]. \boxed{\ \mathrm{NP}=\mathrm{PCP}[\,O(\log n),\,O(1)\,].\ }

Reading 1 — locally checkable proofs. Every NP statement has a polynomial-length proof that can be verified by tossing O(logn)O(\log n) 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\rho<1 such that for every LNPL\in\mathrm{NP} there is a polynomial-time ff mapping instances to 3-CNF formulas with

xLval(f(x))=1,xLval(f(x))<ρ,x\in L \Rightarrow \mathrm{val}(f(x))=1, \qquad x\notin L \Rightarrow \mathrm{val}(f(x))<\rho,
where val\mathrm{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 ρ\rho-fraction). Consequences:

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.

We may always assume soundness 12\tfrac12 (amplify to 2c2^{-c} by repeating cc 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[12logn, c]\in \mathrm{PCP}[\tfrac12\log n,\ c] then P=NP\mathrm{P}=\mathrm{NP}.” The mechanism is the bound above. With r=12lognr=\tfrac12\log n there are only 2r=n2^{r}=\sqrt n random strings, and the verifier reads cc bits for each, so only cn\le c\sqrt n proof positions matter. Each random string ρ\rho imposes one constraint on cc of those proof bits; perfect completeness means x3-SATx\in\text{3-SAT} iff there is an assignment to those proof bits satisfying all n\sqrt n constraints, while x3-SATx\notin\text{3-SAT} leaves every assignment failing more than half of them. So 3-SAT reduces to deciding a tiny constraint system over O(n)O(\sqrt 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 Πq2r|\Pi|\le q\cdot 2^{r}, 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 ff on 3-CNF formulas is a cc-amplifying reduction (for c<1c<1) if

maxSAT(φ)=1maxSAT(f(φ))=1,maxSAT(φ)<1maxSAT(f(φ))<c.\mathrm{maxSAT}(\varphi)=1 \Rightarrow \mathrm{maxSAT}(f(\varphi))=1, \qquad \mathrm{maxSAT}(\varphi)<1 \Rightarrow \mathrm{maxSAT}(f(\varphi))<c.
Satisfiable stays satisfiable; unsatisfiable becomes “at most a cc-fraction satisfiable.”

Lemma. NPPCP[logn,1]\mathrm{NP}\subseteq\mathrm{PCP}[\log n,1]     \iff 3-SAT has an amplifying reduction.

(\Leftarrow) reduction ⇒ verifier. Given ff, the proof is a satisfying assignment of f(φ)f(\varphi). The verifier picks a random clause of f(φ)f(\varphi) (that costs O(logn)O(\log n) coins), reads the 3 bits Π(i),Π(j),Π(k)\Pi(i),\Pi(j),\Pi(k) for its variables, and checks the clause is satisfied. If φ\varphi\in SAT, some assignment satisfies all clauses ⇒ accept always. If φ\varphi\notin SAT, at most a cc-fraction of clauses are satisfied ⇒ reject probability 1c\ge 1-c; repeat to push acceptance below 12\tfrac12. Constant queries, log randomness. ✓

(\Rightarrow) verifier ⇒ reduction. Given a verifier VV for SAT using clognc\log n coins and tt queries, construct ff: for each random string r{0,1}clognr\in\{0,1\}^{c\log n}, the queried positions i1,,iti_1,\dots,i_t and the accept predicate define a Boolean function φr(xi1,,xit)\varphi'_r(x_{i_1},\dots,x_{i_t}) with φr=1    V\varphi'_r=1\iff V accepts on rr. Convert each φr\varphi'_r into 3-CNF φr\varphi_r (auxiliary variables), and set

f(φ):=r{0,1}clognφr.f(\varphi):=\bigwedge_{r\in\{0,1\}^{c\log n}}\varphi_r.
If φ\varphi\in SAT, the good proof satisfies all ⇒ f(φ)f(\varphi)\in SAT. If φ\varphi\notin SAT, soundness says Prr[φr(α)=0]12\Pr_r[\varphi_r(\alpha)=0]\ge\tfrac12 for every assignment α\alpha, so with t=maxr(#clauses in φr)t'=\max_r(\#\text{clauses in }\varphi_r) at least a 12t\tfrac{1}{2t'}-fraction of clauses of f(φ)f(\varphi) is unsatisfied — i.e. maxSAT(f(φ))<c\mathrm{maxSAT}(f(\varphi))<c for c=112tc=1-\tfrac{1}{2t'}. ✓


Part C — Proving the PCP theorem

C.1 The three-step plan

(1) long proof  linear functions  (2) short proof  low-degree polys  (3) composition\text{(1) long proof}\ \xrightarrow{\ \text{linear functions}\ }\ \text{(2) short proof}\ \xrightarrow{\ \text{low-degree polys}\ }\ \text{(3) composition}
  1. Every NP problem has an exponentially long proof checkable with O(1)O(1) queries. Tool: arithmetization of Boolean formulas + linear functions and self-correction. Result: NPPCP[O(n3),O(1)]\mathrm{NP}\subseteq\mathrm{PCP}[O(n^3),O(1)].
  2. 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: NPPCP[O(logn),O(log4n)]\mathrm{NP}\subseteq\mathrm{PCP}[O(\log n),O(\log^4 n)].
  3. The composition lemma glues a verifier inside another to combine “log randomness” with “constant queries,” landing on NP=PCP[O(logn),O(1)]\mathrm{NP}=\mathrm{PCP}[O(\log n),O(1)].

The recurring slogans:

We need one shared definition first.

δ\delta-close functions. For finite sets D,RD,R and 0<δ<10<\delta<1, functions f,g:DRf,g:D\to R are δ\delta-close if they disagree on at most a δ\delta-fraction of inputs:

PrxD[f(x)g(x)]δ.\Pr_{x\in D}[\,f(x)\ne g(x)\,]\le\delta.
A linear function f:Z2mZ2f:\mathbb{Z}_2^m\to\mathbb{Z}_2 satisfies f(x+y)=f(x)+f(y)f(x+y)=f(x)+f(y) for all x,yx,y. (Over Z2\mathbb{Z}_2, this is the same as a degree-1 polynomial, i.e. f(x)=axf(x)=a\cdot 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 δ<13\delta<\tfrac13 and g:Z2mZ2g:\mathbb{Z}_2^m\to\mathbb{Z}_2 with Prx,y[g(x+y)g(x)+g(y)]δ/2\Pr_{x,y}[\,g(x+y)\ne g(x)+g(y)\,]\le \delta/2. Then there is a linear ff that is δ\delta-close to gg.

The witness is the majority vote:

f(x):=the bZ2 for which Pry[g(x+y)g(y)=b]12.f(x):=\text{the } b\in\mathbb{Z}_2 \text{ for which } \Pr_y[\,g(x+y)-g(y)=b\,]\ge\tfrac12.
The proof has three moves: (1) f,gf,g are δ\delta-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δp_a:=\Pr_x[f(a)=g(a+x)-g(x)]\ge 1-\delta, shown by a two-term expansion
1δzZ2(Prx[g(x+a)g(x)=z])2pa;1-\delta\le\sum_{z\in\mathbb{Z}_2}\big(\Pr_x[g(x+a)-g(x)=z]\big)^2\le p_a;
(3) linearity of ff: for fixed a,ba,b, applying p1δp_\cdot\ge 1-\delta three times gives
Prx[f(a)+f(b)+g(x)=f(a+b)+g(x)]13δ>0(δ<13),\Pr_x[\,f(a)+f(b)+g(x)=f(a+b)+g(x)\,]\ge 1-3\delta>0\quad(\delta<\tfrac13),
and since the event f(a)+f(b)=f(a+b)f(a)+f(b)=f(a+b) does not depend on xx, its probability is 00 or 11 — and being >0>0, it is 11. So ff is linear.   \;\square

Program LT (linearity test). Repeat k=2/δk=\lceil 2/\delta\rceil times: pick random x,yZ2mx,y\in\mathbb{Z}_2^m, and if g(x)+g(y)g(x+y)g(x)+g(y)\ne g(x+y) return NO; else YES.

Program SCF (self-correction). To read the true value f(x)f(x) from a corrupted table gg that is δ\delta-close to linear ff: pick random yy and return g(x+y)g(y)g(x+y)-g(y).

Why self-correction, not just “read g(x)g(x)”? Reading g(x)g(x) directly errs with probability δ\le\deltabetter than 2δ2\delta. But SCF randomizes the access: the point actually queried, x+yx+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 φ\varphi into a degree-3 polynomial PφP_\varphi over Z2\mathbb{Z}_2:

literal upu=1xu,¬upu=xu,clause C=l1l2l3PC=pl1pl2pl3,\text{literal } u\mapsto p_u=1-x_u,\quad \neg u\mapsto p_u=x_u,\quad \text{clause }C=l_1\vee l_2\vee l_3\mapsto P_C=p_{l_1}p_{l_2}p_{l_3},
φ=C1CmPφ=i=1mPCi.\varphi=C_1\wedge\cdots\wedge C_m\mapsto P_\varphi=\sum_{i=1}^m P_{C_i}.
Now PC(a)=0P_C(a)=0 exactly when clause CC is satisfied, so
φ(a)=1Pφ(a)=0,\varphi(a)=1 \Rightarrow P_\varphi(a)=0,
but the converse fails — Pφ(a)P_\varphi(a) counts (mod 2) the parity of unsatisfied clauses, so an even number of failures hides itself. Fix with a random combination: for rZ2mr\in\mathbb{Z}_2^m,
Pφr=i=1mriPCi.P^r_\varphi=\sum_{i=1}^m r_i P_{C_i}.
Using the fact that for v0v\ne 0, Prr[irivi=1]=12\Pr_r[\sum_i r_iv_i=1]=\tfrac12:
φ(a)=1r: Pφr(a)=0;φ(a)=0Prr[Pφr(a)=1]=12.\varphi(a)=1\Rightarrow \forall r:\ P^r_\varphi(a)=0;\qquad \varphi(a)=0\Rightarrow \Pr_r[P^r_\varphi(a)=1]=\tfrac12.
So a random rr catches an unsatisfying assignment with probability 12\tfrac12. (Picking a random input aa instead wouldn’t help — we’d have to test all aa.)

The key structural theorem lets us evaluate any degree-3 polynomial using three linear functions of the assignment:

Theorem. For a=(a1,,an)Z2na=(a_1,\dots,a_n)\in\mathbb{Z}_2^n there exist three linear functions Aa:Z2nZ2A_a:\mathbb{Z}_2^n\to\mathbb{Z}_2, Ba:Z2n2Z2B_a:\mathbb{Z}_2^{n^2}\to\mathbb{Z}_2, Ca:Z2n3Z2C_a:\mathbb{Z}_2^{n^3}\to\mathbb{Z}_2, such that every degree-3 polynomial pp over nn variables satisfies

p(a1,,an)=αp+Aa(qp,1)+Ba(qp,2)+Ca(qp,3),p(a_1,\dots,a_n)=\alpha_p+A_a(q_{p,1})+B_a(q_{p,2})+C_a(q_{p,3}),
where αp\alpha_p and the index-vectors qp,iq_{p,i} depend only on pp and are polynomial-time computable.

Here Aa(x)=iaixiA_a(x)=\sum_i a_i x_i evaluates linear terms, Ba(y)=i,jaiajyijB_a(y)=\sum_{i,j}a_ia_j y_{ij} the quadratic terms, Ca(z)=i,j,kaiajakzijkC_a(z)=\sum_{i,j,k}a_ia_ja_k z_{ijk} the cubic terms; and qp,iq_{p,i} is the characteristic vector of which monomials appear in pp. The clever part: Aa,Ba,CaA_a,B_a,C_a depend only on the assignment aa (so they can be pre-tabulated as the proof), while the query vectors qp,iq_{p,i} depend only on the polynomial pp (so the verifier computes them itself).

C.2.3 The verifier (Π = three linear-function tables)

The proof is a concatenation Π=ABC\Pi=A'\,B'\,C' where A=2n|A'|=2^n, B=2n2|B'|=2^{n^2}, C=2n3|C'|=2^{n^3} — the full value-tables of Aa,Ba,CaA_a,B_a,C_a for the (claimed) satisfying aa. The verifier runs three checks:

  1. Linearity (Program LT on each of A,B,CA',B',C'): each is δ\delta-close to some linear function — else caught with probability 12\ge\tfrac12.
  2. Consistency (Program CT): even if all three are linear, they must come from the same aa, i.e. b~(i1)n+j=a~ia~j\tilde b_{(i-1)n+j}=\tilde a_i\tilde a_j and c~(i1)n2+(j1)n+k=a~ia~ja~k\tilde c_{(i-1)n^2+(j-1)n+k}=\tilde a_i\tilde a_j\tilde a_k. CT picks random x,xx,x', uses SCF to read a=A(x)a=A'(x), a=A(x)a'=A'(x'), b=B(xx)b=B'(x\circ x') (where (xx)(i1)n+j=xixj(x\circ x')_{(i-1)n+j}=x_ix'_j), and checks aa=ba\cdot a'=b; similarly checks ABA'\cdot B' vs CC'. (SCF’s randomization is what makes the three reads independent enough to bound the error.)

    Lemma. For δ<124\delta<\tfrac{1}{24} there is a constant kk so that if no single aa makes A,B,CA',B',C' δ\delta-close to the linear functions with coefficients a, aa, aaaa,\ a\circ a,\ a\circ a\circ a, then one of kk runs of LT/CT returns NO with probability 1δ\ge 1-\delta.

  3. Satisfiability (Program CSAT): pick random rZ2mr\in\mathbb{Z}_2^m, compute αPφr\alpha_{P^r_\varphi} and the query vectors, use SCF to read a=A(q1)a=A'(q_1), b=B(q2)b=B'(q_2), c=C(q3)c=C'(q_3), and check whether α+a+b+c=1\alpha+a+b+c=1 (i.e. Pφr(a)=1P^r_\varphi(a)=1, a violation). If so return NO. An unsatisfying aa is caught with probability 12\ge\tfrac12 by the random rr.

Each test uses O(n3)O(n^3) random bits (a 3-CNF has n3\le n^3 clauses) and O(1)O(1) queries; repeat a constant number of times. Therefore

 NPPCP[O(n3),O(1)]. \boxed{\ \mathrm{NP}\subseteq\mathrm{PCP}[O(n^3),O(1)].\ }
The proof is exponentially long (tables of size up to 2n32^{n^3}) — 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
nn # Boolean variables 3\ge 3
qq a prime 100log4n\approx 100\lceil\log^4 n\rceil
F=ZqF=\mathbb{Z}_q finite field $
HFH\subseteq F subset ${0,\dots, H
kk # variables of the polynomials logn/loglogn\approx \log n/\log\log n
dd total degree $O(k
Fd,k\mathcal F_{d,k} kk-variate polynomials of degree dd

C.3.1 Why polynomials encode well — the agreement lemma

Lemma (Schwartz–Zippel-style). Two distinct polynomials in Fd,k\mathcal F_{d,k} agree on at most dqk1d\,q^{k-1} of the qkq^k points of FkF^k; equivalently a nonzero degree-dd polynomial has dqk1\le d q^{k-1} roots.

So the agreement fraction is d/q<12\le d/q < \tfrac12. Consequently a function that is δ\delta-close (for δ<14\delta<\tfrac14) 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}a:H^k\to\{0,1\} (we use Hkn|H^k|\ge n, so kk-tuples of HH index the nn bits). Its encoding is the unique low-degree polynomial agreeing with it on HkH^k:

Theorem. For f:Ht{0,1}f:H^t\to\{0,1\} there is a unique pfFtH,tp_f\in\mathcal F_{t|H|,t} with pf(y)=f(y)p_f(y)=f(y) for all yHty\in H^t, namely pf(x)=hHtSh(x)f(h)p_f(x)=\sum_{h\in H^t}S_h(x)f(h), where the selector ShS_h is 11 at hh and 00 on the rest of HtH^t.

This encodes nn bits as qkq^k field elements — a polynomial blow-up (vs. 2n2^n 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+sttF}\ell_{b,s}=\{b+st\mid t\in F\} is a univariate degree-dd polynomial — and conversely:

gFd,k    b,s: gb,s(t)=g(b+st)Fd,1.g\in\mathcal F_{d,k}\iff \forall b,s:\ g_{b,s}(t)=g(b+st)\in\mathcal F_{d,1}.

Program LDT. With an auxiliary line-table T:F2kFd+1T:F^{2k}\to F^{d+1} supplying, for each line, the coefficients of the best-fitting univariate degree-dd polynomial Pb,sP_{b,s}: repeat 3/δ\lceil 3/\delta\rceil times — pick a random line (b,s)(b,s) and random point tt, and reject if Pb,s(t)g(b+st)P_{b,s}(t)\ne g(b+st).

Program CLDP (correction, the analogue of SCF): to read f(x)f(x), pick a random line through xx, check the table agrees at a random point, and return Px,s(0)P_{x,s}(0). It returns the true f(x)f(x) with probability 12δd/q\ge 1-2\sqrt\delta-d/q.

C.3.3 Arithmetization revisited — characteristic functions and zero-testers

As before, each clause becomes one of four degree-3 monomials p0,,p3p_0,\dots,p_3 (indexed by how many variables are negated; assume negated variables first and indices increasing). Define clause-characteristic functions χφj:H3k{0,1}\chi^j_\varphi:H^{3k}\to\{0,1\}:

χφj(i1,i2,i3)=1    φ has a type-j clause on ui1,ui2,ui3.\chi^j_\varphi(i_1,i_2,i_3)=1 \iff \varphi \text{ has a type-}j\text{ clause on } u_{i_1},u_{i_2},u_{i_3}.
Then aa satisfies φ\varphi iff for all jj and all (i1,i2,i3)(i_1,i_2,i_3),
fφj(i1,i2,i3)=χφj(i1,i2,i3)pj(ai1,ai2,ai3)=0.f^j_\varphi(i_1,i_2,i_3)=\chi^j_\varphi(i_1,i_2,i_3)\cdot p_j(a_{i_1},a_{i_2},a_{i_3})=0.
Replace χφj\chi^j_\varphi and pjp_j by their low-degree extensions gφjg^j_\varphi. Satisfaction becomes: gφj0g^j_\varphi\equiv 0 on all of H3kH^{3k}. Note χφj\chi^j_\varphi depends only on φ\varphi, so the verifier can compute it — each query to gφjg^j_\varphi becomes 3 queries to faf_a.

Zero-testers — turn “identically zero” into “a sum is zero.”

Lemma. There is a family RR of q3kq^{3k} polynomials (zero-testers) in F3kH,3k\mathcal F_{3k|H|,3k} such that for any f:H3kFf:H^{3k}\to F not identically zero,

PrRR[hH3kR(h)f(h)=0]3100.\Pr_{R\in\mathcal R}\Big[\textstyle\sum_{h\in H^{3k}}R(h)f(h)=0\Big]\le \tfrac{3}{100}.
Constructible in time qO(k)=poly(n)q^{O(k)}=\mathrm{poly}(n).

Idea: form g(t1,,t3k)=hf(h)itihig(t_1,\dots,t_{3k})=\sum_h f(h)\prod_i t_i^{h_i}; then g0    f0g\equiv 0\iff f\equiv 0 on H3kH^{3k}, and by the agreement lemma a nonzero gg vanishes on 3Hk/q<3100\le 3|H|k/q<\tfrac{3}{100} of F3kF^{3k}. Each Rb(x)=s(b,x)R_b(x)=s(b,x) has hRb(h)f(h)=g(b)\sum_h R_b(h)f(h)=g(b), so a random bb (i.e. random zero-tester) catches a nonzero ff.

C.3.4 The sum-check (again!), and assembling the short verifier

Checking gφj0g^j_\varphi\equiv 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 FF and the cube H3kH^{3k}. Define partial-sum polynomials gi(x1,,xi)=yi+1,,y3kHf(x1,,xi,yi+1,,y3k)g_i(x_1,\dots,x_i)=\sum_{y_{i+1},\dots,y_{3k}\in H} f(x_1,\dots,x_i,y_{i+1},\dots,y_{3k}), which satisfy gi(x1,,xi)=xHgi+1(x1,,xi,x)g_i(x_1,\dots,x_i)=\sum_{x\in H} g_{i+1}(x_1,\dots,x_i,x) and hf(h)=x1Hg1(x1)\sum_{h}f(h)=\sum_{x_1\in H}g_1(x_1).

Program Sum-Check (with table TT of the partial-sum polynomials): check $\sum_{x\in H} g’1(x)=0$; then for i=2..3ki=2..3k, pick random riFr_i\in 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}).

The short verifier. Proof == the low-degree extension faf_a, its line-table TaT_a, and the partial-sum tables T0,T1,T2,T3T_0,T_1,T_2,T_3 (one per clause type, for the product with a zero-tester). The verifier (1) runs LDT to check faf_a is close to a degree-d\le d polynomial; (2) for each jj, picks a random zero-tester RR and runs Sum-Check on RgφjR\cdot g^j_\varphi (substituting 3 queries to faf_a for each query to gφjg^j_\varphi, using CLDP to read corrected values). Counting:

 NPPCP[O(logn),O(log4n)]. \boxed{\ \mathrm{NP}\subseteq\mathrm{PCP}[O(\log n),O(\log^4 n)].\ }

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 NPPCP[O(r1),O(q1)]\mathrm{NP}\subseteq\mathrm{PCP}[O(r_1),O(q_1)] and there is an (r2,q2)(r_2,q_2)-normal-form verifier for 3-SAT, then

NPPCP[O(r1(n)+r2(kq1(n))), O(q2(kq1(n)))],k constant.\mathrm{NP}\subseteq\mathrm{PCP}\big[\,O(r_1(n)+r_2(kq_1(n))),\ O(q_2(kq_1(n)))\,\big],\quad k\text{ constant.}

Why a “normal form” is needed. The composed verifier wants to check “A1A_1 would accept after reading these d1d_1 words of Π1\Pi_1” — but it must not read those words itself (that would re-introduce the large query count). The escape: have a second verifier A2A_2 check this, where A2A_2 has access to a split encoding of the proof (an encoding of each row read by A1A_1, not of the whole proof). A normal-form verifier is exactly one wired to operate on such an encoding:

(r,q)(r,q)-normal form (sketch). It has an (,kq)(\ell,k\cdot q)-encoding scheme EE (codewords are tables, with minimum distance δmin\delta_{\min}, (n)2hr(n)\ell(n)\le 2^{hr(n)}), uses exactly hr(n)hr(n) random bits, reads exactly dd rows (a constant) whose indices depend only on the coins, and behaves as: if the cc encoding-tables are codewords decoding to a satisfying assignment ⇒ accepts w.p. 1; if some table is far (δmin/3\ge\delta_{\min}/3) from any codeword ⇒ accepts w.p. <12<\tfrac12; if all tables are close but decode to a non-satisfying assignment ⇒ accepts w.p. <12<\tfrac12.

Proof idea of the lemma. Let A1A_1 witness NPPCP[O(r1),O(q1)]\mathrm{NP}\subseteq\mathrm{PCP}[O(r_1),O(q_1)] (on input of length nn, uses h1r1(n)h_1 r_1(n) coins, reads d1d_1 words of length k1q1(n)k_1q_1(n)). For each random string rr, let y1r,,yd1ry^r_1,\dots,y^r_{d_1} be the words A1A_1 reads and define

L={(y1,,yd1)A1 accepts when it reads them}.L'=\{(y_1,\dots,y_{d_1})\mid A_1 \text{ accepts when it reads them}\}.
A1A_1 runs in polynomial time, so LPL'\in\mathrm P; let ΦAL\Phi_{A_{L'}} be the 3-CNF from Cook–Levin for it. Because there is a normal-form verifier A2A_2 for 3-SAT, we can attach to each random string rr a sub-proof Π2r\Pi^r_2 that A2A_2 accepts (with the encoded rows E2(y1r),,E2(yd1r)E_2(y^r_1),\dots,E_2(y^r_{d_1}) as oracle) iff (y1r,,yd1r)L(y^r_1,\dots,y^r_{d_1})\in L'. The composed proof table has two parts: the Π2r\Pi^r_2’s (first part) and the E2E_2-encodings of the rows of Π1\Pi_1 (second part). Its dimensions multiply out to (n)22h1r1(n)2h2r2(k1q1(n))\ell(n)\le 2\cdot 2^{h_1r_1(n)}\cdot 2^{h_2r_2(k_1q_1(n))} rows.

The composed verifier AA: simulate A1A_1 with coins rr to get the row indices; then simulate A2A_2 with coins rr', oracle the encoded rows + Π2r\Pi^r_2; accept iff A2A_2 accepts. Total randomness h1r1(n)+h2r2(k1q1(n))h_1r_1(n)+h_2r_2(k_1q_1(n)).

The five-step assembly (this is the actual proof of the theorem):

  1. Composition lemma (above).
  2. NPPCP[O(poly(n)),O(1)]\mathrm{NP}\subseteq\mathrm{PCP}[O(\mathrm{poly}(n)),O(1)] — the long proof (C.2), put in normal form (a (poly(n),1)(\mathrm{poly}(n),1)-normal-form verifier exists).
  3. NPPCP[O(logn),O(polylog(n))]\mathrm{NP}\subseteq\mathrm{PCP}[O(\log n),O(\mathrm{polylog}(n))] — the short proof (C.3), put in normal form (a (logn,polylog(n))(\log n,\mathrm{polylog}(n))-normal-form verifier exists).
  4. Compose 1+3+3: NPPCP[O(logn),O(polyloglog(n))]\mathrm{NP}\subseteq\mathrm{PCP}[O(\log n),O(\mathrm{polyloglog}(n))], since log(kpolylogn)=O(logn)\log(k\,\mathrm{polylog}\,n)=O(\log n) and $\mathrm{polylog}(k,\mathrm{polylog},n)= \mathrm{polyloglog}(n)$.
  5. Compose 1+2+4: NPPCP[O(logn+poly(kpolyloglogn)),O(1)]\mathrm{NP}\subseteq\mathrm{PCP}[O(\log n+\mathrm{poly}(k\,\mathrm{polyloglog}\,n)),O(1)], and since the randomness is still O(logn)O(\log n),
     NP=PCP[O(logn),O(1)]. \boxed{\ \mathrm{NP}=\mathrm{PCP}[O(\log n),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)O(\log n) 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)O(\log n).


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<ρ<10<\rho<1 such that, if PNP\mathrm{P}\ne\mathrm{NP}, no polynomial-time algorithm can, for every graph GG, output an independent set of size ρα(G)\ge\rho\cdot\alpha(G) (where α(G)\alpha(G) is the maximum independent-set size).

Construction. Take an NP-complete LL and its PCP verifier VV (r=O(logn)r=O(\log n) coins, q=O(1)q=O(1) queries, completeness 1, soundness <12<\tfrac12). Build a graph HxH_x:

Key facts.

So α(Hx)\alpha(H_x) jumps by a factor 22 between yes- and no-instances. A polynomial-time algorithm approximating α\alpha within a factor better than 22 would cross the gap and decide LLP=NP\mathrm{P}=\mathrm{NP}. Repeating the verifier (or graph products) pushes the gap to any constant, giving inapproximability within every constant ρ<1\rho<1.

Exam framing. State the vertex set (ρ,q)(\rho,q), define the conflict edges precisely, then prove the two bounds: xLα(Hx)2rx\in L\Rightarrow\alpha(H_x)\ge 2^r (one consistent view per string) and xLα(Hx)<2r/2x\notin L\Rightarrow\alpha(H_x)<2^r/2 (soundness). Conclude that a ρ\rho-approximation separates the cases. Clique is the complement: α(G)=ω(Gˉ)\alpha(G)=\omega(\bar 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_D, 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)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)O(\log n) coins, O(1)O(1) queries.
Gap = inapproximability Part D, exams PCP soundness <12<\tfrac12 becomes a factor-2 gap in α(G)\alpha(G)/Max-3-SAT ⇒ approximation is NP-hard.
**$ \Pi \le q\cdot 2^r$**

Exam connections recap

interactive-proofsIPPSPACEarithmetizationsum-checkTQBFPCPprobabilistically-checkable-proofslinearity-testBLRself-correctionlow-degree-testzero-testerscomposition-lemmainapproximabilityindependent-setMax-3-SAT

← Back to Randomized Algorithms