Skip to content

Tutorial 12 of 13 · Simulated in your browser

P, NP and what quantum can’t promise

Ten invented bands, three nights, and a question nobody has settled: is finding an answer harder than checking one? What a quantum computer does and does not change.

  • Festival graph

Finding is not checking

An invented weekend festival has ten bands and three nights, and two bands that share a member can’t play the same night. Draw each band as a dot, each shared member as a line between two dots and each night as a colour, and you have graph 3-colouring. Checking a schedule is looking along each of the 15 lines once. Finding one, out of 59,049 schedules, is a different job.

P is the problems that can be solved quickly, and NP is the ones whose answers can be checked quickly. Every problem in P is in NP. Whether the reverse holds, whether everything quick to check is quick to solve, is the open question. It’s one of the Clay Mathematics Institute’s Millennium Prize problems.

Clashes
0 of 15
Lines checked
15
Nights in use
0 (0 placed)
Schedules to choose from
59,049

InventedClick a band, or its button below, to move it to the next night. Every number is counted, never timed. Search tries the bands in order and backs up when a night clashes. Greedy takes each band in order and gives it the first night that is free, and never looks back.

Where the question came from

In 1971 Stephen Cook showed that one problem, deciding whether a logical formula is a tautology, captures every problem a nondeterministic machine solves in polynomial time: in today’s terms, the first NP-complete problem. The paper itself doesn’t use the word. In 1972 Richard Karp named P and NP and showed twenty-one problems to be equally hard, among them a chromatic number problem where the number of colours is part of the input. Garey, Johnson and Stockmeyer showed in 1976 that fixing it at three is hard.

NP-complete means one key opens every lock. 3-SAT can be turned into a 3-colouring puzzle, and every NP problem can be turned into a SAT one, so a fast method for the festival would give a fast method for every problem in NP. That’s also why a single fast method for any one of them would settle the whole question.

The quantum myth, in numbers

A quantum computer doesn’t try every schedule at once. Measure it and you see one candidate, with a probability set by its amplitude, which is the point of the interference tutorial. Grover’s algorithm searches an unordered list of N items in about √N steps where a classical search needs about N, and for the festival N is 3ⁿ. So the quantum count is about 3^(n/2).

Relative to a random oracle, no quantum algorithm solves NP in time below about 2^(n/2): Grover is the best possible for that kind of blind search. At 10 bands Grover needs about 191 queries against 59,049 schedules, and at twenty about 46,377. Double the bands and you’re back at the brute-force count for the old size, so you can schedule a festival twice the size in the same effort, not a festival of any size. Square-rooting an exponential leaves an exponential.

That bound only covers black-box search. Nobody has ruled out a cleverer quantum method that uses the festival’s structure, and nobody knows one. Nor do the oracle results rule out NP ⊆ BQP.

10 bands
1 workers
  • Schedules to try59,049
  • Grover’s queries, about191
  • Lines to check one schedule, at most45
  • n cubed, an example polynomial1,000
Workers buy
+0.00 bands
Grover with 20 bands
46,377, 0.785 of brute force at 10
Bars are counts on a log scale, not times. The cube is an example polynomial for scale, not a known algorithm for colouring. Grover treats the festival as a black box. Workers who split the schedules between them each take a share of 3ⁿ.

What is proven, and what is only believed

BQP is the class of problems a quantum computer solves in polynomial time with a small chance of error; Bernstein and Vazirani defined it in 1997, and it contains P. Aaronson’s survey argues that physics probably doesn’t let any machine solve NP-complete problems efficiently, adiabatic and annealing machines included, with no proven exponential speed-up for them. But nobody has proved that NP isn’t inside BQP. Shor doesn’t rule it out.

Relative to an oracle, Raz and Tal showed that quantum computers have power outside the polynomial hierarchy. It’s evidence of a different kind of power. On solving NP-complete problems, it says nothing.

Shor’s algorithm breaks codes, and P versus NP never comes into it. Factoring and discrete logarithms are in NP and in BQP, but they’re not believed to be NP-complete, and Shor doesn’t claim it. So a quantum computer that breaks RSA has broken RSA. It hasn’t solved NP.

