Documentation

CslibFrontier.Algorithms.Lean.SteinerTree.Zelikovsky

Zelikovsky's 11/6-approximation algorithm for metric Steiner tree #

This module formalizes Zelikovsky's 11/6-approximation algorithm [Zel93] for the metric Steiner tree problem, strictly beating the classical factor-2 MST heuristic of CslibFrontier.Algorithms.Lean.SteinerTree.Metric.

Overview and proof structure #

  1. 3-stars and 3-restricted Steiner trees: A ThreeStar α connects a triple of terminals a, b, c : α through a center center : α at cost δ center a + δ center b + δ center c (a 2-terminal edge (u, v) is represented as the degenerate 3-star ⟨u, u, v, u⟩ of cost δ u v when δ u u = 0). A 3-restricted Steiner tree is a list Z : List (ThreeStar α) connecting R, and opt3Restricted δ R is its least cost.
  2. The 5/3 structural bound (three_mul_opt3Restricted_le_five_mul_steinerOpt): Every metric Steiner tree connecting R converts into a full binary tree B whose leaves are R with B.cost δ ≤ edgeCost δ T. Defining p B : ℚ as the expected root-to-leaf path length under uniform left/right choices (so some leaf of B lies at distance ≤ p B from the root), the 2-state potential inequality 2 · F_C B + F_E B + 4 · p B ≤ 5 · B.cost δ together with F_C B ≤ F_E B yields 3 · opt3Restricted δ R ≤ 5 · steinerOpt δ R directly by structural induction on B.
  3. Greedy 3-star contraction (zelikovskySteiner) and the 11/6 bound: Tracking contracted terminal components by a DisjointSet.Partition R.length and the residual MST cost mstCost δ R p := totalWeight (kruskalScan p (sortedTerminalEdges δ R)), contracting a 3-star s yields save p s := mstCost p - mstCost (contract p s) and net gain win p s := save p s - s.cost δ R. The greedy algorithm zelikovskySteiner δ V R repeatedly contracts a candidate 3-star (with center in V) maximizing win while win > 0, and finishes with the remaining Kruskal MST edges. A single-edge Kruskal exchange lemma on Partition R.length shows that each greedy step preserves 2 · cost(ALG) ≤ mstCost(p) + cost(Z) (two_mul_edgeCost_zelikovskySteiner_le). Combining MST ≤ 2 · OPT (edgeCost_steinerMST_le_two_mul_of_diag) with 3 · opt3 ≤ 5 · OPT gives 6 · cost(zelikovskySteiner δ V R) ≤ 3 · MST + 3 · opt3 ≤ 6 · OPT + 5 · OPT = 11 · OPT (six_mul_edgeCost_zelikovskySteiner_le_steinerOpt).

Limitations #

The algorithm is a pure computable Lean function parameterized by a finite candidate vertex list V : List α; no machine-level running-time certificate is formalized here. Citations to [Zel93] rely on bibliographic metadata and standard presentations; the original paper was not inspected firsthand.

Main definitions #

Main results #

References #

3-stars and 3-restricted Steiner trees #

A 3-star (3-restricted full Steiner component): three terminals a, b, c connected through a center vertex center. A 2-terminal edge (u, v) is represented as ⟨u, u, v, u⟩.

  • a : α

    First terminal.

  • b : α

    Second terminal.

  • c : α

    Third terminal.

  • center : α

    Central Steiner (or terminal) vertex.

