An NP-complete problem is a decision problem that is both NP-hard and verifiable in polynomial time. Its solutions may be difficult to find, but proposed solutions can be checked efficiently. section 2.1.1
Use these classifications to distinguish computational difficulty:
- P contains decision problems solvable in polynomial time by deterministic algorithms. section 2.1.1
- NP contains problems whose solutions are hard to find but easy to verify in polynomial time. section 2.1.1
- NP-hard problems are at least as hard as the hardest NP-complete problems and are commonly approached with approximation or heuristic solvers. section 2.1.1
Traveling salesperson problem
Selecting the best route through 13 cities illustrates the combinatorial search behind practical planning problems. Distance, time, or another criterion can define the preferred route; increasing the number of cities makes exact search difficult. section 2.1.1
Problem classes based on hardness and completeness. Problems can be categorized into NP-hard, NP-complete, NP, or P.
Compare P, NP, NP-complete, and NP-hard classifications in one visual hierarchy. section 2.1.1

