Vol. I a living index of named laws · est. mmxxvi no ads · no account
The Law Tomeindex of named laws

The P versus NP Problem

also known as — P versus NP, P vs NP, The P versus NP problem
"If a solution can be checked quickly, can it also be found quickly? Nobody knows."
In plain English

What does The P versus NP Problem mean?

The P versus NP problem asks whether every problem whose solution can be verified quickly can also be solved quickly. Here quickly means in polynomial time, that is, in a number of steps bounded by a polynomial in the size of the input. P is the class of decision problems that a deterministic computer can solve in polynomial time. NP, for nondeterministic polynomial time, is the class of decision problems whose yes answers can be verified in polynomial time given a suitable certificate or witness, equivalently the problems a nondeterministic machine can solve in polynomial time. The question is whether these two classes are equal, whether P equals NP. It is one of the seven Clay Mathematics Institute Millennium Prize Problems, selected in 2000, each carrying a one-million-dollar prize, and it is among the most important open problems in mathematics and computer science. It is widely conjectured that P is not equal to NP, meaning that some problems are fundamentally harder to solve than to check. Central to the problem is the notion of NP-completeness, the hardest problems in NP: a problem is NP-complete if it is in NP and every problem in NP reduces to it in polynomial time. The Cook-Levin theorem, from Stephen Cook in 1971 and independently Leonid Levin, showed that Boolean satisfiability is NP-complete, and Richard Karp in 1972 exhibited twenty-one NP-complete problems.

In symbols

What is the formula for The P versus NP Problem?

P = NP \ \text{or} \ P \neq NP?
The defining formula as recorded on Wikidata. P = NP \ \text{or} \ P \neq NP?
Reliability

Rated Contested: disputed, with the evidence still argued over. The other 256.

Lineage
1971COINED
How it works

How does The P versus NP Problem work?

The P versus NP problem formalizes the intuitive gap between finding a solution and checking one. Many problems have the feature that a proposed answer can be verified efficiently even though finding the answer seems to require searching an astronomically large space of possibilities. Given a filled-in Sudoku or a satisfying assignment for a logical formula, one can quickly confirm it works; the hard part is producing it. NP captures exactly the problems with efficiently checkable solutions, and P captures those with efficiently findable ones, so P versus NP asks whether checkability implies findability. The key to the problem is NP-completeness and polynomial-time reduction. A reduction transforms one problem into another efficiently, so that a fast algorithm for the second yields a fast algorithm for the first; the NP-complete problems are those in NP to which every NP problem reduces, making them the hardest in the class and all equivalent in difficulty. The Cook-Levin theorem established the first NP-complete problem, Boolean satisfiability, or SAT, and Karp then showed that twenty-one natural problems, in his 1972 paper Reducibility Among Combinatorial Problems, are NP-complete, including the traveling salesman decision problem, graph coloring, the knapsack problem, the Hamiltonian path problem, and subset sum. The upshot is that if any single NP-complete problem could be solved in polynomial time, then P would equal NP and all of them could be, whereas if any one of them provably cannot, then P is not NP. The formal problem was stated in Cook's 1971 paper The Complexity of Theorem-Proving Procedures, and the underlying question was raised in a 1956 letter from Kurt Godel to John von Neumann.

Where you'll see it

What are examples of The P versus NP Problem?

Verifying versus finding Checking a completed jigsaw or a filled-in Sudoku is easy, but finding the solution from scratch can be enormously hard: the everyday shape of the gap between verifying and solving.
NP-complete problems Boolean satisfiability, the travelling salesman decision problem, and generalised Sudoku are NP-complete: a proposed solution is quick to check, yet no known algorithm finds one quickly, and all share the same fate.
The stakes for cryptography Modern public-key encryption relies on problems being hard to solve but easy to verify; were P shown to equal NP with a practical algorithm, much of that security could unravel.
Types & variants

What are the types of The P versus NP Problem?

NP-complete and NP-hard§

NP-complete problems lie in NP and are the hardest within it; NP-hard problems are at least as hard but need not lie in NP, or even be decision problems.

The Cook-Levin theorem§

The foundational result establishing Boolean satisfiability as the first NP-complete problem, the anchor from which thousands of other problems were shown NP-complete.

Why it matters

Why does The P versus NP Problem matter?

