INSIDE MACHINES

The Million-Dollar Problems · 2 of 7

P vs NP

If a computer can quickly check an answer, can it always quickly find one too?

$1,000,000 · still unsolved 18 min read, with things to play with

Hand a friend a finished Sudoku and they can check it in a minute: every row, every column, every box. Hand them a blank one and it might take an hour. Now imagine a Sudoku a hundred squares wide, or a delivery route through 500 cities. Checking a proposed answer still takes moments. Finding one seems to take longer than anyone could ever wait.

Is that gap real, or are we just not clever enough yet? That is the P vs NP problem, one of the seven Millennium Prize Problems. In 2000 the Clay Mathematics Institute offered one million dollars for a proof either way. It is still unsolved.

The answer matters far beyond puzzles. The locks that protect online banking, the schedules of airlines and the search for mathematical proofs all sit on one side of this question or the other. Nobody knows which side.

1 · Play first

Check it, or find it?

Below is a Subset Sum puzzle: a list of whole numbers and a target. Your job is to pick some of the numbers so they add up to exactly the target. Every puzzle is built so that an answer exists.

Try it by hand, then let the computer try every possible group. Finally, slide the size up and watch what happens to the time.

1. Find it yourself

Tap numbers so they add up to exactly 227. A solution is guaranteed.

Pick some numbers. The check runs instantly.

2. Let the computer search

Brute force tries every possible group of the 12 numbers: 4,095 non-empty subsets, checking each one.

Tried 0 of 4,095Time 0.00 sSpeed –Answers found 0

Done. Checking one answer took 12 additions. Finding every answer took 4,095 checks. Try a bigger size: every 4 extra numbers make the search 16 times longer.

3. What if there were more numbers?

Check one answer31 nanoseconds30 additions + 1 comparison
Try every subset1.1 seconds2^30 = 1.07 × 10^9 subsets

That is a tiny sliver of the age of the universe. Keep sliding.

100101010201030age of the universe at 10⁹ checks/s2ⁿn²n (how many numbers), 1 to 100

Simplified: the projection assumes a computer that checks a billion subsets a second, and the chart uses a log scale (each gridline is 10 billion times the one below). Smarter methods than brute force exist, roughly 2^(n/2), but none is known to stay polynomial for every input. Whether one exists is the P vs NP question.

What to notice
  • Checking your choice is instant: one addition per number you picked, then one comparison.
  • Each extra number doubles the number of groups the computer must try. Going from 20 to 24 numbers makes the search 16 times longer.
  • At a billion checks a second, trying every group of about 89 numbers takes longer than the age of the universe, while checking one answer still takes under a ten-millionth of a second.
  • The chart uses a log scale. On it, n2n^2 bends over and stays low while 2n2^n climbs in a straight line.

2 · The equation, piece by piece

To turn "quick to check" into maths, computer scientists describe a yes/no problem as a language LL: the set of all inputs whose answer is yes. For Subset Sum, an input xx is a list of numbers plus a target, and xx is in LL when some group of the numbers hits the target.

A problem is in NP if every yes answer comes with a short piece of evidence, called a certificate or witness, that a fast checker can confirm. Here is that definition, followed by the question itself. Tap any piece to see what it means.

L∈NP  ⟺  ∃ V poly-time, ∃ k:x∈L  ⟺  ∃ w, ∣w∣≤∣x∣k, V(x,w)=1P=?NP\htmlClass{t0}{L \in \mathrm{NP}} \iff \htmlClass{t1}{\exists\, V \text{ poly-time}},\ \htmlClass{t2}{\exists\, k} :\quad \htmlClass{t3}{x \in L} \iff \htmlClass{t4}{\exists\, w},\ \htmlClass{t5}{|w| \le |x|^k},\ \htmlClass{t6}{V(x,w) = 1} \qquad \htmlClass{t7}{\mathrm{P} \overset{?}{=} \mathrm{NP}}
L∈NPL \in \mathrm{NP}
The problem is in NP

LL is a language: the set of inputs whose answer is yes. NP stands for nondeterministic polynomial time. It does not mean "non-polynomial".

Notice what the definition leaves out. It asks for a fast way to check, not a fast way to find. P asks for a fast way to find. P vs NP asks whether those two kinds of speed are secretly the same.

3 · What's going on

1Fast and slow, measured properly

"Fast" depends on the computer, so theorists measure something steadier: how the number of steps grows as the input gets bigger. Call the input size nn. For Subset Sum, nn is how many numbers are in the list.

An algorithm runs in polynomial time if its steps grow like n2n^2, n3n^3 or nn to some other fixed power. Checking a Subset Sum answer takes about nn additions, which is polynomial. Trying every group of numbers takes 2n2^n checks, because each number is either in or out. That is exponential time: add one number and the work doubles.

