Corollary to Theorem 6 — nearest and cheapest insertion can return a -optimal tour with INSERT/OPTIMAL when
ProvedTSPHeuristics.KOpt.insertion_k_optimal_ratio_two_mul_one_sub_invLet and let be a natural number with . There is a traveling salesman graph on nodes with such that
- some run of nearest insertion on returns a tour that is -optimal and satisfies
- some run of cheapest insertion on the same returns a tour with the same two properties.
Thus even when nearest or cheapest insertion happens to return a tour that no -change can improve, its length can be as large as the worst-case guarantee OPTIMAL of these methods: local optimality certifies nothing better.
Formalization Note The ratio is multiplied out: cycleLength d (T n) = 2 * (1 - 1/n) * optimal d, with OPTIMAL the true minimum over all tours. The conjunct 0 < optimal d is the paper's standing assumption (1.1) (p. 564); without it the zero distance would satisfy everything trivially. The hypothesis is added to the printed Corollary ("for any k and n such that 4·k ≦ n"): its proof is the example of Theorem 5, which the paper establishes only for , and for , the printed statement is false (every tour on three nodes is optimal). -optimality compares the returned tour with every tour at edge difference exactly . Both methods are stated on the same graph, which is what the proof gives.
import Mathlib import Definitions.Def_TSPHeuristics_Shared_Insertion import Definitions.Def_TSPHeuristics_KOpt_KOptimal
namespace TSPHeuristics.KOpt
theorem insertion_k_optimal_ratio_two_mul_one_sub_inv (n k : ℕ) (hn : 6 ≤ n) (hk : 4 * k ≤ n) :
∃ d : Fin n → Fin n → ℝ, TSPHeuristics.Shared.IsTSPDist d ∧ 0 < TSPHeuristics.Shared.optimal d ∧
(∃ (T : ℕ → List (Fin n)) (a : ℕ → Fin n), TSPHeuristics.Shared.IsInsertionRun d T a ∧ TSPHeuristics.Shared.IsNearestRule d T a ∧
IsKOptimal d k (T n) ∧ TSPHeuristics.Shared.cycleLength d (T n) = 2 * (1 - 1 / (n : ℝ)) * TSPHeuristics.Shared.optimal d) ∧
(∃ (T : ℕ → List (Fin n)) (a : ℕ → Fin n), TSPHeuristics.Shared.IsInsertionRun d T a ∧ TSPHeuristics.Shared.IsCheapestRule d T a ∧
IsKOptimal d k (T n) ∧ TSPHeuristics.Shared.cycleLength d (T n) = 2 * (1 - 1 / (n : ℝ)) * TSPHeuristics.Shared.optimal d) := by sorry
end TSPHeuristics.KOpt
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
For every pair of natural numbers and with
the statement says there is a real-valued function defined on ordered pairs of points that has all of the following properties.
- is a TSP distance. satisfies the bundle's predicate
IsTSPDist. The code of this predicate is not included in what I was given, so I cannot say which axioms it imposes. It might require symmetry, non-negative values, zero on the diagonal or the triangle inequality, but that is not visible here. - The optimum is positive. , where is the bundle's
optimal d. Its definition is also not shown. It is presumably meant as the shortest tour length for , but the code shown does not fix this. For example, it does not show whether the optimum is taken over tours that visit all points, or whether it is an infimum that returns a default value. - A nearest-insertion run ends at the stated length. There exist a sequence of lists of points (one list for each natural number) and a sequence of points such that all of the following hold:
- satisfies
IsInsertionRunfor . - satisfies
IsNearestRulefor . - The list (the entry at index , where is the number of points) satisfies
IsKOptimalfor and the same . - The cycle length of under (
cycleLength) is exactly
- satisfies
- A cheapest-insertion run ends at the same length. There also exist a sequence of lists and points , possibly different from those in item 3, such that all of the following hold:
- satisfies
IsInsertionRunfor . - satisfies
IsCheapestRulefor . - satisfies
IsKOptimalfor and . - .
- satisfies
The same distance function has to serve both runs, but the two runs are chosen independently.
None of the predicates IsInsertionRun, IsNearestRule, IsCheapestRule, IsKOptimal or cycleLength is shown in the code I received, so I cannot unfold them. Whatever they actually require is exactly what this statement asserts. The following points in particular are open:
- which entries of and
IsInsertionRunconstrains; - whether is required to be a tour through all points;
- what "-optimal" means precisely, and what it means for small .
The statement only asserts that such a and such runs exist for each allowed . It says nothing about every distance function or every run. It uses equality, not an inequality, and the constant is exactly .
Degenerate cases. Because , the set of points is never empty and never has just one element. The division is always a genuine real division by a nonzero number, and lies in . The case is allowed for every , since . In that case the requirement " is -optimal" means whatever IsKOptimal says for , which may be trivially true. The largest allowed value is , for example when or . The sequences and are defined at every natural-number index, including indices above . Whether those entries are constrained, and whether is the final tour, depends entirely on the unseen definition of IsInsertionRun. If optimal returns a default value on some inputs, for example for an empty or unbounded set, the requirement rules out a where that default is or negative.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.