Problem · Clay Millennium Prize · Computer science
P versus NP
Listen
If you can recognize a right answer quickly, must there also be a quick way to invent one?
01 · History
Hard to invent. Easy to check. That gap named a field.
The letter sounded like a complaint. Kurt Gödel, writing to John von Neumann in 1956: if a proof is easy to check, why should finding one be a nightmare? The irritation was already old. Computers made it worse.
Picture a sudoku. Filling the grid from scratch is a scramble through dead ends. Checking a finished grid is a glance: scan each row, column, and block. That gap (hard to invent, easy to verify) kept showing up once computers were asked to schedule trucks, pack boxes, route wires on a chip, or satisfy a tangle of logical rules.
In the 1950s and 1960s, people who wrote algorithms noticed a split. Some jobs scaled politely: multiply two numbers, sort a list, find a shortest path in a friendly graph. Double the input size and the work grows by a manageable factor. Theorists later called that polynomial time: the running time is roughly a power of the input size, not an explosion. Other jobs seemed to demand a frantic search: try this arrangement, reject it, try the next. Each extra variable could roughly double the work.
Stephen Cook (1971) and, independently, Leonid Levin on the other side of the Iron Curtain, made the split precise. Two people. Two worlds. Same itch. Class P is the family of yes/no questions a computer can settle efficiently. Class NP is the family where every “yes” comes with a short witness you can check efficiently: a filled sudoku, a tour of cities, an assignment of true and false that obeys every clause. Cook showed that Boolean satisfiability (the puzzle of setting switches so every logical rule is true) is complete for class NP: if that puzzle has a fast algorithm, so does every problem in the class.
Richard Karp soon listed dozens of natural problems with the same status: routing, packing, clique-finding, and more. A private worry of algorithm designers became a public dare. Are finding and checking secretly the same power, or is there a real wall between them?
Growth rates
n = 12: polite ~ 1,728, brute force ~ 4,096 checks
02 · Exact statement
The claim in one sentence
P versus NP
Is class P equal to class NP? That is: can every problem whose solutions are verifiable in polynomial time also be solved in polynomial time?
In plain language: if a short proof or certificate is enough for you to check a “yes” answer quickly, does that mean there is also a quick way to invent the answer? Formally, class P is the set of decision problems a deterministic computer can settle in time that grows like a power of the input length. Class NP is the set where every yes-instance has a certificate you can check in that same polite time bound. The open question is whether these two sets are the same.
03 · Where it stands
Most experts expect the classes differ. Nobody has a proof.
Decades of clever algorithms have shaved constants and conquered special cases. For the hardest problems in class NP, the best exact methods still look exponential in the worst case: fine for a dozen variables, hopeless for a few hundred. Industry lives with heuristics, approximations, and luck. Cryptography, in particular, bets that some answers stay hard to find even when they are easy to check.
Theory has partial trophies: lower bounds in restricted models, barriers that rule out certain proof styles, and a zoo of finer complexity classes. None settles whether the two classes are equal. The question is still open in the same blunt sense it was in 1971.
- Formal status
- Open. One of seven Clay Millennium Prize Problems.
- Working consensus
- Widely believed that the two classes differ. A proof is still missing.
- What a proof would buy
- Either a universal efficient solver for a huge family of search problems, or a rigorous wall explaining why none exists.
- What remains missing
- A technique that separates efficient finding from efficient checking in a way that survives every clever algorithmic trick.
What would count as solved
The finish line, in plain language
A solution settles whether every problem whose yes-answers are easy to check also has an easy way to find those answers. Either the two classes collapse into one, or there is a rigorous wall between them.
- Prove that class P equals class NP (for example by giving a fast algorithm for an NP-complete problem), or prove that the classes differ.
- Partial results, heuristics, and lower bounds in restricted models do not count until they settle the full question.
- Under Clay Millennium Prize rules, the proof must survive community scrutiny and their formal requirements.
04 · Visualizations
Checking is easy. Searching may not be.
Here is a tiny yes/no puzzle: set some switches so every rule comes out true. Checking one guess is fast. Trying every guess is not.
The chart and the search share the same n. Move either control and both update, so you can feel the search get longer as the dashed curve climbs.
Growth rates
n = 4: polite ~ 64, brute force ~ 16 checks
Yes/no rules · try every guess
Find a yes/no setting that obeys every rule.
Rules to satisfy
- A is on, or B is off (or both)
- B is on, or C is on (or both)
- A is off, or C is off (or both)
- Guesses tried
- 1 / 16
- Rules all true?
- not yet
- Current guess
- A:off · B:off · C:off · D:off
05 · Impact
What a resolution would rearrange
If the two classes are equal, a huge family of search problems (scheduling, routing, circuit design, many puzzles and optimizations) would suddenly have efficient algorithms in principle. A lot of what feels like creative search would collapse into something as tame as grading homework.
If the classes differ, we gain a rigorous wall: some answers are easy to verify and still hard to find. Passwords, digital signatures, and much of modern security already bet on that wall. Either way, settling the question redraws the boundary between what computers can invent and what they can only recognize.
Dive deeper
Video
P vs NP on TV
Computerphile ↗
Simon Singh on how the question snuck into The Simpsons and Futurama.
Reading
Complexity Theory’s 50-Year Journey to the Limits of Knowledge
Quanta Magazine ↗
A long-form tour of what “easy to check” has meant since the 1970s.
Reading
Official problem description
Clay Mathematics Institute ↗
The prize statement for the equal-versus-unequal question.