The difference is enormous. At n=10n = 10, n2n^2 is 100 and 2n2^n is 1,024: close. At n=60n = 60, n2n^2 is 3,600 while 2n2^n is about 1.15×10181.15 \times 10^{18}. A billion steps a second clears the first in a few millionths of a second and the second in more than 36 years.

In the 1960s, Alan Cobham and Jack Edmonds proposed polynomial time as the working meaning of "efficient". Edmonds called such algorithms "good algorithms". The idea stuck because it does not depend on which computer you use.

n=60:n2=36002n≈1.15×1018n = 60:\quad n^2 = 3600 \qquad 2^n \approx 1.15 \times 10^{18}
Polynomial against exponential growth at the same input size.

2Machines, inputs and the worst case

To prove anything about every possible program, you need a precise model of a program. The standard one is the Turing machine, introduced by Alan Turing in 1936: a simple device that reads and writes symbols on a tape, one step at a time. Anything a laptop can compute, a Turing machine can compute too.

An input is a string of symbols from a finite alphabet Σ\Sigma, such as {0,1}\{0,1\}. The running time of a machine MM is judged by its worst case: the most steps it ever takes on any input of length nn. That worst case is written TM(n)T_M(n).

This matters. A method that is quick on most inputs but painfully slow on a few does not count as polynomial. P is about guarantees for every input, however nasty.

TM(n)=max⁡{ tM(w)∣w∈Σn }T_M(n) = \max\{\, t_M(w) \mid w \in \Sigma^n \,\}
Worst-case running time: the slowest run over all inputs w of length n.

3Two classes: P and NP

P is the set of yes/no problems that some Turing machine solves within nk+kn^k + k steps, for some fixed kk. Sorting a list, finding the shortest route on a map and testing whether a number is prime are all in P. The last one was only proved in 2002, by Manindra Agrawal, Neeraj Kayal and Nitin Saxena.

NP is the set of yes/no problems where every yes answer has a short certificate that can be checked in polynomial time. Subset Sum is in NP: the certificate is the group of numbers. Sudoku is in NP: the certificate is the filled grid.

Anything you can solve fast, you can also check fast: just solve it again and compare. So P sits inside NP. The question is whether NP contains anything that P does not.

P⊆NPP=?NP\mathrm{P} \subseteq \mathrm{NP} \qquad \mathrm{P} \overset{?}{=} \mathrm{NP}
The easy direction is known. The other direction is the open problem.

4The hardest problems in NP

In 1971 Stephen Cook showed that one problem, SAT, is as hard as anything in NP. SAT asks whether a logic formula built from AND, OR and NOT can be made true by some choice of true/false values. Cook proved that every NP problem can be translated quickly into SAT. Leonid Levin found the same idea independently in the Soviet Union and published it in 1973.

Problems with this property are called NP-complete. In 1972 Richard Karp showed that 21 natural problems are NP-complete, and he introduced the names P and NP. By 1979 Michael Garey and David Johnson's book listed about 300. Today there are thousands, including Subset Sum, colouring a map with three colours and finding a route that visits every city exactly once.

They all stand or fall together. A fast algorithm for any single NP-complete problem would give a fast algorithm for every problem in NP. Decades of effort by mathematicians, programmers and industry have found no such algorithm for any of them.

L NP-complete  ∧  L∈P  ⟹  P=NPL \text{ NP-complete} \;\wedge\; L \in \mathrm{P} \;\Longrightarrow\; \mathrm{P} = \mathrm{NP}
One fast NP-complete algorithm would collapse the whole question.

5Smarter than brute force, but still not fast

Brute force is not the only way to attack Subset Sum. A trick called meet in the middle splits the list in half, lists every sum of each half and matches them up. That needs about 2n/22^{n/2} steps: a huge improvement, but still exponential.

Another method, dynamic programming, is fast when the numbers themselves are small, because it tracks which totals are reachable. When the numbers are hundreds of digits long, it slows down badly. No known method stays polynomial on every input.

The same story repeats for SAT. Cook's official problem description cites the best known algorithms for 3-SAT (SAT with three values per clause) at roughly 1.5n1.5^n steps. Later improvements are small. Clever ideas shave the exponent, but none has removed it.

That is the heart of the problem. Showing that brute force is slow is easy. Showing that every possible algorithm, including ones nobody has invented, must be slow is what nobody can do.

2n  ⟶  2n/2  ⟶  ?2^n \;\longrightarrow\; 2^{n/2} \;\longrightarrow\; ?
Meet in the middle halves the exponent. Nobody knows if the exponent can disappear.