PNPBQPNP-completefactoring3-colouring
  • P ⊆ NPproven

    Cook, Clay problem description: §1: P ⊆ NP is trivial

  • P ⊆ BQPproven

    Bernstein and Vazirani 1997: Abstract: BPP ⊆ BQP

  • factoring ∈ NPproven

    Cook, Clay problem description: §2, p. 6: the decision version is in NP and coNP

  • factoring ∈ BQPproven

    Shor 1997: Abstract: polynomial-time algorithms on a quantum computer

  • 3-colouring is NP-completeproven

    Garey, Johnson and Stockmeyer 1976: Theorem 2.1: 3-SAT reduces to 3-colourability

  • P ≠ NPbelieved

    Cook, Clay problem description: §3, p. 7: most complexity theorists believe it

  • NP ⊄ BQPbelieved

    Bennett et al. 1997: Section 1: the oracle results do not rule out NP ⊆ BQP

  • factoring is not NP-completebelieved

    Cook, Clay problem description: §2, p. 6: unlikely to be in P or NP-complete

  • factoring ∉ Pbelieved

    Cook, Clay problem description: §2, p. 6: unlikely to be in P

SketchSolid borders are proved. Dashed ones are belief, with the source that says so under each mark. The map is a sketch of what is known, not a measurement.

What it would mean: five worlds

As for what researchers think, 88% of 124 respondents to a poll taken in 2018 said P ≠ NP, against 83% of 152 in 2012 and 61% of 100 in 2002. The percentages are approximate. A poll isn’t a proof.

Russell Impagliazzo described five worlds the answer could put the field in, and only the first has P = NP. The others differ on whether problems are hard on average, whether one-way functions exist, and whether two strangers can agree on a secret in public. Cryptography also needs hardness on average and one-way functions. P ≠ NP alone doesn’t give it.

Cook and Fortnow both note that a proof could show P = NP without giving anyone a usable algorithm. Transforming mathematics and breaking public-key cryptography would take a practical one. A proof alone wouldn’t.

What’s being done about quantum computers in the meantime doesn’t depend on any of this: in 2024 NIST published three standards, ML-KEM, ML-DSA and SLH-DSA, which it calls believed to be secure, not proven. Its 2026 transition report deprecates the quantum-vulnerable public-key algorithms after 2030 and disallows them after 2035. ML-KEM and ML-DSA rest on module lattices, SLH-DSA on hash functions, and lattice problems aren’t believed to be NP-complete either. So post-quantum cryptography doesn’t rest on NP-hardness.

Algorithmica

P = NP?
Yes
Problems hard on average?
No
One-way functions?
No
Public-key cryptography?
No

Any festival can be scheduled quickly, and so can every other problem whose answer is quick to check.

What researchers said P versus NP was
  • 200261% of 100
  • 201283% of 152
  • 201888% of 124
Pick a world. A world counts as possible if some oracle makes it hold, and nobody knows which one is ours. The quantum switch adds a large quantum computer to any of them.

An engineer’s questions

They say: There are three outcomes: P ≠ NP; P = NP with an algorithm too slow to use, say n¹⁰⁰⁰; and P = NP with a practical one.

The fourth figure has a switch for the middle one. The three outcomes are theirs, and the frame I cite is Impagliazzo’s five worlds. A proof of P = NP could even be nonconstructive. It could come with no algorithm at all.

They say: Labs are reported to have found sub-exponential algorithms for 3-SAT, against the Exponential Time Hypothesis.

ETH, a hypothesis stronger than P ≠ NP, says 3-SAT has no algorithm that runs in less than exponential time, and sub-exponential isn’t polynomial, so such an algorithm would refute ETH without settling P versus NP. I haven’t read any algorithm and I can’t say the claim is right. Aaronson reports that he lowered his confidence in P ≠ NP from 97% to 95% after the reported refutation, and that it went back up to 96% after the reported VP ≠ VNP result. Those are his numbers, about his own belief.

They say: Labs are reported to have proved VP ≠ VNP, and to have an exponent of exactly 9/4 for matrix multiplication.

