Chapter I
From Possible to Practical
Computability theory sorted problems into solvable and unsolvable. But once real computers existed, a solvable problem that needs longer than the age of the universe was no better than an unsolvable one. In 1965 Juris Hartmanis and Richard Stearns began measuring problems by the time they need, and Jack Edmonds and Alan Cobham proposed a dividing line. An algorithm is efficient if its running time grows like a polynomial in the input size, not exponentially. Edmonds contrasted his efficient algorithm for matching with brute-force search and asked, in effect, which problems allow the former.
Chapter II
NP-Completeness
In 1971 Stephen Cook identified the class NP, problems whose solutions can be checked in polynomial time, and proved that one of them, deciding whether a logical formula can be made true, is as hard as every other. In Moscow, Leonid Levin had reached the same insight, but it reached print only in 1973. A year after Cook, Richard Karp showed that 21 central problems (Hamiltonian circuit, graph colouring, knapsack) are all NP-complete. Efficiently solve one and you solve them all.
That turned an engineering frustration into a single mathematical question: does P equal NP? It later emerged that Gödel had asked something like it in a 1956 letter to a dying von Neumann: could a machine find proofs as quickly as they can be checked?
Chapter III
Barriers
Most researchers believe P ≠ NP, and nobody can prove it. Worse, the field has proved that its own tools are inadequate. Diagonalisation, the trick behind Cantor, Gödel and Turing, cannot work: Baker, Gill and Solovay showed in 1975 that it gives the same answers in worlds where P = NP and where it does not. Alexander Razborov and Steven Rudich showed in 1994 that most known methods for proving circuits must be large would, if they worked, also break cryptography. Algebraic methods were ruled out in 2008–09. Knowing exactly why the problem is hard is itself a major result.
Chapter IV
A Closer Look: Easy to Check, Hard to Find
Here is a small instance of the satisfiability problem (SAT). Can true/false values be chosen for , and to make all of these clauses true at once?
Try , , . The clauses become (true or false), (false or true), (true or false) and (false or true), all true. Checking a proposed answer took a few seconds. That is what it means for SAT to be in NP: a solution, once found, can be verified quickly.
Finding one is another matter. With variables there are possible assignments. For 3 variables that is 8, easily checked by hand. For 100 variables it is
A computer testing a billion assignments per second would need about years, thousands of times the age of the universe. Clever algorithms do far better than brute force on typical instances, which is why industrial SAT solvers work. But no known algorithm avoids exponential time on the hardest instances.
The Cook–Levin theorem says SAT is NP-complete: any problem whose solutions can be checked quickly can be translated into a SAT instance of manageable size. A fast algorithm for SAT would therefore give fast algorithms for scheduling, routing, protein-folding models, theorem-proving and thousands of other problems. P versus NP asks whether that fast algorithm exists. Almost everyone believes it does not, and no one can prove it.
Chapter V
Hard Problems, Useful Hardness
Hardness has uses. The security of public-key cryptography rests on problems believed to lie outside P. The PCP theorem of the 1990s showed that for many problems even approximate answers are hard, which tells engineers when to stop looking for perfect algorithms. Knowing which problems are hard also points to better formulations. Genomics avoided an NP-complete version of genome assembly by recasting it as an easy one. The deepest question of the Foundations Thread, whether finding is harder than checking, is still unmapped.