6What lies between

If P and NP are different, is every NP problem either easy (in P) or hardest (NP-complete)? No. In 1975 Richard Ladner proved that if P ≠ NP, there must be NP problems in between: harder than P, but not NP-complete.

Two natural suspects are factoring (splitting a large number into primes) and graph isomorphism (telling whether two networks are the same network with the dots rearranged). In 2015 László Babai announced a quasi-polynomial algorithm for graph isomorphism, much faster than before. Harald Helfgott found an error; Babai withdrew the claim on 4 January 2017 and announced a fix five days later.

Factoring has no known fast algorithm on ordinary computers, and much of internet security depends on that. But factoring is not believed to be NP-complete, so even a fast factoring method would not settle P vs NP.

7What most experts believe

In 2019 Bill Gasarch ran his third poll of researchers on P vs NP and received 124 responses. About 80% believed P ≠ NP. Among those who had thought hardest about the problem, about 99% did.

The reasons are practical as much as mathematical. Thousands of NP-complete problems, attacked for fifty years by some of the best minds and by industries with billions at stake, have never yielded a fast method. If P = NP, it would be strange that nobody has stumbled on a single example.

But belief is not proof. Primality testing looked hard for centuries and turned out to be in P. The million dollars is for a proof, and the proof is exactly what is missing.

4 · Why it's so hard

To prove P ≠ NP, you must show that no algorithm at all, among infinitely many, can solve SAT quickly. To prove P = NP, you must find one that does, or prove one exists. Either way you are making a claim about every possible program.

Worse, researchers have proved that whole families of proof techniques can never work. These results are called barriers. Any real proof has to get past all three at once. Lance Fortnow, writing in June 2026, put it bluntly: "we don't even have a viable approach."

Even the simplest kind of lower bound is out of reach. The best proved lower bound on the size of a general circuit for an explicit problem is only about 4n4n gates, according to Cook's description, and later work raised it only slightly. As far as anyone can prove, SAT might have a linear-time algorithm.

Relativization (Baker, Gill and Solovay, 1975)

Give every computer a magic helper, an oracle, that instantly answers one fixed kind of question. Classic tricks like simulation and diagonalization (the method Turing used for the halting problem) work the same with any oracle. But some oracles make P = NP and others make P ≠ NP. So those tricks alone can never decide the question.

Natural proofs (Razborov and Rudich, 1993)

Most proofs that limited circuits are weak find a simple, common property that makes a function hard. Razborov and Rudich showed that a proof of this kind against strong enough circuits would also break pseudorandom generators, the building blocks of codes we believe are secure. The proof would undermine the very assumption it needs.

Algebrization (Aaronson and Wigderson, 2008)

Some newer results dodge relativization by turning logic into polynomial algebra. Scott Aaronson and Avi Wigderson showed that even these algebraic tricks have an oracle-like version, and that version cannot settle P vs NP either.

5 · What a solution would change

Codes and online security

Public-key cryptography, used to protect online banking and shopping, rests on problems believed to be hard. Cook writes that if P = NP these assumptions "are all false". He gives an example: an n2n^2 algorithm for 3-SAT could factor 200-digit numbers in minutes. The reverse is not automatic: P ≠ NP alone would not prove our codes are safe, because codes need problems that are hard on typical inputs, not just the worst ones.

Scheduling, routing and design

Timetables, delivery routes, chip layouts and many models in biology are full of NP-hard problems. Today we use heuristics and SAT solvers that work well on many real cases. A fast general method would change industry. A proof of P ≠ NP would tell us to stop looking for one.

Mathematics itself

Checking a formal proof is fast. So if P = NP with a practical algorithm, a computer could find any proof of reasonable length. In 1956 Kurt Gödel wrote to John von Neumann asking about exactly this, and said it "would have consequences of the greatest magnitude".

Knowing the limits

A proof of P ≠ NP would be the first proof that some natural, everyday kind of problem is truly hard, not just hard for us so far. It would also likely bring new mathematical tools, since the known techniques provably cannot do it.

6 · Where it stands

As of October 2026

P vs NP is open. The Clay Mathematics Institute lists it as unsolved, and no proof in either direction is accepted by the research community.

Claimed proofs arrive constantly. Woeginger's list counted 116 by 2016. In April 2025 Fortnow reported receiving seven "proofs" in two weeks. One claim was even published in a journal: Ke Xu and Guangyan Zhou's "SAT Requires Exhaustive Search", which appeared in Frontiers of Computer Science in 2025. It is not accepted. A group at the University of Rochester (Chavrimootoo and colleagues, 2023) found that the argument assumes algorithms must work in a particular self-reducing way, and that assumption is not justified. Publication alone does not make a proof correct.

