Approximating the Traveling Salesman
Tree doubling, Christofides, and the 2021 improvement.
For 45 years nobody could beat the factor that Christofides proved for metric TSP in 1976; in 2021 a randomized algorithm finally did, by a sliver larger than . Meanwhile exact solvers prove tours through tens of thousands of cities optimal. Both feats rest on the same few lower bounds on the optimal tour.
What you’ll learn
- Compute and compare the lower bounds behind TSP algorithms: the minimum spanning tree, the 1-tree and the Held–Karp bound, which equals the subtour LP.
- Prove the Christofides–Serdyukov guarantee of in full, show that it is tight, and strengthen it to times the subtour LP using -joins.
- Describe the max-entropy approach behind the 2021 improvement to , and the progress on graphic and asymmetric TSP.
- Explain Arora's approximation scheme for Euclidean TSP, the hardness of metric TSP, and why Lin–Kernighan search and branch and cut dominate practice.
Lower bounds: trees, 1-trees and the subtour LP
Every approximation guarantee and every exact solver rests on lower bounds on . Here are three, in increasing strength:
| Bound | Definition | Why it is at most |
|---|---|---|
| Minimum spanning tree | the lightest tree on all the cities | a tour minus one edge is a spanning tree |
| 1-tree (Held & Karp, 1970) | a minimum spanning tree on cities , plus the two cheapest edges at city 0 | a tour is a 1-tree: a path through cities plus two edges at city 0 |
| Held–Karp bound | every city has degree 2 in a tour, so the penalties raise every tour's cost by exactly |
import math
def one_tree(d, pi):
"""Lower bound and degrees of a minimum 1-tree under costs d[i][j] + pi[i] + pi[j]."""
n, c = len(d), lambda i, j: d[i][j] + pi[i] + pi[j]
deg, w = [0] * n, 0.0
best = {v: (c(1, v), 1) for v in range(2, n)} # Prim's algorithm on cities 1..n-1
while best:
v = min(best, key=lambda x: best[x][0])
cost, u = best.pop(v)
w, deg[u], deg[v] = w + cost, deg[u] + 1, deg[v] + 1
for x in best:
if c(v, x) < best[x][0]:
best[x] = (c(v, x), v)
a, b = sorted(range(1, n), key=lambda j: c(0, j))[:2] # the two cheapest edges at city 0
w, deg[0], deg[a], deg[b] = w + c(0, a) + c(0, b), 2, deg[a] + 1, deg[b] + 1
return w - 2 * sum(pi), deg
def held_karp_bound(d, steps=2000):
pi, best = [0.0] * len(d), 0.0
for k in range(steps):
bound, deg = one_tree(d, pi)
best = max(best, bound) # every pi gives a lower bound
if all(g == 2 for g in deg):
break # this 1-tree is a tour: optimal
pi = [p + (g - 2) / math.sqrt(k + 1) for p, g in zip(pi, deg)]
return best
pts = [(40, 50), (53, 37), (69, 59), (51, 22), (18, 18), (21, 46), (77, 33), (21, 78)]
d = [[math.dist(p, q) for q in pts] for p in pts]
print(round(one_tree(d, [0.0] * 8)[0], 1), round(held_karp_bound(d), 1)) # 197.9 224.3Subgradient ascent on the potentials (Held & Karp, 1971), with a crude step size. The points are the eight starting cities of the traveling-salesman widget below and in the Optimized lesson. The plain 1-tree gives 197.9; after 28 iterations the 1-tree becomes a tour, and the bound reaches 224.3, the optimum itself. The minimum spanning tree weighs only 164.6.
The subtour LP is the strongest lower bound with a proven guarantee, and the backbone of exact solvers. Its integrality gap is at least , approached by known families of instances, and at most , as the next step proves. The conjecture that it is exactly has been open for decades.
Why is the Held–Karp expression a valid lower bound on for every choice of potentials , not just the best one?
- Because the potentials are chosen so that the minimum 1-tree is a tour
- Because every tour is a 1-tree in which each city has degree 2, so the penalties add exactly to its cost, and subtracting that back gives at most the tour's true cost
- Because of the triangle inequality
- Because the minimum 1-tree is unique
Show the answer
B. Because every tour is a 1-tree in which each city has degree 2, so the penalties add exactly to its cost, and subtracting that back gives at most the tour's true cost
For any , the minimum penalized 1-tree costs at most the penalized optimal tour, which is . Subtracting leaves at most . Ascent only tightens a bound that is valid all along.
Christofides–Serdyukov: 3/2
The tree. A tour minus an edge is a spanning tree:
has even size. The degrees in sum to , so an even number of them are odd (the handshake lemma), and a perfect matching on exists in the complete graph.
The matching costs at most half. Shortcut an optimal tour to visit only the vertices of , in the same cyclic order; by the triangle inequality the cycle costs at most . Its edges alternate between two perfect matchings of , and the cheaper one costs at most half of the cycle:
Euler circuit. Adding raises the degree of exactly the odd vertices by one, so every degree in the connected multigraph is even, and it has an Euler circuit, which Hierholzer's algorithm finds in linear time:
Shortcut the circuit to a tour, which by the triangle inequality costs no more. Edmonds' blossom algorithm finds in time, which dominates the running time.
Tree. The cut constraints give for every proper subset , and . So lies in Edmonds' spanning-tree polytope, whose vertices are spanning trees, and the minimum spanning tree costs at most its value:
Join. For an even-size set , an -join is a set of edges in which exactly the vertices of have odd degree. By Edmonds and Johnson (1973), the cheapest -join costs whenever is odd. Every cut has , so is feasible:
Matching. An -join splits into paths that pair up the vertices of (plus cycles); shortcutting each path to a single edge gives a perfect matching on that costs no more. So , and:
Below 3/2: random spanning trees
On the zigzag instance both halves of the Christofides bound are nearly tight at once: the tree costs almost and the parity correction almost . No sharper analysis of the same algorithm can help; the algorithm must change. Beating means choosing the tree with its parity correction in mind, and the idea that worked replaces the minimum spanning tree by a random spanning tree whose distribution comes from the LP solution.
A distribution over trees. Solve the subtour LP. As in Wolsey's proof, lies in the spanning-tree polytope, so it is the vector of edge marginals of some probability distribution over spanning trees. Among all such distributions, take the one of maximum entropy; it has the form , and the weights can be computed (approximately) in polynomial time.
Tree plus join. Sample , add a minimum-cost -join for its odd vertices, find an Euler circuit and shortcut. The tree costs at most in expectation:
Where the gain must come from. The join only has to cross cuts that crosses an odd number of times. Near-minimum cuts () are where is tight, and a random tree crosses many of them exactly twice, an even number. Max-entropy distributions are strongly Rayleigh, with strong negative correlation between edges, and that is what lets one prove that enough cuts are even often enough to build a fractional join that is cheaper than by a constant fraction, in expectation:
The constant is tiny because the analysis loses constants at every step, not because the method is weak; nobody knows how large really is for this algorithm. Two neighboring problems moved earlier and further:
| Problem | Milestones |
|---|---|
| Graphic TSP (shortest-path metric of an unweighted graph) | with max-entropy trees (Oveis Gharan, Saberi & Singh, 2011); (Mömke & Svensson, 2011); (Mucha, 2012); (Sebő & Vygen, 2014) |
| Asymmetric TSP ( allowed, triangle inequality kept) | (Frieze, Galbiati & Maffioli, 1982); via thin trees (Asadpour, Goemans, Mądry, Oveis Gharan & Saberi, 2010); the first constant factor (Svensson, Tarnawski & Végh, STOC 2018), since lowered to about 22 (Traub & Vygen) |
Why did beating require a new idea rather than a sharper analysis of Christofides' algorithm?
- Because a minimum-cost perfect matching cannot be computed exactly in polynomial time
- Because approximating metric TSP within is NP-hard
- Because the subtour LP has integrality gap exactly
- Because on some instances, such as the zigzag, Christofides' algorithm really returns nearly , so the tree must be chosen with the parity correction in mind
Show the answer
D. Because on some instances, such as the zigzag, Christofides' algorithm really returns nearly , so the tree must be chosen with the parity correction in mind
The zigzag family drives Christofides' ratio to , so no sharper analysis of the same algorithm can help: the algorithm itself must change. Sampling a random tree linked to the LP solution was the change that worked.
Geometry, hardness and practice
For points in the plane with Euclidean distances, TSP remains NP-hard (Papadimitriou, 1977), but it has a PTAS, found independently by Arora (1998) and Mitchell (1999), who shared the 2010 Gödel Prize for it.
Snap. Scale and round the coordinates to integers in a box of side . Each point moves by a tiny fraction of , so the optimum changes by a factor of only .
Dissect. Build a quadtree over the box whose origin is shifted by a uniformly random vector. It has depth , which is for fixed .
Structure theorem. Place evenly spaced portals on the sides of every square. Over the random shift, the cheapest tour that crosses square boundaries only at portals, and each side of each square at most times, costs at most more than the optimum in expectation; a patching lemma removes excess crossings cheaply.
Dynamic programming. For every square and every interface, meaning which portals the tour uses and how the crossings pair up inside the square, store the cheapest way to visit the square's points. A square has interfaces, and the quadtree has nonempty squares:
The scheme cannot be made fully polynomial in , because Euclidean TSP is strongly NP-hard. For general metrics no PTAS exists at all unless P = NP: metric TSP is APX-hard, already with distances 1 and 2 (Papadimitriou & Yannakakis, 1993), and approximating it within is NP-hard (Karpinski, Lampis & Schmied, 2015). Between and lies one of the widest open gaps of approximation theory.
In practice nobody runs Christofides alone. Local search dominates: 2-opt (Croes, 1958), 3-opt, and above all the variable-depth moves of Lin and Kernighan (1973), refined in Helsgaun's LKH. Exact solvers combine the subtour LP with many further families of cutting planes inside branch and bound, an approach called branch and cut. Concorde (Applegate, Bixby, Chvátal & Cook) solved every instance of the TSPLIB benchmark library; the largest, pla85900, a chip-layout instance with 85,900 cities, was solved in 2006 using about 136 CPU-years, and its optimal length matched a tour that LKH had found before the proof.
Key takeaways
- TSP lower bounds form a chain: minimum spanning tree 1-tree Held–Karp bound subtour LP ; the subtour LP's integrality gap lies between and , conjecturally .
- Christofides–Serdyukov (tree, minimum matching on the odd vertices, Euler circuit, shortcut) costs at most , even by the -join argument, and the zigzag instance shows that is tight.
- Karlin, Klein and Oveis Gharan beat by with max-entropy random spanning trees; graphic TSP is down to , and asymmetric TSP now has constant-factor algorithms.
- Euclidean TSP has a PTAS in time; metric TSP is NP-hard to approximate within . In practice, Lin–Kernighan search and branch and cut on the subtour LP solve instances with tens of thousands of cities.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
Why does a spanning tree always have an even number of odd-degree vertices?
- Because a tree on vertices has exactly two leaves
- Because its degrees sum to , an even number, and a sum of integers is even only if an even number of them are odd
- Because the triangle inequality forces degrees to pair up
- Because a minimum spanning tree has maximum degree 2
Show the answer
B. Because its degrees sum to , an even number, and a sum of integers is even only if an even number of them are odd
Each edge contributes 2 to the degree sum, so the sum is . A sum of integers is even exactly when an even number of its terms are odd: the handshake lemma, true for every graph.
Where does the proof that use the triangle inequality?
- In computing with Edmonds' blossom algorithm
- In splitting the cycle on into two perfect matchings
- In proving that is even
- In shortcutting the optimal tour to a cycle through the vertices of only
Show the answer
D. In shortcutting the optimal tour to a cycle through the vertices of only
Skipping the vertices outside replaces stretches of the optimal tour by single edges, which cost no more only because of the triangle inequality. The other steps are pure combinatorics.
The subtour LP has exponentially many cut constraints. Why can it still be solved in polynomial time?
- Because only of the constraints can be tight at an optimum
- Because it is always integral, so a minimum spanning tree solves it
- Because a violated cut constraint can be found by a minimum-cut computation, and the ellipsoid method needs only such a separation oracle
- Because the simplex method runs in polynomial time on it
Show the answer
C. Because a violated cut constraint can be found by a minimum-cut computation, and the ellipsoid method needs only such a separation oracle
Given , compute a global minimum cut with capacities ; if it is below 2, it is a violated constraint. Polynomial-time separation implies polynomial-time optimization by the ellipsoid method (Grötschel, Lovász & Schrijver). Solvers instead add violated cuts as they find them.
Which statement about approximating TSP is correct, as of 2025?
- Metric TSP has a PTAS
- Christofides' is known to be optimal unless P = NP
- TSP with arbitrary distances has a 2-approximation
- Euclidean TSP in the plane has a PTAS, while approximating metric TSP within is NP-hard
Show the answer
D. Euclidean TSP in the plane has a PTAS, while approximating metric TSP within is NP-hard
Arora and Mitchell gave approximation schemes for Euclidean TSP, but metric TSP is APX-hard, with the best hardness threshold (Karpinski, Lampis & Schmied). The best ratio, , sits far above that threshold.
Further reading
- N. Christofides, "Worst-case analysis of a new heuristic for the travelling salesman problem," Report 388, Graduate School of Industrial Administration, Carnegie Mellon University (1976).
- M. Held & R. M. Karp, "The traveling-salesman problem and minimum spanning trees," Operations Research 18(6) (1970).
- A. R. Karlin, N. Klein & S. Oveis Gharan, "A (slightly) improved approximation algorithm for metric TSP," Proceedings of STOC (2021).
- S. Arora, "Polynomial time approximation schemes for Euclidean traveling salesman and other geometric problems," Journal of the ACM 45(5) (1998).
- D. L. Applegate, R. E. Bixby, V. Chvátal & W. J. Cook, The Traveling Salesman Problem: A Computational Study (Princeton University Press, 2006).