Hardness of Approximation & the PCP Theorem
Why some problems cannot even be approximated well.
A random assignment satisfies, on average, of the clauses of any formula with three distinct literals per clause. Håstad proved that doing even slightly better, , is NP-hard. Results like this flow from one of the deepest theorems in computer science: every NP proof can be rewritten so that a verifier who reads only a constant number of its bits catches any false claim.
What you’ll learn
- Define gap problems, show why an approximation algorithm would solve them, and derive simple gaps (general TSP, chromatic number, bin packing) from NP-completeness alone.
- State the PCP theorem, prove its equivalence with the NP-hardness of gap-MAX-3SAT, and outline Dinur's proof by gap amplification.
- Derive optimal hardness results with gap-preserving reductions: for MAX-3SAT from Håstad's 3-LIN theorem, and clique hardness from the FGLSS graph.
- State the Unique Games Conjecture, explain why its imperfect completeness is essential, and summarize what it implies and what has been proven toward it.
Gap problems
How do you prove that even approximating a problem is hard? Reducing the exact problem to it proves nothing, since an approximation algorithm never claims exactness. Instead you reduce to a gap: instances whose optimum is either high or much lower, with nothing in between.
Some gaps fall straight out of NP-completeness, because the objective takes only a few small values:
| Problem | NP-hard question | Consequence, unless P = NP |
|---|---|---|
| TSP with arbitrary distances | Hamiltonian cycle: is the optimum , or more than ? | no ratio at all |
| Chromatic number | is , or ? | no ratio below |
| Bin packing | do the items fit into 2 bins (the partition problem)? | no ratio below |
| Edge coloring | does a cubic graph need 3 or 4 colors? (Holyer, 1981) | no ratio below , although Vizing's theorem gives colors, an additive error of 1 |
MAX-3SAT resists this trick. The Cook–Levin reduction turns a no instance into an unsatisfiable formula, but possibly one in which every clause except one can be satisfied: a gap of for clauses. Hardness for a constant fraction needs formulas in which every assignment violates a constant fraction of the clauses, a robustness that no classical reduction produces. That is what the PCP theorem supplies.
Deciding whether a graph is 3-colorable is NP-complete. What does this alone imply for approximating the chromatic number, unless P = NP?
- Nothing: gap arguments apply only to maximization problems
- No polynomial-time algorithm achieves a ratio below
- Some polynomial-time algorithm achieves ratio exactly
- No polynomial-time algorithm achieves a ratio below 3
Show the answer
B. No polynomial-time algorithm achieves a ratio below
An algorithm with ratio uses at most colors, so exactly 3, on every 3-colorable graph, while any proper coloring of other graphs uses at least 4. Counting its colors would decide 3-colorability.
The PCP theorem
The inclusion is easy: a nondeterministic machine guesses the at most proof bits the verifier could ever read and runs it on all coin sequences. The content is : every NP statement has a proof of polynomial length that can be checked by reading a constant number of its bits, with any false claim caught at least half the time. The proofs grew out of interactive proofs and the theorem (Babai, Fortnow & Lund, 1991), and their authors, with Feige, Goldwasser and Lovász, shared the 2001 Gödel Prize.
PCP ⇒ gap. Given , list the coin sequences . For each, the verifier's decision is a function of proof bits: write it as a CNF with at most clauses of width , and split each clause into at most clauses of width 3 with fresh variables. If , the correct proof satisfies everything:
If , every assignment, read as a proof, is rejected on at least half of the coin sequences, and each rejection leaves at least one of that sequence's clauses unsatisfied:
Gap ⇒ PCP. Given , compute the formula of the reduction; the proof is an assignment. Pick a random clause, using coins, read its 3 variables and accept if it is satisfied. Satisfiable formulas are always accepted; otherwise each test fails with probability at least , and independent tests bring the soundness below :
A verifier reads proof bits. Following the proof above, what percentage of the clauses of is guaranteed to be unsatisfied by every assignment when ?
Show the answer
2.08 %
. Half of the coin sequences reject, and each contributes at most clauses, of which at least one fails. Small, but a constant: no assignment comes within 2% of satisfying the formula.
The original proofs used algebra: low-degree polynomials over finite fields, locally testable encodings and the recursive composition of verifiers. Dinur (2007) found a combinatorial proof that starts from a tiny gap and amplifies it.
Start. 3-coloring is NP-hard, so for a constraint graph with edges it is NP-hard to tell value 1 from value at most :
Preprocess into a constraint graph that is a constant-degree expander, losing a constant factor in the gap:
Power. Let each vertex hold opinions about all vertices within distance , and check constraints along random walks. On an expander the gap grows by a factor of order (until it reaches a constant), while the alphabet grows to size :
Reduce the alphabet back to constant size by composing with an assignment tester, a small PCP for each constraint, again losing only a constant factor. With a large constant, each round at least doubles the gap and multiplies the size by a constant , so rounds reach a constant gap with polynomial size:
Optimal inapproximability
The imperfect completeness of the first statement is unavoidable: whether a linear system is exactly satisfiable is decided by Gaussian elimination. The proofs use the long code and Fourier analysis of Boolean functions on top of the PCP theorem and Raz's parallel repetition theorem (1998). The second statement follows from the first, up to completeness, by a one-line gap-preserving reduction:
Replace each equation by the 4 clauses that each exclude one of the 4 assignments violating it. An assignment that satisfies the equation satisfies all 4 clauses; one that violates it falsifies exactly one:
If a fraction of the equations is satisfied, the fraction of satisfied clauses is
So systems with of the equations satisfiable become formulas with of the clauses satisfiable, and systems with at most become formulas where no assignment satisfies more than:
The graph. Vertices are accepting views: pairs of a coin sequence and answers to the queries asked on that the verifier accepts. Two views are adjacent when they have different coin sequences and agree on every proof position both of them read.
A proof gives a clique. For a fixed proof , the views it induces on the coin sequences it passes are pairwise consistent:
A clique gives a proof. The views of a clique have distinct coin sequences and consistent answers, which together define a partial proof, accepted on every coin sequence of the clique. So the two quantities are equal:
With , and independent repetitions of the verifier (), the graph stays polynomial for every constant , so clique is NP-hard to approximate within any constant. Randomness-efficient repetition gives , and Håstad (1999) and Zuckerman (2007) pushed the bound to .
| Problem | Best algorithm | NP-hard to beat | If the Unique Games Conjecture holds |
|---|---|---|---|
| MAX-E3SAT | (random assignment) | (Håstad, 2001) | same |
| MAX-E3LIN2 | (random assignment) | (Håstad, 2001) | same |
| MAX-CUT | (Goemans & Williamson) | (Håstad, 2001; Trevisan, Sorkin, Sudan & Williamson, 2000) | (Khot, Kindler, Mossel & O'Donnell, 2007) |
| Vertex cover | 2 | (Khot, Minzer & Safra, 2018), after 1.3606 (Dinur & Safra, 2005) | (Khot & Regev, 2008) |
| Set cover | (greedy) | (Dinur & Steurer, 2014) | same |
| Maximum clique | barely better than the trivial | (Håstad, 1999; Zuckerman, 2007) | same |
Unique Games and the frontier
Telling value 1 from value below 1 is easy. Within a connected component, the label of one vertex forces the labels of its neighbors, and theirs, and so on, so trying all labels for one vertex settles the whole component:
def unique_games_satisfiable(n, k, constraints):
"""constraints: (u, v, p) means label[v] == p[label[u]], p a permutation of range(k)."""
adj = [[] for _ in range(n)]
for u, v, p in constraints:
inv = [0] * k
for a, b in enumerate(p):
inv[b] = a
adj[u].append((v, p))
adj[v].append((u, inv))
label = [None] * n
for s in range(n):
if label[s] is not None:
continue
for guess in range(k): # k guesses for s fix its whole component
trial, stack, ok = {s: guess}, [s], True
while stack and ok:
u = stack.pop()
for v, p in adj[u]:
if v not in trial:
trial[v] = p[trial[u]]
stack.append(v)
elif trial[v] != p[trial[u]]:
ok = False # contradiction: this guess fails
break
if ok:
for v, a in trial.items():
label[v] = a
break
else:
return None # no label for s works: unsatisfiable
return labeltime. Tested against brute force on 3,000 random small instances. With value the thread can be cut anywhere, and propagation proves nothing; that is where the conjecture puts the hardness.
If true, it pins down the approximability of many problems exactly:
- Vertex cover: is NP-hard (Khot & Regev, 2008), so the matching algorithm is optimal.
- MAX-CUT: is NP-hard (Khot, Kindler, Mossel & O'Donnell, 2007, with the Majority Is Stablest theorem of Mossel, O'Donnell & Oleszkiewicz, 2010), so the Goemans–Williamson SDP is optimal.
- Every constraint satisfaction problem: a basic SDP relaxation achieves the best possible ratio, whatever the constraints (Raghavendra, 2008).
The evidence cuts both ways. Arora, Barak and Steurer (2010) give an algorithm that, on a unique game of value , finds a labeling satisfying a large fraction of the constraints in time , with as . So the conjecture's gap problem is solvable in subexponential time: unique games are much easier than 3-SAT is believed to be, and any reduction proving the conjecture must blow up instance sizes by a polynomial whose degree grows as shrinks. On the other side, the 2-to-2 theorem (Khot, Minzer & Safra, 2018, completing work with Dinur and Kindler) proves the analogous statement for games whose constraints allow each label two partners, with imperfect completeness. It makes vertex cover NP-hard to approximate within , and it proves the Unique Games Conjecture with completeness about in place of .
The gap problem of the Unique Games Conjecture, with completeness , can be solved in time with . Assuming the Exponential Time Hypothesis (3-SAT needs time ), what does this imply about a reduction from 3-SAT that would prove the conjecture?
- No such reduction can exist, so the conjecture is false
- It must produce instances of size with growing as shrinks; a reduction of size for every would contradict the hypothesis
- It must run in exponential time
- Nothing: running times of algorithms say nothing about reductions
Show the answer
B. It must produce instances of size with growing as shrinks; a reduction of size for every would contradict the hypothesis
Compose the reduction, producing size , with the algorithm: 3-SAT would be solved in time . The hypothesis forces , so , which grows without bound. Reductions of this kind, with blow-up depending on , are allowed, so the conjecture survives.
Key takeaways
- Hardness of approximation is proved through gap problems: an algorithm with ratio below decides . Small optima give easy gaps (chromatic number , bin packing , general TSP unbounded).
- The PCP theorem, , is equivalent to the NP-hardness of gap-MAX-3SAT for a constant gap; Dinur proved it combinatorially by amplifying a gap through expander powering and alphabet reduction.
- Håstad's theorems make the random assignment optimal for MAX-E3SAT () and MAX-E3LIN2 (); gap-preserving reductions and the FGLSS graph carry such gaps to other problems, up to for clique.
- The Unique Games Conjecture would make the known algorithms optimal for vertex cover (2), MAX-CUT () and every CSP (basic SDP); the 2-to-2 theorem proved part of it, giving for vertex cover.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
Which statement is the PCP theorem?
- Every NP statement has a proof of constant length
- Every NP optimization problem can be approximated within some constant factor
- Every NP statement has a polynomial-length proof that a randomized verifier checks by reading a constant number of its bits, accepting true claims always and false ones with probability at most
- NP equals P for problems whose verifiers may use randomness
Show the answer
C. Every NP statement has a polynomial-length proof that a randomized verifier checks by reading a constant number of its bits, accepting true claims always and false ones with probability at most
: the proofs stay polynomially long, but checking them needs only random bits and queries. Equivalently, gap-MAX-3SAT is NP-hard for some constant gap.
A uniformly random assignment satisfies of the clauses of a MAX-E3SAT instance in expectation. What does Håstad's theorem add?
- That a semidefinite program achieves
- That, even on satisfiable formulas, finding an assignment satisfying a fraction is NP-hard, so the random assignment is optimal
- That is achievable only in expectation, never deterministically
- That MAX-E3SAT has a PTAS
Show the answer
B. That, even on satisfiable formulas, finding an assignment satisfying a fraction is NP-hard, so the random assignment is optimal
Håstad proved that telling satisfiable formulas from those where at most of the clauses can be satisfied is NP-hard. A polynomial algorithm guaranteeing would tell them apart, so the trivial algorithm is optimal unless P = NP.
In the reduction from 3-LIN to 3-SAT, each equation becomes 4 clauses. If an assignment satisfies 60% of the equations, what fraction of the clauses does it satisfy?
- 60%
- 85%
- 90%
- 97.5%
Show the answer
C. 90%
Satisfied equations keep all 4 of their clauses, violated ones keep 3: . The general formula maps to .
Why does the Unique Games Conjecture concern instances of value rather than satisfiable instances?
- Because satisfiable unique games can be recognized in polynomial time: fixing one label per component determines all the others
- Because unique games never have value exactly 1
- Because completeness 1 would make the conjecture trivially true
- Because the PCP theorem forbids perfect completeness
Show the answer
A. Because satisfiable unique games can be recognized in polynomial time: fixing one label per component determines all the others
Each constraint is a bijection, so a label on one vertex forces its neighbors, and so on through the component; trying all labels decides satisfiability in time. Hardness can only live in nearly satisfiable instances.
Further reading
- S. Arora, C. Lund, R. Motwani, M. Sudan & M. Szegedy, "Proof verification and the hardness of approximation problems," Journal of the ACM 45(3) (1998).
- I. Dinur, "The PCP theorem by gap amplification," Journal of the ACM 54(3) (2007).
- J. Håstad, "Some optimal inapproximability results," Journal of the ACM 48(4) (2001).
- S. Khot, "On the power of unique 2-prover 1-round games," Proceedings of STOC (2002).
- S. Arora & B. Barak, Computational Complexity: A Modern Approach (Cambridge University Press, 2009), chapters 11 and 22.