P versus NP is the central open problem of theoretical computer science and one of the deepest questions in all of mathematics, and its resolution would have profound practical and conceptual consequences. If P were equal to NP, then a vast range of problems currently believed to be intractable, from optimization and logistics to protein folding and theorem-proving, would become efficiently solvable, and much of modern cryptography, which relies on certain problems being hard to solve but easy to check, would collapse. If, as almost all researchers believe, P is not equal to NP, then there is a genuine and permanent gap between verifying and discovering, a fundamental limit on efficient computation. The theory of NP-completeness, born with the Cook-Levin theorem and Karp's problems, gave computer science a precise language for classifying the difficulty of problems and showed that thousands of important problems across every field share a single fate, standing or falling together. As one of the seven Millennium Prize Problems, backed by a one-million-dollar prize, and a question touching the very nature of mathematical discovery, foreshadowed in Godel's 1956 letter, P versus NP is a landmark problem whose answer would reshape our understanding of what can be efficiently computed.

Working with it

How do you apply The P versus NP Problem?

  • Separate checking from solving — when facing a hard problem, distinguish how easily a candidate answer can be verified from how hard it is to find one.
  • Recognise NP-completeness — if a problem is NP-complete, expect no known efficient algorithm and reach for approximation or heuristics instead.
  • Hold the answer as open — treat P versus NP as unresolved: most believe P is not NP, but neither direction has been proved.
Where it breaks down

What are the limits of The P versus NP Problem?

P versus NP is unresolved, and its difficulty is itself a major topic. No proof is known in either direction despite decades of intense effort, and results in complexity theory suggest why: broad classes of proof techniques, such as relativizing and natural-proofs approaches, are known to be incapable of settling the question, so a resolution will likely require genuinely new methods. The near-universal belief that P is not equal to NP is a conjecture, not a theorem, and while overwhelming circumstantial evidence supports it, no one has proven that even a single NP-complete problem lacks a polynomial-time algorithm. The classes P and NP are defined for decision problems and for worst-case, asymptotic running time, so the theoretical distinction does not always track practical performance, since some NP-complete problems are solved well in practice on typical inputs while some polynomial-time algorithms are too slow to use. Cook's paper is dated 1971, Karp's 1972, Levin's independent work is often dated to its 1973 publication, and Godel's letter to von Neumann is dated 1956.

What it doesn't say

What are common misconceptions about The P versus NP Problem?

P versus NP is not the claim that NP problems cannot be solved at all; NP problems are solvable, the question is only whether they can be solved in polynomial time. It is not settled by the fact that we lack fast algorithms, since that is evidence, not proof, and P not equal to NP remains a conjecture. And NP does not stand for non-polynomial but for nondeterministic polynomial time, so treating NP problems as unsolvable, the conjecture as proven, or NP as meaning non-polynomial, misreads the problem.

Is it real?

Is The P versus NP Problem real?

That is exactly what is in dispute. The P versus NP Problem is rated Contested here: the effect is claimed, the evidence is argued over, and specialists disagree.

Rated from three sources. 257 of the 1,116 entries carry this rating. How the scale works.

Seldom printedin printed books: one of 194 names in its band, of 903 measured
3 of 69entries in software & systems carry the same rating

The best-known laws are the least likely to rest on measurement.

What pulls against it

What is the opposite of The P versus NP Problem?

Nothing here is the formal negation of The P versus NP Problem — these are the entry in this index that pulls the other way, so that following both at once forces a choice.

Every opposing pair in the index.

Origin

Where did The P versus NP Problem come from?

The central open problem of theoretical computer science, formalized in Stephen Cook's 1971 paper and foreshadowed in a 1956 letter from Godel, asking whether every problem with an efficiently checkable solution can be efficiently solved, one of the Millennium Prize Problems.

How the name spread

When did people start saying “The P versus NP Problem”?

1800coined 19712019
How often “P versus NP Problem” appears in printed English, which takes hold around 1978 and peaks around 2014. Coined 1971 and in print by about 1978, unusually close together. This still charts the phrase rather than the idea. Source: Google Books Ngrams.
Known elsewhere as

What is The P versus NP Problem called in other languages?

  • Arabicمسألة P=NP
  • GermanP-NP-Problem
  • Spanishclases de complejidad P y NP
  • Frenchproblème P = NP
  • Italianclassi di complessità P e NP
  • JapaneseP≠NP予想
  • PortugueseP versus NP
  • Russianравенство классов P и NP
  • Chinese多項式時間類問題等于不確定性多項式時間類問題

9 languages, as recorded on Wikidata. These are names the idea already goes by, not translations we made. The whole index by language.

What we checked

  • 1,116entries in the tomeListed one by one on the browse page.
  • 1,116of them citing a sourceOpen any entry: its sources sit at the foot of the page.
  • 2,489source references in allEach is named, and linked wherever the source is online.