The Traveling Salesperson Problem (TSP)

Type
Explainer
Updated
Known gaps (1)
  • Not yet addressed from the September 2026 site review. Brief TSP definition; add a small tour example and distinguish decision versus optimization forms.

The travelling salesman problem (often abbreviated as TSP) is one of the most famous problems in combinatorial optimization. Like many good problems, it is a simple question that is easy to state.

You are given a set of cities \(v_0, v_1, . . . , v_n\). You know the distance between any pair of cities. What is the fastest route that visits every city exactly once, and then returns to where you started?

The travelling salesman problem has a reputation for being very hard: it is well-known to be NP-hard, meaning that there is no polynomial time algorithm that can find an optimal tour unless \(P = NP\).

In reality, though, the travelling salesman problem is not that difficult: we can efficiently calculate solutions that are pretty good. That is, for a given set of cities, we can find a tour that is approximately as good as the best tour.

Type to search every note and essay.