Hardness of Approximation: Inapproximability of MAX-3SAT and Vertex Cover
Anchor (Master): Arora and Barak 2009 Computational Complexity: A Modern Approach (Cambridge) Ch. 11; Arora, Lund, Motwani, Sudan and Szegedy 1998 Proof Verification and the Hardness of Approximation Problems (JACM) (PCP theorem proof, optimal inapproximability via Håstad's 3-bit PCP)
Intuition Beginner
Some problems are hard to solve exactly. We know this from NP-completeness: finding the smallest vertex cover in a graph, or the maximum number of satisfiable clauses in a 3SAT formula, is believed to require exponential time. But what if we only need an approximate answer? Could we find a vertex cover that is at most twice the optimal size? Or satisfy at least 90% of clauses?
The answer depends on the problem, and it is sometimes a definitive no. The theory of hardness of approximation tells us not just that finding the exact optimum is hard, but that even getting close to it is hard. For some problems, there is a hard wall: no efficient algorithm can guarantee a solution within a certain ratio of the optimum, unless P equals NP.
The key tool is the PCP theorem. It says that proofs of NP statements can be checked by reading only a constant number of bits of the proof. This sounds like a statement about verification, but it has a striking consequence for optimisation: it creates a gap in the objective function. The gap makes it NP-hard to tell whether the optimum is large or small, which means no approximation algorithm can cross the gap.
Visual Beginner
Consider MAX-3SAT on a formula with 8 clauses. Each clause has exactly 3 literals.
Satisfiable formula: All 8/8 clauses satisfied (optimal)
Random assignment: ~7/8 of clauses satisfied on expectation
Hard gap instance: Either 8/8 OR at most 7/8 + eps satisfied
(telling which is NP-hard)| Scenario | Fraction satisfiable | Approximable? |
|---|---|---|
| Satisfiable instance | 1.0 | Find any satisfying assignment (NP-hard) |
| General instance | Between 7/8 and 1.0 | Ratio 8/7 is best possible (P) |
| Gap instance (PCP) | Either 1.0 or at most 7/8 + eps | Telling apart is NP-hard |
The gap is the difference between the two thresholds in the gap instance. The PCP theorem converts any NP-hard decision problem into a gap-3SAT instance, making the gap version itself NP-hard.
Worked example Beginner
We have a 3CNF formula with 6 clauses:
A random truth assignment satisfies each clause with probability 7/8 (the only way a clause fails is if all three literals are false). So a random assignment satisfies clauses on expectation.
Can we do better? For this small instance, we can try all 8 truth assignments and find the best one. The assignment satisfies all 6 clauses.
But for large formulas with thousands of variables, exhaustive search is impossible. And the PCP theorem says something stronger: there exist formulas where no efficient algorithm can reliably tell whether all clauses are satisfiable or only 7/8 + eps can be satisfied. The gap between 1.0 and 7/8 + eps is the inapproximability gap.
Check your understanding Beginner
Formal definition Intermediate+
Definition (PCP verifier). A -PCP verifier for a language is a probabilistic polynomial-time Turing machine that, given input and oracle access to a proof string , uses at most random bits and queries at most bits of , such that:
- (Completeness) If , there exists such that .
- (Soundness) If , then for every , .
Theorem (PCP theorem, Dinur 2007 / Arora-Safra 1998). .
Definition (gap problem). For a maximisation problem with optimum , the -gap problem asks: given an instance, output YES if and NO if , with the promise that one of these holds.
Definition (approximation ratio). An algorithm is an -approximation for a maximisation problem if for every instance, produces a solution with value at least . For minimisation, produces a solution with value at most .
Counterexamples to common slips
"The PCP theorem says NP proofs can be checked quickly." The verification was already polynomial; the novelty is that only O(1) bits of the proof are read, yet soundness is maintained with constant probability.
"Inapproximability means no algorithm works at all." It means no algorithm achieves a ratio better than a specific threshold. MAX-3SAT has a 7/8-approximation (random assignment), but no -approximation unless P = NP.
"Hardness of approximation is separate from the PCP theorem." The PCP theorem is the engine of all modern inapproximability results. Every hardness-of-approximation result for an NP-hard optimisation problem ultimately reduces to it.
Key theorem with proof Intermediate+
Theorem (Håstad's optimal inapproximability for MAX-3SAT). For every , it is NP-hard to distinguish satisfiable 3CNF formulas from 3CNF formulas where at most a fraction of clauses are simultaneously satisfiable. Consequently, MAX-3SAT is NP-hard to approximate within factor for any .
Proof sketch. Start from the PCP theorem NP = PCP(log n, 1). The verifier for SAT uses random bits and reads bits of the proof . Håstad's 3-bit PCP ensures : the verifier reads exactly 3 bits of and accepts iff the XOR of those 3 bits equals 0 (or 1, depending on the test).
Construct a 3CNF formula from this verifier. For each random string , the verifier's test on bits of becomes a clause on variables (the proof bits). The clause is satisfied iff the test passes. This gives a 3CNF formula with one clause per random string.
Completeness. If the original formula is satisfiable, there exists a proof that makes accept with probability 1. The assignment satisfies all clauses of .
Soundness. If the original formula is unsatisfiable, every proof makes accept with probability at most for some constant . Håstad's analysis improves this to for some , and Fourier analysis of the long code shows the rejection probability can be boosted to make .
The random assignment satisfies of clauses on expectation (each 3-variable clause is satisfied by 7 of 8 assignments). So where is the number of clauses. If we could approximate within , we could distinguish from , which is NP-hard by the gap above.
Bridge. The PCP theorem is the foundational reason that approximation resistance exists: by encoding NP-hardness into a constant-query verifier, it creates an objective-function gap that no polynomial-time algorithm can cross. This builds toward the approximation algorithms of 47.04.08 where we see that some problems (like Vertex Cover with ratio 2) are far from their inapproximability bound, while MAX-3SAT sits exactly at the limit. The central insight is that the PCP theorem converts a decision problem (is the formula satisfiable?) into a structural property of the solution landscape (either a perfect solution exists or every solution is far from perfect), and this is exactly the pattern that appears again in 47.03.04 where interactive proofs achieve their power through a similar gap between completeness and soundness. The bridge is that hardness of approximation is not a separate phenomenon from computational hardness but a restatement of it at the level of solution quality.
Exercises Intermediate+
Lean formalization Intermediate+
Mathlib has no formalization of the PCP theorem, gap-producing reductions, or any hardness-of-approximation result. A formalization would need a PCP.Verifier structure with randomness, query_count, completeness, and soundness fields; a proof of the PCP theorem itself (NP = PCP(log n, 1)); and gap-preserving reduction constructions for specific problems like MAX-3SAT, Vertex Cover, and Set Cover. The gap between Mathlib's current state and a formal PCP theorem is substantial—it would require building the entire algebraic PCP machinery (low-degree tests, sum-check protocol, composition). This unit ships without a lean_module.
Advanced results Master
Three families of results sharpen the boundary between what is approximable and what is not.
Result 1 (optimal inapproximability via the long code). The Håstad 3-bit PCP achieves optimal hardness for several CSPs simultaneously. The technique encodes proof bits using the long code of a function , defined by . The Fourier analysis of this encoding shows that any accepted proof must correlate with a dictator function, and the acceptance probability is bounded by the maximum Fourier coefficient of the proof function plus . This gives hardness for MAX-3SAT, for MAX-LIN-2, and for Max-Clique [Håstad 2001].
Result 2 (the UGC and its consequences). Khot's Unique Games Conjecture (2002) posits that Unique Label Cover is NP-hard to approximate within any constant. If true, it implies a dramatic sharpening of inapproximability: Vertex Cover becomes hard within (matching the simple 2-approximation), Max-Cut becomes hard within the Goemans-Williamson constant (matching the SDP algorithm), and every CSP has its approximation threshold determined by semidefinite programming [Arora-Barak Ch. 11]. The UGC remains open; a disproof would reshape the landscape.
Result 3 (the sliding-scale conjecture). Bellare, Goldwasser, Lund and Russell (1993) conjectured that for every constant , there exists such that for all constants , -gap -CSP is NP-hard. This would mean that the soundness can be made arbitrarily small while keeping the query complexity constant. Dinur's proof of the PCP theorem via gap amplification (2007) achieves some soundness reduction but not the full sliding scale; achieving it remains a central open problem in complexity theory [Arora-Barak Ch. 11].
Synthesis. The PCP theorem is the foundational reason the landscape of approximability is structured rather than chaotic: it creates a universal mechanism for turning computational hardness into approximation hardness, and this builds toward the algorithmic upper bounds of 47.04.08 that complement the lower bounds proven here. The central insight is that the gap between completeness and soundness in a PCP verifier translates directly into the gap between what an approximation algorithm can guarantee and what is information-theoretically possible, and this is exactly the pattern that generalises from MAX-3SAT to every NP optimisation problem via gap-preserving reductions. Putting these together with the interactive proof framework of 47.03.04 and the derandomisation techniques of 47.05.05 yields the full picture: the PCP theorem is the structural backbone connecting computational complexity, proof systems, and approximation algorithms, and its extensions (UGC, sliding scale) push toward the exact boundary of efficient computation.
Full proof set Master
Proposition 1 (gap-3SAT from PCP). If NP = PCP(log n, 1), then for every , the -gap-3SAT problem is NP-hard.
Proof. Let . By the PCP theorem, has a -PCP verifier for some constant . Håstad's transformation produces a -PCP for that reads exactly 3 proof bits and checks their XOR. For each random string , define a clause on variables (the three queried positions): for the appropriate bit . The formula has clauses.
Completeness: If , there exists a proof accepted with probability 1. The assignment satisfies every clause , so .
Soundness: If , every proof is accepted by with probability at most for some constant . The Håstad analysis shows can be made at most for any desired (by choosing the long-code test parameter appropriately). So at most clauses can be simultaneously satisfied.
Proposition 2 (Vertex Cover inapproximability). There exists a constant such that Vertex Cover is NP-hard to approximate within factor .
Proof. By Proposition 1, -gap-3SAT is NP-hard for any . Given a 3CNF formula with clauses and variables, construct a graph : create a triangle for each clause with vertices , and add an edge between and whenever they correspond to opposite literals (one is and the other is ). If is satisfiable, selecting one true literal per clause gives a vertex cover of size (pick the two non-true-literal vertices from each triangle). If at most clauses are satisfiable, then any vertex cover must include at least vertices for some depending on , because the contradiction edges force the cover to be large. An -approximation for Vertex Cover would distinguish the two cases, solving the gap problem.
Connections Master
47.02.03— NP-completeness provides the baseline: every problem reduced to in this unit is NP-hard to solve exactly, and the PCP theorem adds the approximation layer on top.47.03.04— Interactive proofs IP = PSPACE extend to multiprover interactive proofs MIP = NP, which is equivalent to the PCP theorem; the PCP verifier is the single-prover optimisation of the multiprover protocol.47.03.05— The PCP theorem itself (NP = PCP(log n, 1)) is the prerequisite machinery; this unit applies it to concrete optimisation problems.47.04.08— Approximation algorithms provide upper bounds (Vertex Cover 2-approx, Set Cover -approx) that complement the lower bounds proven here; the gap between upper and lower bounds defines the frontier of the field.47.05.04— Randomised approximation schemes (FPRAS) for counting problems face analogous hardness barriers: #P-completeness often blocks efficient exact counting, and the PCP framework determines when approximate counting is possible.
Historical & philosophical context Master
The PCP theorem was proved in two stages. Arora and Safra (1998) established NP = PCP(log n, polylog n), and Arora, Lund, Motwani, Sudan and Szegedy (1998) strengthened this to NP = PCP(log n, 1), earning the Gödel Prize in 2001. Dinur's alternative proof (2007) uses gap amplification via graph powering, providing a combinatorial route to the same result. Håstad (2001) refined the PCP to achieve optimal inapproximability for MAX-3SAT using Fourier analysis of the long code.
The philosophical significance is that approximation is not a universal escape from NP-hardness: some problems have hard walls beyond which no efficient algorithm can reach. This resolved a decades-old question about whether NP-hard optimisation problems could always be tamed by accepting approximate solutions. The answer is nuanced—some can (knapsack admits an FPTAS), some cannot (MAX-3SAT at 7/8, Set Cover at ln n)—and the PCP theorem is the tool that draws the line [Arora-Barak Ch. 11].
Bibliography Master
@book{arora2009computational,
author = {Arora, Sanjeev and Barak, Boaz},
title = {Computational Complexity: A Modern Approach},
publisher = {Cambridge University Press},
year = {2009},
}
@article{hastad2001optimal,
author = {H{\aa}stad, Johan},
title = {Some Optimal Inapproximability Results},
journal = {Journal of the ACM},
volume = {48},
number = {4},
pages = {798--859},
year = {2001},
}
@article{arora1998proof,
author = {Arora, Sanjeev and Lund, Carsten and Motwani, Rajeev and Sudan, Madhu and Szegedy, Mario},
title = {Proof Verification and the Hardness of Approximation Problems},
journal = {Journal of the ACM},
volume = {45},
number = {3},
pages = {501--555},
year = {1998},
}
@article{dinur2007pcp,
author = {Dinur, Irit},
title = {The {PCP} Theorem by Gap Amplification},
journal = {Journal of the ACM},
volume = {54},
number = {2},
year = {2007},
}
@inproceedings{khot2002unique,
author = {Khot, Subhash},
title = {On the Power of Unique 2-Prover 1-Round Games},
booktitle = {Proceedings of the 34th ACM Symposium on Theory of Computing},
year = {2002},
pages = {767--775},
}