The directed matrix-tree theorem #
Let A : Matrix V V R be a matrix over a commutative ring, read as the arc weights of a complete
weighted digraph on a finite vertex type V, and let r : V. The reduced Laplacian is the
submatrix of the out-degree Laplacian Matrix.laplacian A = diagonal (fun u => ∑ v, A u v) - A on
the rows and columns of the vertices other than r. Its determinant is the sum, over the spanning
in-arborescences T rooted at r, of the product of the weights A v w of the arcs v → w of
T (Digraph.det_laplacian_submatrix_eq_finsum_isInArborescence). This is Tutte's directed
matrix-tree theorem [Tut48]. A spanning in-arborescence rooted at r is a digraph on all of
V in which r has no outgoing arc, every other vertex has exactly one outgoing arc, and every
vertex reaches r along arcs (Digraph.IsInArborescence, defined with its parent-function
description in CslibFrontier.Foundations.Combinatorics.Digraph.Arborescence). Its arcs point
towards the root.
For a digraph G with adjacency matrix Digraph.adjMatrix R G, the reduced Laplacian is the
out-degree matrix minus the adjacency matrix with the row and column of r deleted, and its
determinant is the number of spanning in-arborescences T ≤ G rooted at r
(Digraph.det_laplacian_adjMatrix_submatrix_eq_natCard_isInArborescence). Out-arborescences,
whose arcs point away from the root, are counted by applying these results to the transposed
weight matrix Aᵀ, which reverses every arc. The diagonal of A (loops) never contributes.
The proof expands the determinant multilinearly along its rows. Row v of the reduced Laplacian
is ∑ u, A v u • (e_v - e_u), where e_r is read as 0. The determinant is therefore the sum,
over the parent functions f assigning to each vertex v ≠ r a vertex f v, of
∏ v, A v (f v) times the determinant of the matrix with rows e_v - e_{f v}. That determinant
is 1 when iterating f from every vertex reaches r: ordered by the number of steps to r, the
matrix is triangular with unit diagonal. Otherwise f has a cycle avoiding r, and the
indicator vector of the vertices that never reach r lies in its kernel, so it is 0. The parent
functions that reach r correspond to the in-arborescences rooted at r, by T.Adj v w ↔ w = f v.
Main definitions #
Digraph.adjMatrix: the adjacency matrix of a digraph.
Main results #
Digraph.det_laplacian_submatrix_eq_finsum_isInArborescence: the directed matrix-tree theorem, weighted form.Digraph.det_laplacian_submatrix_eq_finsum_reachable: the same, as a sum over parent functions.Digraph.det_laplacian_adjMatrix_submatrix_eq_natCard_isInArborescence: the directed matrix-tree theorem, counting form.Digraph.finsum_isInArborescence_eq_of_balanced,Digraph.natCard_isInArborescence_eq_of_balanced: root independence of the arborescence weight sum and count on balanced digraphs.
References #
- W. T. Tutte, The dissection of equilateral triangles into equilateral triangles (Theorem 3.6, according to [Sta13], Chapter 10 notes; the primary source was not inspected)
- R. P. Stanley, Topics in Algebraic Combinatorics, Theorem 10.4 (the directed matrix-tree theorem for digraphs with parallel arcs and loops)
The adjacency matrix of a digraph: the entry (v, w) is 1 if v → w is an arc and 0
otherwise.
Parent functions #
The determinant expansion #
The directed matrix-tree theorem [Tut48]. For a matrix A of arc weights over a
commutative ring and a vertex r, the determinant of the reduced Laplacian, the submatrix of
Matrix.laplacian A on the vertices other than r, is the sum, over the spanning
in-arborescences T rooted at r (arcs directed towards r), of the product of the weights
A v w of the arcs v → w of T. The Laplacian is the out-degree one,
diagonal (fun v => ∑ w, A v w) - A. Applied to Aᵀ, the same statement sums over the
out-arborescences of A rooted at r.
The directed matrix-tree theorem, parent-function form. The determinant of the reduced
Laplacian is the sum, over the parent functions f assigning to each vertex v ≠ r a vertex
f v such that following f leads from every vertex to r, of ∏ v, A v (f v).
The directed matrix-tree theorem, counting form [Tut48]. For a finite digraph G and
a vertex r, the determinant of the reduced Laplacian of G, the out-degree matrix minus the
adjacency matrix with the row and column of r deleted, is the number of spanning
in-arborescences T ≤ G rooted at r (arcs directed towards r). Loops of G do not
contribute.
For a balanced weight matrix (∑ w, A v w = ∑ u, A u v), the weighted sum of spanning
in-arborescences rooted at u equals that rooted at v.
For a finite balanced digraph (∀ v, outdeg v = indeg v), the number of spanning
in-arborescences rooted at u equals that rooted at v ([Sta13], Corollary 10.3 for
simple digraphs, without assuming connectivity).