Skip to content
ContentLora

    Tip: press / anywhere to search.

    Explainer

    P vs NP explained: the biggest open question in computer science

    P vs NP asks whether every problem whose solution is easy to check is also easy to solve.[1] Most complexity theorists believe the answer is no, but nobody has proved that any such problem is really as hard as it looks.[2][3] The answer matters for cryptography, and it is one of the seven $1 million Millennium Prize Problems.[4][5]

    Editor reviewedUpdated Explainer20 claims · 100% primaryMathematics research, Computing, Post-quantum cryptography and security
    Reading level: 3 passages differ; the rest is the same for everyone.

    This page is part of the mathematics research crash course, after the Millennium Prize Problems overview. For the definitions of P, NP and related classes, read complexity classes explained first; Big O notation covers how running time is measured. Choose a reading level in each section.

    The question

    Some problems are easy to check but seem hard to solve. The Clay Mathematics Institute gives an example: housing 100 of 400 students in a dormitory while avoiding pairs the Dean says are incompatible. Checking a proposed list is quick. But there are more ways to choose 100 students from 400 than there are atoms in the known universe, so trying them all is hopeless.[6]

    P vs NP asks: if a solution is easy to check, is it always easy to find?[1] Stephen Cook and Leonid Levin posed the question independently in 1971.[7]

    P is the class of decision problems solvable within a number of steps bounded by a fixed polynomial in the input length.[8] NP, “nondeterministic polynomial time”, is now usually defined by a polynomial-time checking relation: an instance is a “yes” if some short certificate passes the check.[9] The question is whether P = NP. Membership can be surprising: Cook’s description notes that the set of composite numbers, long known to be in NP, was shown to be in P too.[10]

    NP-completeness: one problem to settle them all

    In 1971 Cook showed that satisfiability (SAT) and 3-SAT are NP-complete, and a year later Richard Karp showed 20 other natural problems are too.[11] If any NP-complete problem is in P, then P = NP. That is why Cook calls it “probably a waste of time” to look for a fast algorithm for an NP-complete problem.[12]

    Hard in theory does not mean hopeless in practice. Lance Fortnow notes that travelling-salesperson problems with more than ten thousand cities can now be solved in practice, and that SAT solvers can often handle formulas with a million variables.[13] NP-completeness is about the worst cases, not every case.

    NP-completeness is a worst-case notion. Fortnow points to cutting-plane methods solving travelling-salesperson instances with more than ten thousand cities, and SAT solvers settling formulas with a million variables in competitions.[13]

    What is at stake

    Complexity theory plays an important role in modern cryptography.[4] If P = NP, public-key cryptography is impossible. But proving P ≠ NP would not by itself make encryption safe: it also needs strong average-case assumptions about problems such as factoring.[14] The RSA and elliptic-curve page explains those assumptions.

    Cook also notes the upside: a practical algorithm for NP-complete problems would have “stunning practical consequences of a more positive nature”.[15]

    Quantum computers are not expected to make the question go away. Peter Shor showed a quantum computer could factor numbers, but Fortnow judged it unlikely that quantum computers will solve NP-complete problems.[16]

    What experts believe, and why no proof exists

    Cook writes that most complexity theorists believe P ≠ NP.[2] Yet so far no one has proved that any of these problems is as hard as it appears.[3]

    Part of the difficulty is that mathematicians have proved some of their best tools cannot work here. One famous result shows that a whole family of arguments would still work in an imaginary “world” where computers get help from a special oracle that makes P equal NP, so those arguments cannot prove the two are different.[17] Another shows that the methods used so far for proving circuits need many steps are expected to fail for the general case.[18]

    Lower bounds using diagonalisation and reduction relativize, and there is an oracle relative to which P = NP, so these techniques alone cannot separate the classes.[17] Razborov and Rudich showed that known circuit lower-bound techniques are “natural proofs”, which cannot give general circuit lower bounds if strong pseudorandom number generators exist.[18] In a 2009 survey Fortnow wrote that circuit complexity and other approaches had stalled, with little reason to expect a separation soon.[19]

    P vs NP is one of the seven Millennium Prize Problems, each worth $1 million.[5][20]

    Next in the crash course

    More in Mathematics research

    Developing in AI & Computing

    Questions readers ask

    What is P vs NP in simple terms?

    P is the set of problems a computer can solve quickly, in a number of steps bounded by a polynomial in the input size. NP is the set whose proposed answers can be checked quickly. The question is whether the two sets are the same.[1][8][9]

    What would happen if P = NP?

    Public-key cryptography would be impossible, and a practical algorithm for an NP-complete problem would be devastating for cryptography. It would also have major positive consequences, such as efficient solutions to many hard problems important to industry.[14][4][15]

    Do most experts think P equals NP?

    No. In the Clay Mathematics Institute's official problem description, Stephen Cook writes that most complexity theorists believe P is not equal to NP. It has not been proved.[2][3]

    What is an NP-complete problem?

    One of the hardest problems in NP. If any single NP-complete problem could be solved in polynomial time, every NP problem could, and P would equal NP. Satisfiability (SAT) was among the first shown to be NP-complete, in 1971.[12][11]

    Why is P vs NP so hard to prove?

    Known techniques run into proven barriers. Arguments based on diagonalisation "relativize" and cannot separate the classes, and Razborov and Rudich showed that the circuit lower-bound methods used so far are "natural proofs", which are expected to fail for general circuits.[17][18]

    Sources

    · 20 claims from 3 publishers

    Each numbered claim is a statement we checked against the sources listed with it. Tap a number in the text to see its sources in place.

    1. [1]

      CMI frames P vs NP as whether a problem whose solution is easy to check is also easy to solve. confirmedas of 2026-11-22

      • P vs NP · Clay Mathematics Institute · Primary source (retrieved 2026-11-22)
    2. [2]

      Cook writes that most complexity theorists believe P ≠ NP. confirmedas of 2026-11-22· interpretation

    3. [3]

      No one has proved that problems which seem hard to solve but easy to check really are as hard as they appear. confirmedas of 2026-11-22

      • P vs NP · Clay Mathematics Institute · Primary source (retrieved 2026-11-22)
    4. [4]

      Complexity theory plays an important role in modern cryptography, and Cook notes that a practical algorithm for an NP-complete problem would have devastating consequences for it. confirmedas of 2026-11-22

    5. [5]

      The seven problems are the Birch and Swinnerton-Dyer conjecture, the Hodge conjecture, the Navier-Stokes equation, P vs NP, the Poincaré conjecture, the Riemann hypothesis and Yang-Mills and the mass gap; CMI lists the Poincaré conjecture as solved. confirmedas of 2026-11-22

    6. [6]

      In CMI's example of choosing 100 dormitory places from 400 students while avoiding incompatible pairs, a proposed list is easy to check, but the number of possible choices exceeds the number of atoms in the known universe, ruling out brute force. confirmedas of 2026-11-22

      • P vs NP · Clay Mathematics Institute · Primary source (retrieved 2026-11-22)
    7. [7]

      Stephen Cook and Leonid Levin independently formulated the P (easy to find) versus NP (easy to check) problem in 1971. confirmedas of 2026-11-22

      • P vs NP · Clay Mathematics Institute · Primary source (retrieved 2026-11-22)
    8. [8]

      Informally, P is the class of yes-or-no problems an algorithm can solve in a number of steps bounded by a fixed polynomial in the length of the input. confirmedas of 2026-11-22

    9. [9]

      NP stands for "nondeterministic polynomial time"; it is now usually defined through a polynomial-time checking relation, so a proposed answer can be verified quickly. confirmedas of 2026-11-22

    10. [10]

      Cook's description notes that the set of composite numbers, long known to be in NP, was shown to be in P as well, answering a longstanding open question. confirmedas of 2026-11-22

    11. [11]

      In 1971 Cook introduced NP-completeness and showed that satisfiability (SAT) and 3-SAT are NP-complete; a year later Karp showed 20 other natural problems are NP-complete. confirmedas of 2026-11-22

    12. [12]

      If any NP-complete problem is in P, then P = NP, which is why Cook calls it probably a waste of time to look for a polynomial-time algorithm for an NP-complete problem. confirmedas of 2026-11-22

    13. [13]

      Hard in the worst case does not mean hopeless in practice; Fortnow notes that travelling-salesperson problems with more than ten thousand cities can be solved in practice and SAT solvers can often settle formulas with a million variables. confirmedas of 2009-09-01

    14. [14]

      Fortnow notes that if P = NP, public-key cryptography is impossible, but that P ≠ NP alone would not be enough to guarantee it; that also needs strong average-case assumptions about the difficulty of problems such as factoring. confirmedas of 2009-09-01

    15. [15]

      Cook adds that a proof of P = NP with a practical algorithm would also have stunning positive consequences, beyond efficient solutions to many hard problems important to industry. confirmedas of 2026-11-22

    16. [16]

      Fortnow judged it unlikely that quantum computers will solve NP-complete problems, although Shor showed a hypothetical quantum computer could factor numbers. confirmedas of 2009-09-01· interpretation

    17. [17]

      Lower-bound methods based on diagonalisation and reduction "relativize", and because there is an oracle relative to which P = NP, such methods alone cannot separate the two classes. confirmedas of 2026-11-22

    18. [18]

      Razborov and Rudich showed that the circuit lower-bound methods used so far are "natural proofs", which are doomed to fail for general circuit lower bounds if strong pseudorandom number generators exist. confirmedas of 2026-11-22

    19. [19]

      Writing in Communications of the ACM in 2009, Fortnow said circuit complexity and other approaches had stalled and there was little reason to expect a proof separating P from NP in the near future. confirmedas of 2009-09-01· interpretation

    20. [20]

      CMI set aside a $7 million prize fund, with $1 million for the solution of each problem. confirmedas of 2026-11-22

    Revision history (1)
    1. Page created.

    Created Nov 22, 2026. Last reviewed by an editor on Nov 22, 2026. Next scheduled review: May 22, 2027.

    Cite this page

    "P vs NP explained: the biggest open question in computer science." ContentLora, updated Nov 22, 2026. https://contentlora.com/explain/p-vs-np-explained

    Spotted an error? Suggest a correction or emailcorrections@contentlora.com.