Not read, not vouched for. Valiant’s VP and VNP are algebraic cousins of P and NP: VP is families of polynomials with small arithmetic circuits, VNP is exponential sums of those, and the permanent is complete for VNP over fields of characteristic other than 2. Aaronson reports two proofs of VP ≠ VNP, released on 23 November 2026 with machine-checked certificates, which he says he hasn’t checked himself. For matrix multiplication, Strassen in 1969 got below the usual cubic count, to about n^2.8; separately, Aaronson reports an exponent of exactly 9/4, which is 2.25, in an OpenAI preprint.

They say: Most engineering is NP-hard optimisation, handled by decomposition, relaxation and heuristics.

In festival terms, decomposition is scheduling the tight cluster of bands that all share members first and fitting the rest around it, and relaxation is letting a band play half of Friday and half of Saturday, then rounding. A heuristic is the greedy button in the first figure: it uses a fourth night on a festival that fits in three. That result is arithmetic on the invented festival. It isn’t a claim about any real method.

They say: Proving there is no counterexample, as in checking two circuits equal, is the hard direction.

Proving that no schedule exists is the other side of the question, and the extra line in the first figure gives the festival that case: the search proves it by running out of schedules to try. In circuit checking, two circuits are equal when a SAT problem about the XOR of their outputs has no solution. That checking problem is hard in theory. In practice it’s easier, because the two circuits tend to be similar.

They say: Deciding whether a tour is shorter than a bound is a different problem from finding the shortest one.

The festival has the same pair. Whether it fits in three nights is a yes-or-no question, the kind Karp’s list holds. The fewest nights it needs asks for more, and anything that answers that also answers the first. The night count in the first figure reads the second.

They say: Swarms of agents make search far cheaper even if P ≠ NP.

Cheaper, yes. Split 3ⁿ between a million workers and they buy log₃ of a million, about 12.58 more bands, and a thousand buy 6.29: arithmetic, and the second figure’s slider. Their point that swarms speed up the search inside a decomposition stands. What the figure shows is what they can’t do to an exponential.

They say: A practical P = NP algorithm would break RSA, and breaking RSA would not give P = NP.

The page agrees with both halves. Cook covers the first: if P = NP, he says, the hardness assumptions behind Internet security are false. The section on Shor above covers the second. Factoring isn’t believed to be NP-complete.

They say: Even exact solvers are limited by the physics models and by physics itself.

That’s their view, in one line. I’m leaving it for My view below.

Limits, and what would change this

NP ⊄ BQP is unproven, and the evidence for it is oracle results and belief. Grover’s bound covers black-box search only. P = NP doesn’t have to be practical, and P ≠ NP doesn’t have to give cryptography; the poll is opinion, its percentages approximate, its number of experts not stated. Cook’s Clay text is dated (it calls quantum computers hypothetical), so I cite it only for definitions and consequences.

