Study the classification of decision problems that are both in NP and as hard as any problem in NP, highlighting their computational challenges.
NP-complete problems are the hardest within NP: if even one of them could be solved in polynomial time, then all NP problems could be solved in polynomial time and it would follow that $\mathrm{P} = \mathrm{NP}$. They are central in complexity theory and appear everywhere in applications [1].
A problem is NP-complete if it belongs to NP and every other NP problem reduces to it in polynomial time. A reduction transforms every instance of a problem $A$ into an instance of $B$ so that the answers coincide; thus, if $B$ were easy, so would $A$ be (see the line on P and NP) [1][2].
The Cook-Levin theorem (1971) shows that the Boolean satisfiability problem (SAT) is NP-complete. Then, by reduction, it is shown that many others are as well: 3-SAT, Hamiltonian cycle, graph coloring with $3$ colors, clique, vertex cover, subset sum, traveling salesman in the decision version [1].
The independent set (pairwise non-adjacent vertices) and vertex cover are related by complementarity: $S$ is independent if and only if $V \setminus S$ is a cover. In the cycle $C_5$ the maximum independent set has $2$ vertices and the minimum cover has $3 = 5 - 2$ (calculation, values taken). Therefore, an algorithm for one gives an algorithm for the other.
- Exact exponential algorithms, with pruning (branch and bound), effective on moderately sized instances.
- Approximation algorithms, with guarantees on the ratio to the optimum.
- Heuristics and metaheuristics, without guarantees but often effective.
- Special cases solvable in polynomial time, for example 2-SAT.
Scheduling, circuit design, resource allocation, bioinformatics, and system verification: many practical problems reduce to NP-complete ones (general observation). For the broader class of NP-hard see the dedicated line.
NP-completeness is a worst-case result: it does not mean every instance is hard. And without a solution to the $\mathrm{P}$ versus $\mathrm{NP}$ problem one cannot say that fast algorithms do not exist, but it is believed they do not.
[1] Wikipedia (it): NP-completo
[2] Wikipedia (en): NP-completeness
Generating summary…