Documentation

CslibFrontier.Foundations.Combinatorics.Multidigraph.Arborescence

Spanning in-arborescences of finite multidigraphs #

A multidigraph on the vertices V with arcs E, parallel arcs and loops allowed, is given here by the maps src tgt : E → V sending each arc to its source and its target. A spanning in-arborescence rooted at r chooses, for every vertex v ≠ r, an arc f v out of v, such that following the chosen arcs leads from every vertex to r (Cslib.Multidigraph.IsInArborescence, defined in CslibFrontier.Foundations.Combinatorics.Multidigraph.Basic). On the arc multidigraph (arcSrc G, arcTgt G) of a simple digraph G : Digraph V, these correspond bijectively to the spanning in-arborescence subdigraphs T ≤ G (Cslib.Multidigraph.arborescenceEquivSubdigraph), and arcMatrix specializes to G.adjMatrix (Cslib.Multidigraph.arcMatrix_arcSrc_arcTgt).

Their number is the determinant of the reduced Laplacian of the arc-count matrix, whose entry (u, w) is the number of arcs from u to w (Cslib.Multidigraph.arcMatrix). This is the directed matrix-tree theorem [Tut48] for multidigraphs (Cslib.Multidigraph.det_laplacian_arcMatrix_submatrix_eq_natCard_isInArborescence), derived from the parent-function form Digraph.det_laplacian_submatrix_eq_finsum_reachable by sorting the arborescences by the vertices tgt (f v) that their arcs reach.

Main definitions #

Main results #

References #

def Cslib.Multidigraph.arcMatrix {V : Type u_1} {E : Type u_2} (src tgt : E → V) (R : Type u_3) [NatCast R] [Fintype E] [DecidableEq V] :
Matrix V V R

The arc-count matrix of a multidigraph: the entry (u, w) is the number of arcs from u to w.

@[simp]
theorem Cslib.Multidigraph.arcMatrix_apply {V : Type u_1} {E : Type u_2} (src tgt : E → V) {R : Type u_3} [NatCast R] [Fintype E] [DecidableEq V] (u w : V) :
arcMatrix src tgt R u w = ↑{e : E | src e = u ∧ tgt e = w}.card

The entries of the arc-count matrix.

On the arc multidigraph of G : Digraph V, arcMatrix equals G.adjMatrix.

noncomputable def Cslib.Multidigraph.arborescenceEquivSubdigraph {V : Type u_1} (G : Digraph V) (r : V) :
{ f : { v : V // v ≠ r } → Arc G // IsInArborescence (arcSrc G) (arcTgt G) r f } ≃ { T : Digraph V // T ≤ G ∧ T.IsInArborescence r }

Spanning in-arborescences of (arcSrc G, arcTgt G) correspond bijectively to spanning in-arborescence subdigraphs T ≤ G.

theorem Cslib.Multidigraph.det_laplacian_arcMatrix_submatrix_eq_natCard_isInArborescence {V : Type u_1} {E : Type u_2} (src tgt : E → V) (R : Type u_3) [CommRing R] [Fintype V] [DecidableEq V] [Fintype E] (r : V) :
((arcMatrix src tgt R).laplacian.submatrix Subtype.val Subtype.val).det = ↑(Nat.card { f : { v : V // v ≠ r } → E // IsInArborescence src tgt r f })

The directed matrix-tree theorem for multidigraphs [Tut48] ([Sta13], Theorem 10.4). The determinant of the reduced Laplacian of the arc-count matrix, the out-degree matrix minus the arc-count matrix with the row and column of r deleted, is the number of spanning in-arborescences rooted at r (arcs directed towards r). Loops do not contribute. The source assumes a connected digraph; connectivity is not needed.

theorem Cslib.Multidigraph.natCard_isInArborescence_eq {V : Type u_1} {E : Type u_2} (src tgt : E → V) [DecidableEq V] [Fintype E] (hbal : ∀ (v : V), {e : E | src e = v}.card = {e : E | tgt e = v}.card) (u v : V) :
Nat.card { f : { x : V // x ≠ u } → E // IsInArborescence src tgt u f } = Nat.card { f : { x : V // x ≠ v } → E // IsInArborescence src tgt v f }

Root independence of the arborescence count ([Sta13], Corollary 10.3). In any finite balanced multidigraph (∀ v, outdeg v = indeg v), the number of spanning in-arborescences rooted at u equals that rooted at v. Connectivity and positive out-degree are not required.