P versus NP problem
The P versus NP problem asks whether every decision problem whose proposed solutions can be checked in polynomial time can also be solved in polynomial time. In standard terms, it asks whether the complexity classes P and NP are equal. A proof either way would have deep consequences for algorithms and complexity theory; despite its importance, the question remains open.
The question
In computational complexity theory, P is the class of decision problems solvable by a deterministic algorithm in polynomial time: the number of steps is bounded by a polynomial in the length of the input. NP is the class of decision problems for which a proposed positive answer can be verified in polynomial time, equivalently defined using nondeterministic polynomial-time computation. The P versus NP problem asks whether P = NP. Since a solution that can be found quickly can also be checked quickly, P is contained in NP; the unresolved issue is whether NP contains problems that cannot be solved in polynomial time.
Why checking and solving may differ
Some problems have candidate answers that are straightforward to check, even when finding an answer seems difficult. For example, if given a proposed selection of students, it is easy to check whether the selection meets constraints on size and incompatible pairs. Finding a valid selection from scratch may require searching among many possibilities. This illustrates the intuition behind the question, but an apparent difficulty or an inefficient brute-force method is not proof that no polynomial-time algorithm exists.
NP-complete problems
A problem is NP-complete if it belongs to NP and every problem in NP can be reduced to it by an appropriate polynomial-time transformation. Such problems represent, in this formal sense, the hardest problems in NP. If any NP-complete problem has a polynomial-time algorithm, then every problem in NP does, establishing P = NP. Conversely, proving that even one NP-complete problem has no polynomial-time algorithm would establish P ≠ NP. The satisfiability problem was the first problem proved NP-complete, in independent work by Stephen Cook and Leonid Levin.
Importance and consequences
The problem matters both theoretically and practically. Many scheduling, planning, and optimization questions are related to computational problems in NP, and the difficulty of certain problems underlies important cryptographic assumptions. A constructive proof that P = NP would provide efficient algorithms for NP-complete problems, with potentially far-reaching effects; what those effects would be in practice would depend on the actual algorithms and their running times. A proof that P ≠ NP would show that some efficiently checkable problems cannot all be solved efficiently in the standard polynomial-time model.
Status
P versus NP is an open problem. The Clay Mathematics Institute lists it among its Millennium Prize Problems. Stephen Cook and Leonid Levin formulated the question independently in 1971. The mathematical challenge is to prove a general statement about all possible algorithms, not merely to show that current methods or computers struggle with selected instances.
Key facts
- Field
- Computational complexity theory
- Core question
- Does P equal NP?
- P
- Decision problems solvable by a deterministic algorithm in polynomial time.
- NP
- Decision problems whose positive solutions can be verified in polynomial time; equivalently, problems decided by a nondeterministic polynomial-time machine.
- Status
- Open problem; listed by the Clay Mathematics Institute as a Millennium Prize Problem.
- Key implication
- If any NP-complete problem is in P, then P = NP.
Ask about this article
Answers use only “P versus NP problem” and its references, with citations.
References
- 1.P vs NP
Clay Mathematics Institute · other · reliability: unverified · retrieved 31 October 2026
Supports: Introduces the P-versus-NP question through the difference between finding a valid solution and checking a proposed solution, and recounts its independent formulation by Cook and Levin in 1971.
- 2.The P versus NP Problem
Clay Mathematics Institute; Stephen Cook · other · reliability: unverified · retrieved 31 October 2026
Supports: Gives formal definitions of P and NP, states the problem, and explains NP-completeness and the implication that a polynomial-time algorithm for an NP-complete problem would imply P = NP.
- 3.Computational Complexity Theory
Stanford Encyclopedia of Philosophy · other · reliability: unverified · retrieved 31 October 2026
Supports: Explains polynomial-time complexity, defines P and NP, and describes P versus NP as a fundamental unresolved conjecture in theoretical computer science.
References are suggested by the research engine and may be incomplete. Unverified URLs are omitted rather than guessed.
Article history
- Version 131 October 2026 · EditorCreated by Zapia