Sources

  1. Shtetl-Optimized, 25 November 2026 Blog post on AI and the P versus NP problem. Blog, the author’s own view. Scott Aaronson, 25 November 2026 with updates of 26 November; his reports of lab results are cited as his reports.

    • The post and its 26 November update; his view and his reports, not results I checked
    • Opening: the 9/4 preprint, as his report
  2. Tarunyaa (@tarunyaa_), X article What would P=NP mean for engineering?. Post, the author’s own view. An X article, 30 November 2026; the lab results it reports are cited as their reports.

    • The article, read 2026-12-01: their own view
    • Their three outcomes, as they put them
    • The report, as they report it
    • Their report of both results, as they report it
    • Their three workarounds, as they put them
    • Their point on correctness, as they put it
    • Their decision-versus-optimisation point
    • Their point about agent swarms
    • Their statement of both halves
    • Their point on physics models, as they put it
  3. Garey, Johnson and Stockmeyer 1976 Some Simplified NP-Complete Graph Problems. Paper. Theoretical Computer Science 1(3):237–267, 1976 (the abstract and pp. 247–248 read, in a scanned copy; the publisher’s page is paywalled).

    • Graph 3-colourability is NP-complete, even for flat drawings where no band shares with more than four others
    • p. 247: before this paper only k as an input was known NP-complete; Theorem 2.1
    • Theorem 2.1, p. 248: 3-SAT reduces to graph 3-colourability
    • Class map: 3-colouring is NP-complete, Theorem 2.1: 3-SAT reduces to 3-colourability
  4. Cook, Clay problem description The P versus NP Problem. Institution. Stephen Cook for the Clay Mathematics Institute; the text dates from about 2000 and calls quantum computers hypothetical, so it is cited for definitions and consequences only.

    • §1: the definitions of P and NP; P ⊆ NP is trivial
    • §2, p. 4: Cook’s result, Karp’s twenty more, and the notation P and NP
    • Proposition 1(c), p. 5: if any NP-complete problem is in P, then P = NP
    • §2, p. 6: factoring is in NP and coNP, and unlikely to be in P or NP-complete
    • §2, p. 6 and §3, p. 7: the consequences, and a nonconstructive proof
    • §3, p. 7: a nonconstructive proof
    • §2, p. 6: if P = NP, the assumptions behind Internet security (factoring, DES) are false
    • §2, p. 4: quantum computers called hypothetical
    • Class map: P ⊆ NP, §1: P ⊆ NP is trivial
    • Class map: factoring ∈ NP, §2, p. 6: the decision version is in NP and coNP
    • Class map: P ≠ NP, §3, p. 7: most complexity theorists believe it
    • Class map: factoring is not NP-complete, §2, p. 6: unlikely to be in P or NP-complete
    • Class map: factoring ∉ P, §2, p. 6: unlikely to be in P
  5. Fortnow 2009 The Status of the P versus NP Problem. Survey. Lance Fortnow, Communications of the ACM, September 2009 (the author’s copy; the journal version was not opened).

    • §2: the problem and the Clay Institute’s prize
    • §8: Fortnow does not expect factoring or discrete log to be NP-complete
    • §7.1: P ≠ NP is not enough for public-key cryptography
    • §3: P = NP is possible without practical algorithms
    • §5.4: lattice problems are not believed NP-complete
  6. Cook 1971 The Complexity of Theorem-Proving Procedures. Paper. Stephen A. Cook, STOC 1971, pp. 151–158 (the author’s scan; pp. 151, 152 and 154 read).

    • Summary and Theorem 1: reduction to tautologies, by oracle reductions
  7. Karp 1972 Reducibility Among Combinatorial Problems. Paper. Richard M. Karp, in Complexity of Computer Computations, Plenum Press, 1972 (a course-handout scan of the chapter; pp. 90, 94, 95 read).

    • Item 12, p. 95: CHROMATIC NUMBER, with k part of the input
    • Item 12, p. 95: the problem is posed with k in the input
  8. Aaronson 2005 NP-complete Problems and Physical Reality. Survey. Scott Aaronson, ACM SIGACT News, March 2005 (the arXiv text, v2).

    • §4: why “all answers at once” misleads
    • §4: unless the algorithm uses the problem’s structure
    • §4 and §4.2: BQP and NP; the adiabatic algorithm
  9. Grover 1996 A fast quantum mechanical algorithm for database search. Lov K. Grover, arXiv quant-ph/9605043, 29 May 1996 (STOC ’96).

    • Abstract and §1.1: O(√N) steps; for SAT with n variables N = 2ⁿ
    • §1.1 and §6: the matching lower bound comes from Bennett, Bernstein, Brassard and Vazirani
    • Abstract: O(√N) steps
  10. Bennett et al. 1997 Strengths and Weaknesses of Quantum Computing. Paper. C. H. Bennett, E. Bernstein, G. Brassard and U. Vazirani, SIAM Journal on Computing 26(5):1510–1523, 1997 (the arXiv text).

    • Theorem 3.5 and the note after it: o(2^(n/2)) is impossible relative to a random oracle; Grover is tight
    • §1, p. 3: the oracle results do not rule out NP ⊆ BQP
    • §1, p. 3
    • Class map: NP ⊄ BQP, Section 1: the oracle results do not rule out NP ⊆ BQP
  11. Bernstein and Vazirani 1997 Quantum Complexity Theory. Paper. Ethan Bernstein and Umesh Vazirani, SIAM Journal on Computing 26(5), 1997 (the authors’ PostScript, text extracted).

    • Abstract and §8.1: BPP ⊆ BQP; the definition of BQP
    • Class map: P ⊆ BQP, Abstract: BPP ⊆ BQP
  12. Shor 1997 Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer. Paper. Peter W. Shor, SIAM Journal on Computing 26(5):1484–1509, 1997 (the arXiv text, v2).

    • §7, pp. 24–25: weak indications that quantum computers cannot solve NP-complete problems, but no ruling out
    • Abstract: polynomial-time algorithms for factoring and discrete logarithms
    • Class map: factoring ∈ BQP, Abstract: polynomial-time algorithms on a quantum computer
  13. Raz and Tal 2018 Oracle Separation of BQP and PH. Preprint. Ran Raz and Avishay Tal, ECCC report TR18-107, 31 May 2018 (the later conference and journal versions were not opened).

    • Corollaries 1.4–1.5: an oracle O with BQP^O ⊄ PH^O. A preprint; NP does not appear in the claims
  14. Gasarch 2019 Guest Column: The Third P =? NP Poll. Survey of opinion. William I. Gasarch, SIGACT News 50(1), March 2019; the poll was taken in 2018 and the percentages are approximate.

    • §1 and §2.1: the three polls and their counts; the author calls the percentages approximate
    • §3: the experts’ share, with no count given
  15. Impagliazzo 1995 A Personal View of Average-Case Complexity. Paper. Russell Impagliazzo, Structure in Complexity Theory Conference, 1995 (the author’s PostScript, text extracted).

    • §2: Algorithmica, Heuristica, Pessiland, Minicrypt, Cryptomania
    • §2, p. 3: a world is possible if an oracle makes it hold
    • §2: the five worlds
  16. NIST FIPS 203 Module-Lattice-Based Key-Encapsulation Mechanism Standard. Standard. NIST, 13 August 2024.

    • Abstract: ML-KEM, believed to be secure, even against a quantum computer
  17. NIST FIPS 204 Module-Lattice-Based Digital Signature Standard. Standard. NIST, 13 August 2024.

    • Abstract: ML-DSA
  18. NIST FIPS 205 Stateless Hash-Based Digital Signature Standard. Standard. NIST, 13 August 2024.

    • §1.1: SLH-DSA relies on hash functions
  19. NIST IR 8547 Transition to Post-Quantum Cryptography Standards. Institution report. NIST Internal Report, final, October 2026.

    • §2.1 and §4: what is vulnerable to Shor, and the 2030 and 2035 dates
  20. Impagliazzo and Paturi 2001 On the Complexity of k-SAT. Paper. Russell Impagliazzo and Ramamohan Paturi, Journal of Computer and System Sciences 62:367–375, 2001 (the author’s copy).

    • Abstract and p. 368: ETH states that s₃ is positive, so 3-SAT has no sub-exponential algorithm
  21. Shtetl-Optimized, 24 November 2026 Blog post on the reported VP ≠ VNP proofs and the Exponential Time Hypothesis. Blog, the author’s own view. Scott Aaronson, 24 November 2026; his reports of lab results are cited as his reports.

    • Seventh paragraph and the reply to Daniel Harlow: his confidence, as his report
    • Second to sixth paragraphs: the reported proofs, as his report
  22. Bürgisser 2024 Completeness classes in algebraic complexity theory. Survey, an arXiv preprint. Peter Bürgisser, arXiv:2406.06217, 10 June 2024 (about the first half read).

    • §1 and §2.2–2.7: VP, VNP and the permanent. A survey, an arXiv preprint
  23. Strassen 1969 Gaussian Elimination is not Optimal. Paper. Volker Strassen, Numerische Mathematik 13:354–356, 1969 (page 354 read, as a scanned page).

    • p. 354: fewer than 4.7·n^(log 7) operations against about 2n³
  24. Goldberg, Prasad and Brayton 2001 Using SAT for Combinational Equivalence Checking. Paper. Design, Automation and Test in Europe (DATE) 2001, pp. 114–121.

    • §1 (coNP-hard in theory) and §4.2 (unsatisfiable means equivalent)

Everything here is paraphrased from the sources, not quoted, and every figure that is not plain arithmetic is attributed. The simulator is this site’s own and is tested against the formulas on the page. Where a source is silent the page says so.