Spanning in-arborescences and parent functions #
A digraph T on V is a spanning in-arborescence rooted at r (Digraph.IsInArborescence)
if the root has no outgoing arc, every other vertex has exactly one outgoing arc, and every vertex
reaches r along arcs. Its arcs point towards the root.
An in-arborescence is determined by its parent function, which sends each vertex v ≠ r to the
head of its unique outgoing arc. Conversely, a function p : V → V gives the digraph
Digraph.parentDigraph r p with arcs v → p v for v ≠ r. Using the general multidigraph
parent-iteration characterization (Cslib.Multidigraph.isInArborescence_iff_exists_iterate), this
module proves that parentDigraph r p is a spanning in-arborescence iff iterating p leads from
every vertex to r (Digraph.isInArborescence_parentDigraph_iff), and that every spanning
in-arborescence arises this way (Digraph.IsInArborescence.exists_parentDigraph_eq).
Main definitions #
Digraph.IsInArborescence: spanning in-arborescences rooted at a vertex.Digraph.parentDigraph: the digraph of a parent function.
Main results #
Digraph.isInArborescence_parentDigraph_iff:parentDigraph r pis a spanning in-arborescence rooted atriff every vertex reachesrby iteratingp.Digraph.IsInArborescence.exists_parentDigraph_eq: every spanning in-arborescence is the digraph of a parent function fixing the root.
The directed matrix-tree theorem (CslibFrontier.Foundations.Combinatorics.Digraph.MatrixTree)
counts
these arborescences, and the Chu–Liu/Edmonds algorithm
(CslibFrontier.Algorithms.Lean.Arborescence.ChuLiuEdmonds) optimizes over them.
T is a spanning in-arborescence rooted at r, an oriented spanning tree with every arc
directed towards r: the root has no outgoing arc, every other vertex has exactly one outgoing
arc, and every vertex reaches r along arcs.
The root has no outgoing arc.
Every vertex other than the root has exactly one outgoing arc.
- reachable (v : V) : Relation.ReflTransGen T.Adj v r
Every vertex reaches the root along arcs.
The digraph of a parent function p: the arcs v → p v for v ≠ r.
If iterating p leads from v to r, then v reaches r in parentDigraph r p.
If v reaches r in parentDigraph r p, then iterating p leads from v to r.
The digraph of a parent function is a spanning in-arborescence rooted at r iff iterating
the parent function leads from every vertex to r.
Every spanning in-arborescence rooted at r is the digraph of a parent function fixing r.