An Analysis of Several Heuristics for the Traveling Salesman Problem IV: Insertion Heuristics Can Return Poor k-Optimal ToursResearch Paper
Motivation
Insertion heuristics build a traveling salesman tour one city at a time: start from a single city, and at each step choose a city not yet on the subtour and splice it into the subtour where it lengthens the subtour least. Local search heuristics start from a tour and repeatedly replace a few of its edges by others while this shortens the tour. Both families are standard in practice, and a natural engineering idea is to combine them: run an insertion heuristic, then polish the result by local search. The question this mission formalizes is whether local optimality of the insertion tour certifies anything about its quality.
Rosenkrantz, Stearns and Lewis (SIAM J. Comput. 6(3), 1977) answered this for graphs satisfying the triangle inequality. Their §4 proves that nearest and cheapest insertion always return a tour of length at most times the optimal length, and their Theorem 5 shows this bound is attained. Their §7 then shows that the very tour attaining the bound is -optimal for every : no exchange of edges shortens it. So the insertion bound is tight even for tours that local search with -changes cannot improve.
Timeline, as far as this mission is concerned:
- 1965: Lin (Bell System Tech. J. 44) defines -optimal tours and uses 3-optimal local search.
- 1973: Lin and Kernighan (Oper. Res. 21) generalize the edge-exchange neighbourhoods.
- 1977: Rosenkrantz, Stearns and Lewis prove the upper bound for nearest and cheapest insertion (Theorem 4 and its corollary), its tightness for (Theorem 5), the existence of -optimal tours with the same ratio (Theorem 6, stated for ), and the Corollary combining the two.
Setting
A traveling salesman graph on nodes is the node set with a distance that is symmetric and satisfies the triangle inequality . A tour is a Hamiltonian circuit; its length is the sum of its edge lengths; OPTIMAL is the least length of a tour. As in the paper, the identically zero distance is excluded, so OPTIMAL .
A subtour is a circuit on a subset of the nodes (a single node is a subtour without edges). For a subtour and a node , TOUR is obtained by deleting an edge of minimizing and adding and ; COST is the resulting increase in length. An insertion method chooses nodes , starts from and sets ; INSERT is the length of . Nearest insertion chooses minimizing over ; cheapest insertion chooses minimizing COST. Ties are broken arbitrarily.
A -change of a tour deletes of its edges and adds other edges so that another tour is obtained. A tour is -optimal if no -change produces a strictly shorter tour.
The extremal instance is the circle : cities equally spaced on a circular road, with the smallest with or . The insertion run of Theorem 5 inserts the cities in the order and produces the zig-zag tour : city 1, then the even cities in increasing order, then the odd cities in decreasing order.
Formalization targets
Goal: the Corollary to Theorem 6
For and there is a traveling salesman graph with OPTIMAL on which some run of nearest insertion, and some run of cheapest insertion, return a -optimal tour with
Milestones
- The insertion run on the circle: the subtours and nodes form an insertion run that obeys both the nearest and the cheapest rule (proof of Theorem 5).
- On the circle, has length and OPTIMAL (proof of Theorem 5).
- Theorem 5: for there is a graph with INSERT/OPTIMAL for both methods.
- Equation (7.4): the length of a tour of the circle is the sum over unit edges of COUNT, the number of times is traversed when each tour edge is replaced by a shortest arc.
- Every tour of the circle is odd or even (all counts of one parity), eq. (7.5).
- is the shortest even tour, so every tour shorter than is odd.
- is -optimal for every .
- Theorem 6: for there is a graph with a tour that is -optimal for all and has LOCALOPT/OPTIMAL .
Significance
The result. The Corollary shows that the worst-case guarantee of nearest and cheapest insertion cannot be improved by requiring that the returned tour survive -change local search, for up to a quarter of the number of cities. Theorem 6 says more generally that -optimality with does not bound the ratio to the optimum below . Together with the paper's upper bound, the insertion guarantee is exact, and it stays exact after local polishing with small neighbourhoods.
Formalizing it. All statements are proved in the paper; none, to our knowledge, has been machine-checked. The platform has an upper bound for nearest insertion (SupplyChainTheory, Theorem 10.7, ratio at most 2) but no tightness example and no notion of -optimality. This mission produces a reusable definition of -changes against arbitrary tours, the circle metric, and the parity-counting argument on a cycle, and it supplies the calculations the paper omits ("We omit these calculations but note that they require the assumption ").
Difficulty
Two steps carry the weight. First, the omitted calculations for the insertion run: at each stage one must show that inserting between and minimizes the insertion increase over every edge of the zig-zag subtour, and that no other outside city can be inserted for less than 2; the claim fails for and , so the verification must use in an essential way. Second, -optimality is a statement about every tour at edge difference , not about 2-opt segment reversals or any specific move family. A search over moves of a special form does not establish it; the argument must bound the length of an arbitrary tour at edge difference from below.
Formalization scope
Nodes are Fin n, so the paper's node is index and is index ; subtour indices stay 1-based (, approximation ). A distance is d : Fin n → Fin n → ℝ with the structure IsTSPDist (symmetric, nonnegative, triangle inequality, and ; the last is a normalization absent from the paper that changes no length). A tour is an Equiv.Perm (Fin n), a subtour a list read cyclically; OPTIMAL is Finset.univ.inf' over permutations, the true minimum. TOUR is insertion at a position minimizing the new length; COST is a minimum over positions; the nearest-insertion distance (4.1) takes values in WithTop ℝ, so no junk value arises. -optimality compares the tour with every permutation whose edge set (unordered pairs) misses exactly of the tour's edges. Ratios are multiplied out.
COUNT needs a choice of shortest arc for antipodal pairs when is even; the formalization takes the arc through . The paper's argument does not depend on this choice.
Deviations from the printed text: the Corollary is stated for (the printed statement says only , but its proof uses the example of Theorem 5, which exists for ; for , the printed statement is false). Theorem 6 keeps its printed . In the proof of Theorem 5 the paper writes "(4.2) holds" where the cheapest-insertion condition (4.3) is meant; the formal statement uses (4.3).
The existence statements carry OPTIMAL , the paper's standing assumption (1.1). Without it, the zero distance would make every length zero and every tour -optimal, which would satisfy the ratio equations trivially; that formalization is ruled out.
Contributions welcome: proofs of any milestone, in particular the omitted insertion calculations and the parity lemma, and reusable lemmas on cyclic lists and edge sets of permutations.
Selected references
- D. J. Rosenkrantz, R. E. Stearns, P. M. Lewis II, An Analysis of Several Heuristics for the Traveling Salesman Problem, SIAM J. Comput. 6(3):563–581, 1977. https://doi.org/10.1137/0206041
- S. Lin, Computer solutions of the traveling salesman problem, Bell System Tech. J. 44:2245–2269, 1965. https://doi.org/10.1002/j.1538-7305.1965.tb04146.x
- S. Lin, B. W. Kernighan, An effective heuristic algorithm for the traveling-salesman problem, Oper. Res. 21(2):498–516, 1973. https://doi.org/10.1287/opre.21.2.498