Minimum spanning forests of multigraphs #
For a multigraph ends : E → Sym2 V (parallel edges and self-loops allowed), a finite set
S : Finset E of its edges and weights w : E → W in a linear order, the minimum spanning
forest Cslib.Multigraph.msf ends w S consists of the edges e ∈ S whose ends are not joined by
the edges of S strictly lighter than e. A self-loop is never in it. With distinct weights this
is the usual minimum spanning forest: it is a spanning forest of S
(Cslib.Multigraph.isSpanningForest_msf) of least total weight among all spanning forests of S
(Cslib.Multigraph.sum_msf_le).
Edges are joined along walks: Cslib.Multigraph.Joins ends S u v says that u and v are
joined by edges of S, that is, are reachable from each other in the multigraph restricted to S
(Cslib.Multigraph.joins_iff_reachable). An edge e is supported by a set F of edges when
the edges of F of weight at most w e join its ends (Cslib.Multigraph.Supported).
The module proves, in this setting, the standard facts of §2 of
Khanna, Putterman and Song (the paper's Facts 2.2–2.4, p. 11, and
Fact 2.5, p. 12) and the filtering identity behind line 8 of their Algorithm 2 (§4, p. 25). These
are steps in the proof of their Theorem 4.1 (§4, p. 25), tracked in #8325, and the paper's numbers
are kept as pointers. Distinct weights are assumed, as in the paper, through Function.Injective w,
and only where needed: the cut and cycle properties, threshold connectivity and the first filtering
lemma hold for all weights.
The contraction property is stated without changing the vertex type: contracting a set C of
edges is the vertex map q that identifies exactly the vertices joined by C, and the contracted
multigraph is Sym2.map q ∘ ends on the same edges. Cslib.Multigraph.contract is one such map.
Main definitions #
Cslib.Multigraph.Joins:uandvare joined by edges ofS.Cslib.Multigraph.contract: a vertex map identifying exactly the vertices joined byC.Cslib.Multigraph.support: the non-isolated vertices of a set of edges.Cslib.Multigraph.msf: the minimum spanning forest of a finite set of edges.Cslib.Multigraph.Supported,Cslib.Multigraph.unsupported: edges whose ends are joined by edges ofFno heavier than them, and the edges ofSthat are not.Cslib.Multigraph.IsAcyclic: no edge ofFhas its ends joined by the other edges ofF(Cslib.Multigraph.isAcyclic_iff,Cslib.Multigraph.IsAcyclic.mono).Cslib.Multigraph.IsSpanningForest: an acyclic subset ofSjoining the ends of every edge ofS.
Main results #
Cslib.Multigraph.joins_iff_reachable:Joinsis reachability in the underlying simple graph of the restriction toS.Cslib.Multigraph.joins_insert_iff,Cslib.Multigraph.joins_map_iff: joining with one more edge, and joining in a contracted multigraph.Cslib.Multigraph.mem_msf_of_mem_edgeCut: the cut property (the paper's Fact 2.2): the lightest edge ofScrossing a cut is inmsf S.Cslib.Multigraph.notMem_msf_of_joins: the cycle property (the paper's Fact 2.3): an edge whose ends are joined by strictly lighter edges ofSis not inmsf S.Cslib.Multigraph.msf_eq_union_msf_map: the contraction property (the paper's Fact 2.4):msf S = C ∪ msf (S \ C)forC ⊆ msf S, the latter in the multigraph withCcontracted.Cslib.Multigraph.joins_msf_of_joins: threshold connectivity (the paper's Fact 2.5):msf Spreserves connectivity by the edges of weight at mostk, for every thresholdk.Cslib.Multigraph.exists_bottleneck: distinct vertices joined byFhave a bottleneck edgeg ∈ F, whose thresholdw gis the least at which the edges ofFjoin them.Cslib.Multigraph.msf_eq_of_subset,Cslib.Multigraph.notMem_msf_of_supported,Cslib.Multigraph.msf_union_unsupported: filtering. AnyS'betweenmsf SandShas the same minimum spanning forest; a supported edge outsideF ⊆ Sis not inmsf S; and somsf S = msf (F ∪ U(F))(§3.1, p. 13; Algorithm 2, line 8, p. 25).Cslib.Multigraph.isAcyclic_msf,Cslib.Multigraph.IsAcyclic.card_le,Cslib.Multigraph.card_msf_le:msf Sis acyclic, so it has at most|X| - 1edges when the ends of the edges ofSlie inX.Cslib.Multigraph.sum_card_incident_le: the degrees inSadd up to at most2 |S|.Cslib.Multigraph.isSpanningForest_msf,Cslib.Multigraph.sum_msf_le:msf Sis a spanning forest ofSof least total weight.
References #
Vertices joined by a set of edges #
Joins ends S is an equivalence relation.
Walks are carried along a vertex map f that sends the ends of every edge of S to vertices
joined by T in a multigraph ends'.
If the ends of every edge of S are joined by T, then so is everything joined by S.
The vertices joined by insert e S are those joined by S, and those joined by S to the
two ends of e.
Non-isolated vertices #
Degree sum: every edge has at most two ends, so the numbers of edges of S at the
vertices of any X add up to at most 2 |S|. A self-loop counts once at its vertex.
Contraction #
Contracted walks. Let q identify exactly the vertices joined by C. Then vertices are
joined by T in the contracted multigraph Sym2.map q ∘ ends exactly when their preimages are
joined by T ∪ C.
Minimum spanning forests #
The minimum spanning forest of the edges S: the edges e ∈ S whose ends are not joined
by the edges of S strictly lighter than e. A self-loop is never in it. The paper defines the
minimum spanning forest only for distinct weights (§2, p. 11), and for injective w this set is
it (Cslib.Multigraph.isSpanningForest_msf, Cslib.Multigraph.sum_msf_le). With ties it need not
be a forest: two parallel edges of equal weight are both in it.
An edge with ends a and b is in msf S exactly when it is in S and a and b are not
joined by the strictly lighter edges of S.
Cycle property, a step in the proof of Theorem 4.1 of [KPS26] (the
paper's Fact 2.3, §2, p. 11): an edge whose ends are joined by edges of S strictly lighter than
it is not in msf S.
Cut property, a step in the proof of Theorem 4.1 of [KPS26] (the
paper's Fact 2.2, §2, p. 11): an edge of S crossing a cut (P, Pᶜ) that is no heavier than any
edge of S crossing it is in msf S.
Threshold connectivity, a step in the proof of Theorem 4.1 of [KPS26]
(the paper's Fact 2.5, §2, p. 12): vertices joined by edges of weight at most k from some
X ⊆ S are joined by the edges of msf S of weight at most k, for every threshold k.
msf S also preserves connectivity by the edges strictly lighter than any threshold k.
Bottleneck edges. Distinct vertices joined by a finite set F of edges have a
bottleneck edge g ∈ F: the edges of F of weight at most w g join them and those of weight
less than w g do not. With distinct weights it is unique, and when F is acyclic it is the
heaviest edge on the path of F between the two vertices. Any weights in a linear order will do.
Filtering: any S' with msf S ⊆ S' ⊆ S has the same minimum spanning forest as
S.
Dropping the self-loops does not change the minimum spanning forest.
Acyclicity #
With distinct weights, msf S is acyclic.
An acyclic set of edges whose ends lie in X has at most |X| - 1 edges. Induction on the
number of edges: contracting one edge of an acyclic set leaves an acyclic set on one vertex
fewer.
With distinct weights, msf S has at most |X| - 1 edges when the ends of the edges of S
lie in X.
Contraction #
Contraction property, a step in the proof of Theorem 4.1 of [KPS26] (the
paper's Fact 2.4, §2, p. 11): with distinct weights, if C ⊆ msf S and q identifies exactly the
vertices joined by C, then msf S is C together with the minimum spanning forest of the
remaining edges S \ C in the contracted multigraph Sym2.map q ∘ ends.
Support and filtering #
The edge e is supported by the set F of edges when the edges of F of weight at most
w e join its ends (§1.2, p. 5; §3.1, p. 13).
An edge supported by F is supported by every superset of F.
Every edge of F is supported by F.
An edge is supported by msf S exactly when it is supported by S, by Fact 2.5.
The edges of S not supported by F, the set U(F) of §3.1 (p. 13).
Filtering: with distinct weights, an edge supported by a set F ⊆ S of edges and not in
F is not in msf S.
Filtering (Algorithm 2, line 8, p. 25): with distinct weights, for every F ⊆ S the
minimum spanning forest of S is that of F together with the edges of S it does not
support.
Weight optimality #
F is a spanning forest of the edges S: an acyclic subset of S that joins the ends of
every edge of S.
- subset : F ⊆ S
The forest consists of edges of
S. - isAcyclic : IsAcyclic ends ↑F
The forest is acyclic.
The forest joins the ends of every edge of
S.
With distinct weights, msf S is a spanning forest of S.
Weight optimality: with distinct weights in an ordered additive monoid, msf S has the
least total weight among the spanning forests of S. Each spanning forest F ≠ msf S exchanges
an edge outside msf S for a lighter edge of msf S, as in the cut property.