Property b): nearest neighbor from the start node can produce
ProvedTSPHeuristics.NNLower.gbar_nearest_neighbor_pathFor every , the nearest neighbor algorithm on , started at the start node of , can, with a suitable resolution of ties, visit the nodes in the order of the path and then return from the middle node (the last node of ) to the start node. That is, the tour with the -th node of () exists and is a nearest-neighbor tour of .
This is property b) of p. 568: it identifies one run of the algorithm whose tour is long.
Formalization Note "The -th node of " is (pathP i).getD k 0; the statement asserts that some permutation lists (so visits every node once) and that it satisfies IsNearestNeighborTour, which allows ties to be broken arbitrarily.
import Mathlib import Definitions.Def_TSPHeuristics_NNLower_TSPModel import Definitions.Def_TSPHeuristics_NNLower_LowerBoundFamily
namespace TSPHeuristics.NNLower
/-- Property b), p. 568: for `i ≥ 1`, the nearest neighbor method started at the start node of
`Ḡ_i` can (with suitable resolution of ties) produce the path `P_i` followed by the edge returning
from the middle node to the start node: the tour that visits the nodes in the order of `P_i` is a
nearest-neighbor tour of `Ḡ_i`. -/
theorem gbar_nearest_neighbor_path (i : ℕ) (hi : 1 ≤ i) :
∃ τ : Equiv.Perm (Fin (numNodes i)),
(∀ k : Fin (numNodes i), (τ k : ℕ) = (pathP i).getD k 0) ∧
IsNearestNeighborTour (gbar i) τ := by sorry
end TSPHeuristics.NNLower
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting.
- is the number of nodes.
- is the recursively defined list of nodes: , and is , then shifted by , then the node .
- is the shortest-path distance in the edge list , for .
Claim. For every natural number , there exists a permutation of with two properties.
- Order matches : for every , equals the -th entry of , counting from . If had no -th entry, the value would be used instead. has exactly entries, so this default is never used.
- Nearest-neighbour property: for every with and every node ,
Degenerate cases.
- The case is excluded.
- Because must be a permutation, the claim includes the assertion that the entries of are pairwise distinct and cover all nodes.
- Nothing is asserted about the closing step from back to .
- Ties are allowed: the chosen next node need only be no farther than every unvisited node.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.