NP-complete (computational complexity class)
NP-complete describes decision problems in NP that are at least as hard as every problem in NP; solving one in polynomial time would solve all NP problems in polynomial time.
Overview
NP-complete denotes a subset of decision problems in the complexity class NP that are, informally, the most difficult problems in NP. A problem is in NP if proposed solutions (certificates) can be verified by a deterministic algorithm in time bounded by a polynomial in the input size. The phrase "NP-complete" therefore identifies problems that both lie in NP and are as hard as any other problem in NP under efficient translations called reductions.
Image gallery
1 ImageFormal definition and reductions
Formally, a decision problem L is NP-complete if two conditions hold: (1) L is in NP, and (2) every problem in NP can be transformed to L by a polynomial-time many-one reduction. Such a reduction is an efficient algorithm that maps instances of one problem to instances of another so that yes/no answers are preserved. This second property implies that an algorithm solving an NP-complete problem in polynomial time would provide polynomial-time solutions for every problem in NP.
When explaining these ideas it helps to use standard terms: an algorithmic problem, a polynomial time bound, and the notion of NP-hard problems — NP-hardness meaning at least as hard as every problem in NP, even if not itself in NP.
History and canonical examples
The concept of NP-completeness emerged from foundational work showing that a certain satisfiability problem is universal for NP. Subsequent efforts identified many naturally occurring NP-complete problems across graph theory, logic and combinatorial optimization. Classic examples include Boolean satisfiability variants (SAT, 3-SAT), graph problems like CLIQUE and VERTEX-COVER, Hamiltonian cycle, and decision versions of optimization problems such as the Travelling Salesman Problem. These examples illustrate how the same underlying difficulty appears in diverse contexts.
Practical consequences and approaches
NP-completeness has both theoretical and practical significance. The central open question P = NP asks whether problems whose solutions can be verified quickly can also always be solved quickly; most researchers conjecture they cannot. In practice, NP-complete problems are tackled with heuristics, exact exponential algorithms that are optimized for typical inputs, approximation algorithms that give near-optimal answers with provable guarantees, and parameterized or specialized algorithms that exploit structure in real instances. Modern SAT solvers and integer programming techniques successfully handle large instances arising in industry, despite worst-case hardness.
Related concepts and notable facts
- NP-hard: problems at least as hard as NP-complete ones; they may not be in NP.
- Reduction types: many-one (Karp) reductions and polynomial-time Turing reductions are common formal tools.
- Proving NP-completeness of a new problem is done by reducing a known NP-complete problem to it.
- NP-completeness classifies worst-case difficulty; some NP-complete problems have efficient average-case or specialized algorithms.
For further background, surveys and lists of typical NP-complete problems provide concrete examples and reduction patterns useful for both theory and application. The study of NP-complete problems remains central to computer science because it connects algorithm design, mathematical proof techniques, and real-world computational limits.

History
The notion of NP-completeness was introduced in 1971 by Stephen A. Cook in what is now known as Cook's theorem. In it he showed that SAT is NP-complete and thus a problem exists which satisfies the definition of NP-completeness. Today, much simpler constructive proofs of the existence of such problems exist, but the languages used for them are very artificial. So Cook's merit is also to have given this proof for a particularly interesting language.
Building on Cook's work, Richard Karp was able to present another seminal paper in 1972 that helped the theory of NP-completeness gain even greater popularity. To Karp's credit, he consistently used the technique of polynomial time reduction to prove NP-completeness for another 21 popular problems.
Definition
A problem (more precisely, a decision problem) L is called NP-complete if and only if:
- L is in the class NP, that is
and
- L is NP-hard, that is
.
The latter condition implies that any problem in NP can be reduced to L by a polynomial time reduction.
Related articles
Author
AlegsaOnline.com NP-complete (computational complexity class) Leandro Alegsa
URL: https://en.alegsaonline.com/art/71317