The Traveling Salesman Problem
"Find the shortest route that visits every city once and returns home; it is easy to state and famously hard to solve."
"Find the shortest route that visits every city once and returns home; it is easy to state and famously hard to solve."
The traveling salesman problem asks, given a list of cities and the pairwise distances between them, for the shortest possible route that visits each city exactly once and returns to the starting city, a minimum-weight Hamiltonian cycle. Simple to state, it is one of the most intensively studied problems in combinatorial optimization and a canonical example of computational hardness: its decision form is NP-complete and its optimization form NP-hard, so no polynomial-time exact algorithm is known, and finding one would resolve P versus NP. Despite this worst-case difficulty, sophisticated methods and heuristics solve enormous real instances in practice.
Rated Empirical: grounded in studies or measurable evidence. The other 608.
Brute force checks every ordering of the cities, taking time on the order of n factorial, hopelessly slow beyond small sizes. The Held-Karp dynamic-programming algorithm solves it exactly in time proportional to n squared times two to the n, better than n factorial but still exponential. Because the general problem cannot be approximated within any constant factor unless P equals NP, practical guarantees rely on structure: for metric instances, where distances satisfy the triangle inequality, the Christofides-Serdyukov algorithm guarantees a tour at most one and a half times the optimal, and a 2020 result nudged that ratio slightly below three-halves. In everyday use, heuristics like nearest-neighbour, 2-opt, and Lin-Kernighan produce near-optimal tours quickly.
Special cases in which distances obey the triangle inequality, or are straight-line distances in the plane, which admit constant-factor approximations the general problem does not.
Whether the distance from one city to another equals the reverse, distinguishing the symmetric problem from the harder asymmetric one.
The traveling salesman problem is the archetypal NP-hard optimization problem and a central benchmark for the entire field of combinatorial optimization, spurring the development of cutting-plane methods, branch-and-bound, approximation algorithms, and metaheuristics. Its applications are everywhere routes and orderings matter, from logistics and vehicle routing to drilling circuit boards, sequencing DNA, and scheduling telescope observations.
NP-hardness is a worst-case statement, so it does not mean every instance is hard, and large instances are routinely solved, exactly with methods like the Concorde solver and approximately with heuristics on millions of nodes. The strong approximation results apply only to structured cases: the general problem cannot be approximated within any constant factor unless P equals NP, and Christofides's guarantee requires the triangle inequality. Exact algorithms remain exponential in the worst case, so scaling depends on instance structure rather than a universal fast method, and the P-versus-NP question the problem embodies is still open.
NP-hard does not mean unsolvable; it means no polynomial-time exact algorithm is known, while instances are still solved, just at exponential worst-case cost. Large instances are solved in practice, both exactly and approximately, so the problem is not hopeless. The one-and-a-half approximation applies only to metric instances with the triangle inequality, not to the general problem, which resists any constant-factor approximation unless P equals NP. And the earliest documented use of the phrase traveling salesman problem is a 1949 report, though the problem was studied earlier by Menger and others.
Yes, as far as the evidence goes. The Traveling Salesman Problem is rated Empirical here: it rests on studies or measurements rather than on a saying.
Rated from two sources. 609 of the 1,116 entries carry this rating. How the scale works.
The best-known laws are the least likely to rest on measurement.
Brought to mathematicians by Karl Menger around 1930 as the messenger problem, formulated as an integer program with the cutting-plane method by Dantzig, Fulkerson, and Johnson in 1954, and proved NP-complete via Karp's 1972 reductions.
Everything above traces to two pages on en.wikipedia.org: both secondary, accounts of the original rather than the original itself, which has not been located for this entry. Nothing is written from memory, and the method is written down. Spot an error or a better source? Suggest a fix.