A recent AI claim. On 26 October 2026, OpenAI announced that an internal model had disproved the Exponential Time Hypothesis (ETH), with a Lean formalisation, as reported by The Next Web and AI Weekly. ETH says 3-SAT needs truly exponential time. This claim is unverified and under review by Russell Impagliazzo, Ramamohan Paturi and Ryan Williams, who say their involvement should not be taken as certification. Even if it holds, it would mean 3-SAT can be solved in sub-exponential time, which is still slower than polynomial. It would not settle P vs NP.

In June 2026, after a run of AI-assisted results elsewhere in mathematics, Fortnow wrote: "I do not believe we will see a P v NP proof in my lifetime proven by man or machine."

  1. 1936

    Alan Turing introduces the Turing machine, the model later used to define P and NP.

  2. 1956

    Kurt Gödel writes to John von Neumann asking whether a machine could find proofs in about nn or n2n^2 steps.

  3. 1960s

    Alan Cobham and Jack Edmonds propose polynomial time as the meaning of an efficient algorithm.

  4. 1971

    Stephen Cook defines NP-completeness and proves that SAT is NP-complete.

  5. 1972

    Richard Karp shows 21 natural problems are NP-complete and introduces the names P and NP.

  6. 1973

    Leonid Levin independently describes universal search problems, including SAT.

  7. 1975

    Baker, Gill and Solovay find the relativization barrier. Ladner proves that if P ≠ NP, in-between problems exist.

  8. 1993

    Razborov and Rudich describe the natural proofs barrier.

  9. 2000

    Clay names P vs NP one of seven Millennium Prize Problems, with an official description by Stephen Cook.

  10. 2002

    Agrawal, Kayal and Saxena prove that testing whether a number is prime is in P.

  11. 2008

    Aaronson and Wigderson describe the algebrization barrier.

  12. 2016

    Gerhard Woeginger's list of claimed proofs reaches 116, in both directions. None is accepted.

  13. 2019

    Bill Gasarch's third poll: about 80% of 124 researchers believe P ≠ NP.

  14. 2026

    On 26 October OpenAI claims an AI disproof of the Exponential Time Hypothesis. It is under review and would not settle P vs NP even if correct.

Common mix-ups

MythNP means "not polynomial".

ActuallyIt means nondeterministic polynomial time. Every problem in P is also in NP. The question is whether NP contains anything more.

MythNP-hard problems can never be solved.

ActuallyThey are solved every day. Exact methods slow down exponentially in the worst case, and many real instances are easy. The puzzle above solves instantly for 12 numbers.

MythIf P = NP, all encryption breaks tomorrow.

ActuallyOnly if the proof gives an actual algorithm and that algorithm is practical. A method that takes n100n^{100} steps is polynomial but would change little in practice.

MythBrute force is the only way, so P ≠ NP is obvious.

ActuallyClever algorithms often beat brute force: primality testing was shown to be in P in 2002. The hard part is proving that no algorithm can do better, including ones nobody has thought of yet.

MythAn AI or a journal paper has already solved it.

ActuallyAs of 29 October 2026, no. The Xu and Zhou paper has a known flaw, and the OpenAI claim is about a different hypothesis, is still under review, and would not settle P vs NP even if correct.

7 · References

  1. P vs NP (Millennium Problem page), Clay Mathematics Institute, 2026
  2. The P versus NP Problem (official problem description), Stephen Cook, 2000
  3. P =? NP (survey), Scott Aaronson, 2016
  4. Respect the P v NP Problem, Lance Fortnow (Computational Complexity blog), 2026
  5. P v NP Papers Galore, Lance Fortnow (Computational Complexity blog), 2025
  6. Third Poll on P vs NP and Related Questions, Bill Gasarch (Computational Complexity blog), 2019
  7. The P-versus-NP page, Gerhard J. Woeginger, 2016
  8. SAT Requires Exhaustive Search, Ke Xu and Guangyan Zhou (arXiv), 2023–2024
  9. Evaluating the Claims of "SAT Requires Exhaustive Search", Chavrimootoo, He, Kotler-Berkowitz, Liuson and Nie (arXiv), 2023
  10. Graph Isomorphism Vanquished — Again, Erica Klarreich (Quanta Magazine), 2017
  11. OpenAI says its models disproved the Exponential Time Hypothesis, The Next Web, 2026
  12. OpenAI ETH, Kakeya and Yang–Mills claims (news summary), AI Weekly, 2026
Next problemRiemann: Do all the nontrivial zeros of the Riemann zeta function lie on the single line with real part one half?