Instances For
    @[instance_reducible]
    def Cslib.Algorithms.Lean.SteinerTree.ThreeStar.cost {α : Type u_1} (δ : α → α → ℕ) (s : ThreeStar α) :

    The cost of a 3-star: δ center a + δ center b + δ center c.

    The three edges of a 3-star connecting center to a, b, and c.

    The terminal-spanning edges [(s.a, s.b), (s.b, s.c)] induced by a 3-star s.

    The combined edge list of a list of 3-stars.

    def Cslib.Algorithms.Lean.SteinerTree.threeRestrictedCost {α : Type u_1} (δ : α → α → ℕ) (Z : List (ThreeStar α)) :

    The total cost of a list of 3-stars.

    Z is a valid 3-restricted Steiner tree for R: every star's terminals lie in R and the stars connect R through shared terminals (full components intersecting only at terminals).

    Every valid 3-restricted Steiner tree connects R via its underlying Steiner edges.

    noncomputable def Cslib.Algorithms.Lean.SteinerTree.opt3Restricted {α : Type u_1} (δ : α → α → ℕ) (R : List α) :

    The optimum cost of a 3-restricted Steiner tree connecting R.

    theorem Cslib.Algorithms.Lean.SteinerTree.opt3Restricted_le {α : Type u_1} {δ : α → α → ℕ} {R : List α} {Z : List (ThreeStar α)} (hZ : IsThreeRestricted R Z) :

    Part 1: Full binary tree conversion and the 5/3 structural bound #

    theorem Cslib.Algorithms.Lean.SteinerTree.exists_threeRestricted_cost_le {α : Type u_1} {δ : α → α → ℕ} (hdiag : ∀ (x : α), δ x x = 0) (hsymm : ∀ (x y : α), δ x y = δ y x) (htri : ∀ (x y z : α), δ x z ≤ δ x y + δ y z) {R : List α} {T : List (α × α)} (hT : Connects T R) :
    ∃ (Z : List (ThreeStar α)), IsThreeRestricted R Z ∧ (∀ s ∈ Z, s.center ∈ R ∨ ∃ e ∈ T, s.center = e.1 ∨ s.center = e.2) ∧ 3 * threeRestrictedCost δ Z ≤ 5 * edgeCost δ T

    Structural 5/3 lemma (with center tracking): for every edge list T connecting R, there exists a 3-restricted Steiner tree Z connecting R whose centers lie among R and the endpoints of T, with 3 · threeRestrictedCost δ Z ≤ 5 · edgeCost δ T.

    theorem Cslib.Algorithms.Lean.SteinerTree.three_mul_opt3Restricted_le_five_mul_steinerOpt {α : Type u_1} {δ : α → α → ℕ} (hdiag : ∀ (x : α), δ x x = 0) (hsymm : ∀ (x y : α), δ x y = δ y x) (htri : ∀ (x y z : α), δ x z ≤ δ x y + δ y z) (R : List α) :

    Zelikovsky's 5/3 structural theorem for 3-restricted Steiner trees ([Zel93]): for any metric δ (δ x x = 0, symmetric, triangle inequality), 3 · opt3Restricted δ R ≤ 5 · steinerOpt δ R.

    Part 2: Indexed 3-stars, partition contractions, and the Kruskal exchange lemma #

    An indexed 3-star on terminal indices Fin k with Steiner center center : α.

    • a : Fin k

      First terminal index.

    • b : Fin k

      Second terminal index.

    • c : Fin k

      Third terminal index.

    • center : α

      Central vertex in the metric space.

    Instances For
      @[instance_reducible]
      def Cslib.Algorithms.Lean.SteinerTree.instDecidableEqThreeStarIdx.decEq {k✝ : ℕ} {α✝ : Type u_1} [DecidableEq α✝] (x✝ x✝¹ : ThreeStarIdx k✝ α✝) :
      Decidable (x✝ = x✝¹)
      @[instance_reducible]
      instance Cslib.Algorithms.Lean.SteinerTree.instReprThreeStarIdx {k✝ : ℕ} {α✝ : Type u_1} [Repr α✝] :
      Repr (ThreeStarIdx k✝ α✝)
      def Cslib.Algorithms.Lean.SteinerTree.ThreeStarIdx.cost {α : Type u_1} (δ : α → α → ℕ) (R : List α) (s : ThreeStarIdx R.length α) :

      The cost of an indexed 3-star on terminal list R.

      The three edges of an indexed 3-star on terminal list R.

      Contract the three terminals of s into a single supernode in p.

      The weight-sorted complete graph on the terminal indices Fin R.length.

      The cost of a minimum spanning tree of the terminal graph contracted by p.

      The MST cost reduction obtained by contracting 3-star s into p.

      Zelikovsky's net gain win(p, s) = save(p, s) - cost(s) (truncated at 0 in ℕ).

      theorem Cslib.Algorithms.Lean.SteinerTree.save_le_of_partLe {α : Type u_1} (δ : α → α → ℕ) (R : List α) {p q : DataStructure.DisjointSet.Partition R.length} (h : ∀ (x y : Fin R.length), p.rel x y = true → q.rel x y = true) (s : ThreeStarIdx R.length α) :
      save δ R q s ≤ save δ R p s

      Submodularity of save for a 3-star under partition refinement.

      Part 3: Zelikovsky's greedy 11/6-approximation algorithm #

      Candidate indexed 3-stars with strictly ordered terminal indices a < b < c and center in V. Degenerate 3-stars always have win = 0 (win_eq_zero_of_dup), and win is symmetric in (a, b, c), so this list captures the global maximum of win over all 3-stars with center in V.

      Step function for selecting a 3-star with maximum strictly positive win.

      Pick a candidate 3-star with center in V maximizing win δ R p s, or none if none has strictly positive win.

      Greedy contraction loop for Zelikovsky's algorithm, bounded by fuel iterations.

      def Cslib.Algorithms.Lean.SteinerTree.zelikovskySteiner {α : Type u_1} (δ : α → α → ℕ) (V R : List α) :
      List (α × α)

      Zelikovsky's 11/6-approximation algorithm ([Zel93]) for metric Steiner tree: repeatedly contracts a 3-star (with center in V) maximizing win while win > 0, and finishes with the residual Kruskal MST on the remaining contracted terminal components.

      Exact cost decomposition of zelikovskySteiner.

      theorem Cslib.Algorithms.Lean.SteinerTree.connects_zelikovskySteiner {α : Type u_1} (δ : α → α → ℕ) (V R : List α) :

      Connectivity of Zelikovsky's algorithm: zelikovskySteiner δ V R connects all terminals in R.

      theorem Cslib.Algorithms.Lean.SteinerTree.two_mul_edgeCost_zelikovskySteiner_le {α : Type u_1} {δ : α → α → ℕ} (hdiag : ∀ (x : α), δ x x = 0) (hsymm : ∀ (x y : α), δ x y = δ y x) (htri : ∀ (x y z : α), δ x z ≤ δ x y + δ y z) {V R : List α} {Z : List (ThreeStar α)} (hZ : IsThreeRestricted R Z) (hZV : ∀ s ∈ Z, s.center ∈ V) :

      Zelikovsky's greedy potential bound: for every 3-restricted Steiner tree Z connecting R whose centers lie in V, 2 · cost(zelikovskySteiner δ V R) ≤ cost(steinerMST δ R) + threeRestrictedCost δ Z.

      theorem Cslib.Algorithms.Lean.SteinerTree.six_mul_edgeCost_zelikovskySteiner_le {α : Type u_1} {δ : α → α → ℕ} (hdiag : ∀ (x : α), δ x x = 0) (hsymm : ∀ (x y : α), δ x y = δ y x) (htri : ∀ (x y z : α), δ x z ≤ δ x y + δ y z) {V R : List α} {T : List (α × α)} (hT : Connects T R) (hRV : ∀ r ∈ R, r ∈ V) (hTV : ∀ e ∈ T, e.1 ∈ V ∧ e.2 ∈ V) :
      6 * edgeCost δ (zelikovskySteiner δ V R) ≤ 11 * edgeCost δ T

      Zelikovsky's 11/6-approximation theorem ([Zel93]): for any metric δ and any Steiner tree T connecting R whose vertices and R lie in the candidate set V, 6 · cost(zelikovskySteiner δ V R) ≤ 11 · cost(T).

      theorem Cslib.Algorithms.Lean.SteinerTree.six_mul_edgeCost_zelikovskySteiner_le_steinerOpt {α : Type u_1} {δ : α → α → ℕ} (hdiag : ∀ (x : α), δ x x = 0) (hsymm : ∀ (x y : α), δ x y = δ y x) (htri : ∀ (x y z : α), δ x z ≤ δ x y + δ y z) {V : List α} (hV : ∀ (x : α), x ∈ V) (R : List α) :
      6 * edgeCost δ (zelikovskySteiner δ V R) ≤ 11 * steinerOpt δ R

      Zelikovsky's 11/6-approximation against steinerOpt ([Zel93]): when V enumerates the vertex space (∀ x, x ∈ V), 6 · cost(zelikovskySteiner δ V R) ≤ 11 · steinerOpt δ R.