The map: What hangs on the answer
In 1975, Vaughan Pratt published a paper with a title that sounds like a fortune cookie: Every Prime Has a Succinct Certificate . Primality looks like a “no”-flavored problem ( is prime when no divisor exists) so it wasn’t even obvious it belonged to NP. Pratt showed it does: there’s a short, checkable proof of primality for every prime (a recursive gadget built from Fermat’s little theorem). Compositeness has an obvious certificate (a factor), so primality now had certificates both ways — and problems certifiable both ways, people already sensed, are suspiciously close to easy. It took 27 more years, but in 2002 Agrawal, Kayal, and Saxena found the polynomial algorithm: PRIMES is in P . Primality’s slow migration across the complexity map — and the conspicuous failure of its twin to make the same trip (factoring: the same arithmetic faced the other way, asked to produce the divisors rather than deny them) — is this chapter in miniature: where a problem sits on the map is a prophecy about its future.
This chapter draws the map. Four stops:
- coNP — what certifies a “no” when SAT only certifies “yes,” and why that asymmetry is real.
- Search vs decision — proof, with our dinner party, that a yes/no oracle for SAT would hand over actual solutions.
- The upper floors — the polynomial hierarchy, PSPACE, and the one wall we can prove.
- The stakes — exactly what collapses if P = NP, what survives, and Impagliazzo’s five possible worlds.
coNP: certifying the “no”
Chapter 2 flagged the trap in NP’s definition: only yes-answers get certificates. Flip every answer and you get the mirror class: coNP, the problems whose no-instances have short certificates. The canonical member is UNSAT (“this formula has no satisfying assignment”) which is exactly the question SAT leaves uncovered. (Equivalently: TAUTOLOGY, “does this formula evaluate true under every assignment,” since is unsatisfiable exactly when is a tautology.)
Feel the asymmetry on Chapter 2’s dinner party — four candidate guests , six clauses of feuds and pairings, possible guest lists. To convince you some list works, I show you one: , Carol and Dave — six quick checks, one per clause of , done. To convince you no guest list works (say, after Alice cancels and new feuds erupt), what do I show you? The obvious move (“here are all 16 lists, watch each fail”) is a certificate of exponential size: lists at sixty guests. For “no,” nothing better is known: as far as anyone can prove, refuting a formula may require evidence exponentially bigger than satisfying one. Whether that’s truly necessary is the NP vs coNP question, and it’s open, with its own barbed relationship to the main event:
- If P = NP then NP = coNP (P is closed under flipping answers — solve and negate).
- Contrapositive: if NP ≠ coNP, then P ≠ NP. So NP ≠ coNP is a stronger statement than P ≠ NP, at least as hard to prove. What makes it attractive anyway is that it breaks into pieces: “prove that refutations must sometimes be long” can be attacked one proof system at a time, and that piecewise program has real, unconditional victories — that’s Chapter 8, and it’s where this book’s lower-bound campaign actually draws blood.
- The converse is not known to hold: NP = coNP would not obviously give P = NP. The classes can be equal while both exceed P.
Is the yes/no asymmetry visible in the formulas themselves, not just in their certificates?
Yes — look at the two boundaries of formula-space. Order all CNF formulas by clause containment and ask where satisfiability flips. The ceiling of the satisfiable region — maximal satisfiable formulas, where adding any further clause kills them — is completely tame: a formula is maximal-satisfiable exactly when it consists of all clauses true under some single assignment , so there are precisely of them, one per assignment, fully catalogued. The floor of the unsatisfiable region — minimal unsatisfiable formulas, where deleting any clause rescues them — is a wilderness: a vast antichain with no catalogue, and its residents include the pigeonhole and Tseitin formulas that Chapter 8 will prove are the hardest objects resolution ever meets. Same lattice, two boundaries, and all the difficulty condensed into one of them: each solution caps the satisfiable world simply, from above, while unsatisfiability assembles from below in irreducibly many ways. That lopsidedness is NP vs coNP, drawn as geometry.
Between the mirror worlds sits NP ∩ coNP — problems with certificates both ways. Its residents feel “almost in P”: you can prove a yes and prove a no, you just allegedly can’t find which. Primality lived here from 1975 until 2002, then moved downtown. Factoring lives here now (a factorization certifies “yes, there’s a factor below ”; the full factorization plus primality certificates for the pieces certifies “no”). The suburb keeps sending residents downtown — linear programming in 1979, primality in 2002. And a standing heuristic (not a theorem) says problems in NP ∩ coNP tend not to be NP-complete: if factoring were NP-complete, every NP problem would translate into it (Chapter 2’s reductions, which send no-instances to no-instances). Any no-instance of yours would then map to a no-instance of factoring, factoring’s “no” certificate would ride the translation back as a short “no” certificate for your problem, and every coNP question would have NP-style evidence: NP = coNP, collapsing a distinction most experts bet is real. Your TLS session (RSA: security = factoring’s hardness) is a wager on the suburb’s one stubborn resident staying put.
Search versus decision: the oracle pays out in full
A skeptic’s objection to all this yes/no formalism: “even if some oracle answered whether a dinner list exists, I’d still have to find one.” The objection fails, and the failure is exactly why P = NP would be a working technology. SAT is self-reducible: a decision oracle, asked about modified formulas, leaks a solution bit by bit. Pin a variable and ask whether the pinned formula is still satisfiable. Keep the pin if yes, flip it if no. Repeat. Here it is running live on , with every oracle answer brute-force verified:
Count the cost: one opening call asks whether the formula is satisfiable at all, then one call per variable pins it — calls for variables (ours took 5). Each call’s formula is just the original plus the pins so far, written as unit clauses (one-literal clauses that force a variable’s value). If SAT’s decision problem is in P, finding assignments is in P. And by Cook–Levin, so is finding the sudoku solution, the schedule, the Pratt-style proof: search collapses into decision across all of NP, converting “P = NP” from an abstract equality into “a machine that outputs the goods.”
The upper floors
The map doesn’t stop at NP and coNP — and you’ve already worked at the floor above. “Does White have a winning move?” isn’t an NP question: a winning move is only winning if for every reply there exists a crushing counter, and so on. Each alternation of “there exists” and “for all” is a floor of the polynomial hierarchy (PH). NP is floor one ( a certificate), and coNP is its mirror (). Floor two holds problems like “does there exist a smaller circuit equivalent to this one” ( a circuit such that inputs it agrees) and so on upward. The floors carry names you’ll meet in the literature: for alternations starting with , starting with — so NP is , coNP is , and the circuit question is .
Even the dinner party can pose a question with that ∃∀ silhouette: is there a robust guest list, one satisfying that keeps satisfying it no matter which single invitee cancels? (For our the answer is no, checkable by hand: all three solutions hang by a single guest. and collapse to an empty table, violating “someone must come,” and the couple collapses to half a couple, violating their pairing clauses.) But watch the trap, the hierarchy’s most common misreading: this question is not floor two. Its “for all” ranges over at most four cancellations, so a verifier simply loops through them; polynomially many checks fold into the certificate check, exactly the way “for all clauses” folds into SAT’s own verifier without making SAT a ∀-problem. A quantifier earns a floor only when it ranges over an exponentially large space, the way ” inputs” does in the circuit question above: no polynomial verifier can loop over inputs. Rule of thumb: a ∀ over polynomially many things is a subroutine; a ∀ over exponentially many is a new adversary. Two facts about the hierarchy:
-
The hierarchy is believed infinite but proven fragile: if any floor equals the one above it, everything from there up pancakes down, and if P = NP the entire tower collapses to P. It’s a ladder of increasingly bold conjectures, all resting on the ground floor’s question. (Its fragility gets weaponized in Chapter 7: “if X held, PH would collapse” is the field’s favorite way to argue X is false.)
-
Let the alternations grow with input size (“exists a move such that for all replies… exists a move such that… White wins,” moves deep) and you reach PSPACE: problems solvable with polynomial memory and unlimited time. (Why memory: a game tree explores one line of play at a time, reusing the same scratch space per branch — deep, but never wide in memory.) Its complete problem — hardest in the class, everything in PSPACE reducing to it, the same sense in which SAT is complete for NP — is QBF, quantified Boolean formulas (also written TQBF, for true quantified Boolean formulas): SAT with and quantifiers prefixed. Perfect play in generalized board games lives here. One floor further up, at EXP (exponential time, the outer wall Chapter 1 proved real), sit games like chess with exponentially long battles.
Toggle the figure’s collapse and study what survives. Every containment drawn is proven: P ⊆ NP ∩ coNP ⊆ NP ⊆ PH ⊆ PSPACE ⊆ EXP. Exactly one fence on the whole map is proven real — P ≠ EXP, Chapter 1’s hierarchy theorem. So somewhere between P and EXP, at least one inclusion must be strict. Every single candidate (P vs NP, NP vs PH, PH vs PSPACE, even P vs PSPACE in its entirety) is open. We know the prison has an outer wall; we cannot prove a single interior door is locked.
And where does Ladner’s theorem fit — can a problem be in NP, hard, but not NP-complete?
Yes — conditionally. Ladner proved in 1975 : if P ≠ NP, then NP-intermediate problems exist — in NP, outside P, yet not NP-complete. His construction is an artificial diagonalization sandwich (a problem that alternates between behaving easy and behaving hard), but nature seems to supply real candidates: factoring, as argued above, and graph isomorphism. The latter resisted both a polynomial algorithm and an NP-completeness proof for 40 years, until László Babai’s 2015 quasipolynomial algorithm — running in , tantalizingly between polynomial and exponential — made “almost easy” official. If P ≠ NP, the world between P and NP-complete isn’t empty; it’s where cryptography goes shopping. Compare Chapter 2: within Schaefer’s SAT variants the middle is provably empty, yet in NP at large the middle is provably inhabited (granted P ≠ NP). Dichotomy, it turns out, is a local law.
Where do quantum computers land on this map?
BQP (what quantum computers can do in polynomial time) contains factoring (Shor, 1994 ), which is why Chapter 1 called quantum a serious challenge to the extended Church–Turing thesis, and why your TLS stack is scheduled to migrate to lattice problems. But the expert consensus is that BQP does not contain the NP-complete problems: quantum search over possibilities buys a square root (Grover , provably optimal for black-box search), and is still exponential. Shor’s algorithm exploits periodic structure in factoring that generic SAT instances lack. So the P vs NP question survives quantum computing intact: it was never “can silicon do it” — it’s “does the structure exist to be exploited, by any machine at all.”
The stakes: what P = NP would actually mean
Chapter 2 set the technical stakes — every NP problem collapses into P, and this chapter’s self-reducibility means you get the solutions, not just the verdicts. Now trace the consequences through the map, floor by floor:
- The hierarchy pancakes. NP = coNP (the “no”s get certificates), and the whole PH tower falls into P: every “exists a move for all replies” question — game-strategy verification and minimal circuit design among them — becomes polynomial.
- Computational cryptography becomes impossible. The category dies, not just today’s ciphers, because every practical cipher is a certificate problem: the key certifies the plaintext. (Only information-theoretic schemes like the one-time pad, whose keys are as long as all the traffic they protect, survive.) A one-way function (easy forward, hard backward — the primitive under all of crypto) cannot exist if P = NP, since inverting one is an NP search problem. No TLS, no signatures, no password hashing that beats lookup, no blockchain worth the name.
- Mathematics industrializes. Gödel’s 1956 letter paid in full: “is there a proof of theorem at most pages long” is in NP — the proof is its own certificate, and proof-checking is polynomial (it’s what Lean and Coq do). P = NP with a practical algorithm means finding any proof at polynomial cost in its length. The Riemann hypothesis’s resolution would be a compute bill.
- Learning and optimization trivialize. “Find the smallest circuit consistent with this data” (machine learning’s platonic form) is an NP search. Chip layout, protein design, scheduling at every scale: the optimization industry becomes a SAT-encoding industry (Chapter 4 will show that industry already exists, running on heuristics).
One caveat before the vision runs away: P = NP could in principle arrive as a useless galactic algorithm (Chapter 1’s caveat, cashing in). Most theorists consider that outcome unlikely (natural problems’ exponents historically collapse) but “P = NP” and “the world transforms on Tuesday” are logically separable claims.
The converse bites harder in engineering: P ≠ NP would guarantee almost none of what people assume it would. It’s a worst-case statement. It would not prove your cipher secure — crypto needs problems hard on average, equipped with a trapdoor, a secret that makes the hard direction easy for the key’s owner: a much stronger demand. Nor would it prove your scheduling instances intractable (they’re probably not — Part II), nor that SAT solvers must fail you. In 1995, Russell Impagliazzo organized this gap into five possible worlds , distinguished not by P vs NP alone but by how much hardness exists and how reliably it can be summoned:
Every one of the five is consistent with everything humanity has proven. We act like we live in Cryptomania — the figure’s bottom world, where reliably hard problems with trapdoors make public-key cryptography sound; every HTTPS connection is a bet on it — but we cannot yet rule out Algorithmica, the top world, where P = NP (or near enough) and none of that survives. The distance between “worst-case hard” and “reliably hard where I need it” (the distance between proving P ≠ NP and justifying Cryptomania) runs straight through the question of what typical instances look like — a question Chapter 6 answers with an experiment.
The question is precise: is there a polynomial-time algorithm for SAT? Theorists have spent fifty years failing to answer it in either direction. Engineers, meanwhile, did something impudent: they stopped waiting. Starting in the 1990s, they built programs that solve real SAT instances (hardware verification formulas with millions of variables) in seconds, worst-case theory be damned. The next three chapters are about what they built, why it works, where it provably cannot, and what the whole adventure teaches about the main question. First up: the solvers.
Further reading
- Every Prime Has a Succinct Certificate (Pratt, 1975) — the paper that put primality in NP; four pages, a classic.
- PRIMES is in P (Agrawal, Kayal & Saxena, 2004) — the destination of primality’s 27-year migration; elementary, rare for an Annals paper.
- A Personal View of Average-Case Complexity (Impagliazzo, 1995) — the five worlds, from the source; the most useful ten pages of perspective in complexity theory.
- Graph isomorphism in quasipolynomial time (Babai, 2015) — the biggest single move on the map in decades.
- The Status of the P versus NP Problem (Fortnow, 2009) — a CACM-level tour of the stakes, including the “industrialized mathematics” vision.