Shortcutting closed walks #
Under the triangle inequality, skipping vertices of a closed walk does not increase its cost
([WS11], Section 2.4, proof of Theorem 2.12). In particular, the distinct vertices
of an Euler circuit of a multigraph H, visited in order, form a closed walk costing at most the
total weight of H. This is the last step of the double-tree algorithm and of Christofides'
algorithm.
Model #
Closed walks are lists of vertices with cost Cslib.Algorithms.Lean.TSP.cycleCost; walks along
consecutive pairs and Euler circuits are those of Cslib.Algorithms.Lean.Euler. Shortcutting is
modelled by List.Sublist: any subsequence of a closed walk is a shortcut of it. Mathlib's
List.dedup keeps the last occurrence of each vertex, whereas [WS11] keeps the
first; both are subsequences, and the cost bound only uses that.
Main results #
cycleCost_cons_eq_sum_consecutivePairs: the cost of a closed walk fromais the cost of the walka :: L ++ [a]along its consecutive pairs.cycleCost_le_of_sublist: shortcutting does not increase the cost.cycleCost_dedup_le_of_isEulerCircuit: for a symmetric cost, the shortcut Euler circuit costs at most its multigraph.
References #
The cost of a closed walk from a is the cost of the walk a :: L ++ [a] along consecutive
pairs.
Shortcutting ([WS11], Section 2.4): under the triangle inequality, skipping vertices of a closed walk does not increase its cost.
Shortcutting an Euler circuit: under symmetry and the triangle inequality, the closed walk
visiting the distinct vertices of an Euler circuit of a nonempty multigraph H (in order of last
occurrence) costs at most the total weight of H.