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 2(1−1/n) 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 k-optimal for every k≤n/4: no exchange of k edges shortens it. So the insertion bound is tight even for tours that local search with k-changes cannot improve.
Timeline, as far as this mission is concerned:
- 1965: Lin (Bell System Tech. J. 44) defines k-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 2(1−1/n) upper bound for nearest and cheapest insertion (Theorem 4 and its corollary), its tightness for n≥6 (Theorem 5), the existence of k-optimal tours with the same ratio (Theorem 6, stated for n≥8), and the Corollary combining the two.
Setting
A traveling salesman graph on n nodes is the node set N={1,…,n} with a distance d(i,j)≥0 that is symmetric and satisfies the triangle inequality d(i,k)≤d(i,j)+d(j,k). 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 >0.
A subtour is a circuit on a subset of the nodes (a single node is a subtour without edges). For a subtour T and a node k∈/T, TOUR(T,k) is obtained by deleting an edge (x,y) of T minimizing d(x,k)+d(k,y)−d(x,y) and adding (x,k) and (k,y); COST(T,k) is the resulting increase in length. An insertion method chooses nodes a0,a1,…,an−1, starts from T1={a0} and sets Ti+1=TOUR(Ti,ai); INSERT is the length of Tn. Nearest insertion chooses ai minimizing d(Ti,x)=miny∈Tid(y,x) over x∈/Ti; cheapest insertion chooses ai minimizing COST(Ti,x). Ties are broken arbitrarily.
A k-change of a tour deletes k of its edges and adds k other edges so that another tour is obtained. A tour is k-optimal if no k-change produces a strictly shorter tour.
The extremal instance is the circle (Nn,dn): n cities equally spaced on a circular road, with dn(i,j) the smallest m≥0 with i−j≡m or j−i≡m(modn). The insertion run of Theorem 5 inserts the cities in the order 1,2,…,n and produces the zig-zag tour Tn: 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 n≥6 and 4k≤n there is a traveling salesman graph with OPTIMAL >0 on which some run of nearest insertion, and some run of cheapest insertion, return a k-optimal tour with
OPTIMALINSERT=2(1−n1).
Milestones
- The insertion run on the circle: the subtours Ti and nodes ai=i+1 form an insertion run that obeys both the nearest and the cheapest rule (proof of Theorem 5).
- On the circle, Tn has length 2(n−1) and OPTIMAL =n (proof of Theorem 5).
- Theorem 5: for n≥6 there is a graph with INSERT/OPTIMAL =2(1−1/n) for both methods.
- Equation (7.4): the length of a tour of the circle is the sum over unit edges e of COUNT(e,T), the number of times e 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).
- Tn is the shortest even tour, so every tour shorter than Tn is odd.
- Tn is k-optimal for every k≤n/4.
- Theorem 6: for n≥8 there is a graph with a tour that is k-optimal for all k≤n/4 and has LOCALOPT/OPTIMAL =2(1−1/n).
Significance
The result. The Corollary shows that the 2(1−1/n) worst-case guarantee of nearest and cheapest insertion cannot be improved by requiring that the returned tour survive k-change local search, for k up to a quarter of the number of cities. Theorem 6 says more generally that k-optimality with k≤n/4 does not bound the ratio to the optimum below 2(1−1/n). 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 k-optimality. This mission produces a reusable definition of k-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 n≥6").
Difficulty
Two steps carry the weight. First, the omitted calculations for the insertion run: at each stage one must show that inserting ai between i−1 and i 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 n=4 and n=5, so the verification must use n≥6 in an essential way. Second, k-optimality is a statement about every tour at edge difference k, 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 k from below.
Formalization scope
Nodes are Fin n, so the paper's node m is index m−1 and ai=i+1 is index i; subtour indices stay 1-based (T1=[a0], approximation Tn). A distance is d : Fin n → Fin n → ℝ with the structure IsTSPDist (symmetric, nonnegative, triangle inequality, and d(i,i)=0; 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(T,k) 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. k-optimality compares the tour with every permutation whose edge set (unordered pairs) misses exactly k of the tour's edges. Ratios are multiplied out.
COUNT(e,T) needs a choice of shortest arc for antipodal pairs when n is even; the formalization takes the arc through min(x,y),…,max(x,y). The paper's argument does not depend on this choice.
Deviations from the printed text: the Corollary is stated for n≥6 (the printed statement says only 4k≤n, but its proof uses the example of Theorem 5, which exists for n≥6; for k=0, n=3 the printed statement is false). Theorem 6 keeps its printed n≥8. 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 >0, the paper's standing assumption (1.1). Without it, the zero distance would make every length zero and every tour k-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