Overview
The Traveling Salesperson Problem asks for the least-cost tour that visits each location once and returns to the start. It is one of the central textbook examples in combinatorial optimization.
TSP is more than a routing puzzle: it introduces subtour elimination, branch-and-cut, approximation, local search, and benchmark-driven algorithm engineering used across routing and sequencing problems.
Core ideas
Hamiltonian tours
Hamiltonian tours visit every node exactly once and return to the origin.
Subtour elimination
Subtour elimination constraints prevent disconnected smaller cycles from masquerading as a valid tour.
Branch-and-cut
Branch-and-cut combines enumeration with cutting planes to solve difficult TSP instances exactly.
Local search
Local search improves tours by moves such as 2-opt, 3-opt, swaps, and larger neighborhoods.
Approximation
Approximation algorithms give performance guarantees for structured TSP variants such as metric TSP.
How to use it
- 1Define nodes, travel costs, symmetry, and whether the route must return to the start.
- 2Choose a formulation or heuristic based on instance size and whether exact optimality matters.
- 3Eliminate subtours explicitly in exact models or use a solver designed for routing structure.
- 4Benchmark against simple nearest-neighbor or insertion heuristics before trusting complex methods.
- 5Extend to VRP when capacity, multiple vehicles, time windows, pickups, or depots enter.
Applications
- Routing: design short tours for service, inspection, or delivery stops.
- Sequencing: order jobs, tools, or tasks when changeover cost depends on sequence.
- Circuit layout: reduce travel or wiring distance in manufacturing and design settings.
- Warehousing: optimize picker paths and visit sequences.
- Tour planning: create efficient itineraries across locations.
Common pitfalls
- Treating a VRP with capacity or time windows as a plain TSP.
- Forgetting subtour elimination in integer programming formulations.
- Comparing heuristics without consistent benchmark instances or cost definitions.
- Optimizing distance while ignoring service time, driver rules, or operational feasibility.
Resources
- Concorde TSP Solver
Specialized exact TSP solver and reference implementation.
- TSPLIB
Classic benchmark library for TSP and related routing problems.
- Google OR-Tools Routing
Practical routing toolkit for TSP, VRP, and related variants.