All Modules

P versus NP

A filled-in Sudoku takes a moment to check and can take an afternoon to solve. Is that gap real, or have we just not been clever enough? That is the P versus NP problem, open since 1971 and carrying a million-dollar prize. This module goes inside the question across 42 interactive demonstrations. Program a Turing machine, then watch its entire run compiled into a logic formula and solved. Find the smallest circuit for every small function. Build an imaginary world where P equals NP and another where it does not, and see why that dooms most proof strategies. Catch a lying prover with a handful of random questions, prove you know a secret without revealing it, and find out what a quantum computer would and would not change.

See also: Computational Complexity for satisfiability, search algorithms and the Exponential Time Hypothesis, Algorithms for running times, Mathematical Logic for proofs and Gödel, and Quantum for qubits and amplitudes.

  1. 01

    What Is a Computation?

    Before asking how hard a problem is, pin down what solving it means. Program a Turing machine, count its steps, and meet the argument that gives more time strictly more power

    3 demos
  2. 02

    Problems with Checkable Answers

    NP is the class of puzzles whose solutions are easy to check. Hand a verifier a certificate, watch a machine guess, and notice how much harder it is to certify that no solution exists

    3 demos
  3. 03

    The Cook–Levin Theorem

    Any checkable problem can be rewritten as one giant logic formula. Watch a machine’s whole computation compiled into clauses, solved, and decoded back into the run

    3 demos
  4. 04

    The Web of Reductions

    Thousands of hard problems turn out to be one problem in disguise. Follow an instance through a chain of translations and carry its solution all the way back

    3 demos
  5. 05

    Between and Beyond

    If P ≠ NP there are problems that are neither easy nor complete. Graph isomorphism and factoring live in that twilight, and above NP a tower of harder classes rises

    3 demos
  6. 06

    Circuits and Lower Bounds

    Almost every function needs an enormous circuit, yet nobody can name one that does. Count gates, find the smallest circuit for every small function, and watch parity defeat shallow circuits

    3 demos
  7. 07

    The Barriers

    Three theorems that explain fifty years of failure. Whole families of proof techniques provably cannot separate P from NP, and you can build the worlds that show it

    3 demos
  8. 08

    Does Randomness Help?

    Flip coins and some problems get dramatically easier. Test a polynomial identity with one random point, find primes by chance, and see why most theorists think the coins are unnecessary

    3 demos
  9. 09

    Proofs as Conversations

    Let the verifier ask questions and proofs become far more powerful. Catch a lying prover with the sum-check protocol, and prove you know a colouring without revealing it

    3 demos
  10. 10

    Hardness of Approximation

    If the best answer is out of reach, how close can you get? Sometimes arbitrarily close, sometimes not one percent better than guessing. The PCP theorem says why

    3 demos
  11. 11

    Secrets and One-Way Functions

    Every online secret rests on a problem being hard. Multiply primes in a blink and fail to undo it, then tour the five worlds we might be living in

    3 demos
  12. 12

    Would a Quantum Computer Help?

    Quantum computers break factoring, but probably not NP. Run Shor’s period finding and Grover’s search, and see why a square-root speed-up is all unstructured search allows

    3 demos
  13. 13

    If P Equals NP

    Suppose it were true. Finding a proof would be as easy as checking one, and every optimisation problem would yield. Or would it — at n to the hundredth power?

    3 demos
  14. 14

    The State of Play

    What is proved, what is believed, and what happened lately. The strongest lower bounds known, the approaches still alive, and how to read a claimed proof

    3 demos

Search