What Is the Traveling Salesman Problem?
Imagine a delivery driver who needs to visit ten addresses and return to the warehouse. Simple enough, right? Now imagine a hundred addresses. Or a thousand. How do you find the shortest possible route that visits every stop exactly once?
This is the Traveling Salesman Problem — known to mathematicians and computer scientists simply as the TSP. It sounds deceptively straightforward. It is anything but.
The origins of the TSP trace back to the 1800s, when Irish mathematician William Rowan Hamilton and British mathematician Thomas Kirkman independently studied mathematical puzzles involving routes through graphs. Hamilton's "Icosian Game," introduced in 1857, challenged players to find a route visiting every node on a dodecahedron exactly once.
By the early 20th century, German mathematician Karl Menger formally defined the TSP in the 1930s, describing it as finding the shortest closed route through a set of cities. The name "Traveling Salesman Problem" became the common shorthand, and it stuck.
The number of possible routes grows factorially with the number of destinations:
No computer ever built can simply check every possible route once the destination count reaches meaningful real-world scale. This is why the TSP is classified as NP-hard.
In the post-World War II era, researchers at Princeton, the RAND Corporation, and Bell Labs worked intensively on the TSP. Merrill Flood at RAND circulated the problem widely in 1948. George Dantzig, Ray Fulkerson, and Selmer Johnson published the first significant algorithmic attack in 1954, solving a 49-city instance — a landmark achievement.
Their work introduced linear programming relaxation and cutting planes, techniques foundational in optimization to this day. But scaling remained a brutal challenge.
Start at any city, always go to the closest unvisited city next. Fast, but often produces routes 20-25% longer than optimal.
Iteratively swap segments of a route to find improvements. Better results, but still no guarantee of optimality.
A landmark result guaranteeing solutions no worse than 1.5x optimal. For decades, the best-known approximation guarantee.
Borrowed from metallurgy, this probabilistic technique temporarily accepts worse solutions to avoid local optima.
Evolutionary computation that simulates natural selection to evolve better route populations. Flexible but computationally expensive.
One of the most effective practical TSP solvers, using complex multi-step moves. The basis for many modern solvers.
These achievements are extraordinary. They are also, in the context of real-world logistics involving millions of delivery stops, largely academic.
Every approach in the 150-year history of TSP research shares the same fundamental architecture: receive a problem, compute a solution, discard the work, repeat. Each new set of destinations is treated as a fresh problem. Every solution computed is thrown away the moment it is used.
Even the most sophisticated commercial routing engines — powering UPS, FedEx, and Amazon — operate on this same discard-and-recompute model. They are fast, they are optimized, but they are always starting from zero.
"How do we solve this TSP instance faster?"
"What if we solved it once, stored it, and never had to solve it again?"