Optimum branchings via Chu–Liu/Edmonds #
A branching in a directed graph G (Digraph.IsBranching) is a directed forest of disjoint
out-arborescences (Edmonds1967Branchings, Section 1). Using the Option V super-root
correspondence from CslibFrontier.Foundations.Combinatorics.Digraph.Branching
(Digraph.superRootDigraph, Digraph.superRootExtend, Digraph.restrictOption), this module
reduces maximum-weight branching on (G, w) to minimum-cost spanning in-arborescence on
(G.superRootDigraph, superRootCost w, none) (optimumBranching).
Because every vertex some v has an arc to the super-root none of cost 0 while real arcs
some v → some u carry negated cost -w u v, the super-root reduction preserves exact weights up
to negation (arcCost_superRootExtend), always succeeds without a separate shift constant, and
also yields minimum-weight branchings via -w (minBranching). We also formalize Edmonds'
weight-shift reductions from [Edmonds1967Branchings, Section 2] (edmonds_shift_weight_branching,
edmonds_rooted_outArborescence_of_shift) characterizing maximum-cardinality branchings and
rooted spanning out-arborescences under weight shift h > ∑ |w_e|. Machine-level running-time
certificates live in CslibFrontier.Algorithms.WordRAM.Arborescence (Word-RAM O(n³)) and
CslibFrontier.Algorithms.Lean.Arborescence.PolyTime (multi-tape Turing-machine P).
Main definitions #
Cslib.Algorithms.Lean.Arborescence.optionFinEnum:FinEnum (Option V)of cardinalityFinEnum.card V + 1.Cslib.Algorithms.Lean.Arborescence.superRootCost: negated-weight cost function onOption V.Cslib.Algorithms.Lean.Arborescence.optimumBranchingParent,Cslib.Algorithms.Lean.Arborescence.optimumBranching: exact maximum-weight branching solver viaedmonds.Cslib.Algorithms.Lean.Arborescence.minBranching: minimum-weight branching via negated weights.Cslib.Algorithms.Lean.Arborescence.rootedDigraph: subgraph removing arcs entering a designated rootr₀.
Main results #
Cslib.Algorithms.Lean.Arborescence.arcCost_superRootExtend: exact cost correspondence betweenBandB.superRootExtend.Cslib.Algorithms.Lean.Arborescence.optimumBranching_isBranching,Cslib.Algorithms.Lean.Arborescence.optimumBranching_le,Cslib.Algorithms.Lean.Arborescence.optimumBranching_optimal: correctness and global maximum-weight optimality over all branchingsB ≤ G.Cslib.Algorithms.Lean.Arborescence.minBranching_optimal: global minimum-weight optimality.Cslib.Algorithms.Lean.Arborescence.edmonds_shift_weight_branching,Cslib.Algorithms.Lean.Arborescence.edmonds_rooted_outArborescence_of_shift: Edmonds' weight-shift theorems connecting optimum branchings to maximum-cardinality branchings and spanning out-arborescences.
References #
- J. Edmonds, Optimum Branchings, Sections 1–4
Explicit FinEnum (Option V) with .card = FinEnum.card V + 1 definitionally.
Extending a branching B to Option V negates its total arc weight under superRootCost w.
Negating all arc weights negates arcCost.
Congruence of arcCost across Fintype, DecidableRel, and equal digraphs.
When parentDigraph none p is a spanning in-arborescence on Option V rooted at none,
branchingDigraph (restrictParent p) coincides with
Digraph.restrictOption (parentDigraph none p).
Running edmonds on (G.superRootDigraph, superRootCost w, none) always returns some p
because fun _ => none is always a feasible spanning in-arborescence parent map.
Parent-towards-root map returned by the super-root Chu–Liu/Edmonds reduction for an optimum
(maximum-weight) branching of (G, w).
Maximum-weight branching digraph of (G, w) computed via the Option V super-root
reduction to edmonds.
Correctness and optimality of optimumBranching: optimumBranching G w is a branching
contained in G, and maximizes arcCost B w over all branchings B ≤ G.
Minimum-weight branching of (G, w) via negated weights.
Edmonds (1967, Section 2) weight-shift and rooted reductions #
Adding a uniform constant h to every arc shifts arcCost by card_arcs * h.
For any two subdigraphs B₁, B₂ ≤ G, the weight difference arcCost B₁ w - arcCost B₂ w is
bounded above by the sum of max (w e) (-w e) over all arcs of G.
Edmonds (1967, Section 2) weight-shift reduction: Adding h > ∑_{e ∈ G} |w_e| to every
arc weight makes an optimum branching maximize the number of arcs across all branchings B ≤ G,
and break ties by arcCost · w. When G contains a spanning out-arborescence, the shifted
optimum branching is a maximum-weight spanning out-arborescence of (G, w).
Subgraph obtained from G by deleting all arcs entering a designated root r₀.
Edmonds (1967, Section 2) rooted spanning out-arborescence reduction: Deleting incoming
arcs of r₀ and shifting remaining arc weights by h > ∑ |w_e| reduces maximum-weight
r₀-rooted spanning out-arborescences to optimum branchings.