betaFeedback

WorksMathematics

The Order Mass Identity of Rooted Forests, with a Direct Proof of the Extended Aldous-Broder Theorem

Abstract

The Aldous-Broder algorithm constructs a spanning tree from the first-entrance edges of a covering random walk. Its distribution is known, but deriving it by summing over the orders in which a fixed tree can be discovered remains difficult. In this paper, we evaluate this sum by establishing an order-mass identity for rooted forests. For real matrices with zero row sums, the identity expresses the sum of order weights associated with each root as a principal cofactor of a matrix on the roots, under a nonsingularity condition involving only the sets encountered along the growth orders of the given forest. We prove the identity using linear algebraic tools. With one root, the sum equals one, giving a direct proof of the extended Aldous-Broder theorem for every finite irreducible Markov chain started at a fixed state. With multiple roots, we derive the forest law produced by the stopped covering walk and show how it differs from the weight-proportional forest law. The identity and the resulting tree and forest laws are formalized in Lean 4.

Introduction

Random spanning forests are used in Bayesian clustering and graph signal processing. In Bayesian clustering, each component of a forest represents a group of observations, and a distribution over forests induces a distribution over partitions [7, 16]. In graph signal processing, random forests are used to estimate regularized and interpolated signals by Monte Carlo [20]. These applications motivate studying the distribution of the forest produced by a sampling algorithm.

Random walks give a simple way to generate trees: start at one vertex, run the walk until every vertex has been visited, and retain the edge that for the first time enters a new vertex. This is the famous Aldous-Broder construction [1, 4], and it turns out that the retained edges form a spanning tree whose law is proportional to the tree weight. Wilson’s algorithm provides another classical tree sampler, using loop-erased random walks [24, 29]. Recent methods also use fast-forwarded walks [25] to improve sampling efficiency.

Although the distribution of the Aldous-Broder tree is known to be proportional to the tree weight, a direct derivation using basic linear algebraic results and combinatorial arguments remains difficult. Hence, our first question is: for a fixed tree, can we calculate its probability by summing over the orders in which the walk can discover its vertices? We give a positive answer to this question. This calculation also leads us to consider a second question: if there is more than one root, do the forests constructed by retaining all of the first-entrance edges into the nonroot set follow the distribution that is proportional to the forest weights? The answer is no in general and we discuss the resulting forest law.

To formally describe the problem, let PP be the transition matrix of an irreducible Markov chain on V={1,…,n}V = \{1,\ldots,n\}, n≥2n \ge2, with stationary distribution π\pi. Start the chain at the root r∈Vr \in V and run it until every state has been visited. For each node v≠rv \ne r, let f(v)f(v) be the state from which vv was entered for the first time, i.e., the parent of vv. Then, the edges {(f(v),v):v≠r,v∈V}\{(f(v),v):v \ne r,v \in V\} form a diverging spanning arborescence FF pointing away from rr, called the first-entrance tree, with the law that is proportional to the tree weight:

P(F=F0)∝w(F0)(1)\mathbb{P}(F = F_0) \propto w(F_0) \tag*{(1)}

where w(F):=∏v≠rπf(v)Pf(v)vw(F) := \prod_{v \ne r} \pi_{f(v)}P_{f(v)v} denotes the tree weight of FF and Fr\mathcal{F}_r denotes all diverging spanning arborescences rooted at rr. For simple random walk on a connected undirected graph with equal edge weights, (1.1) is the uniform tree law. For a general irreducible chain started at a fixed state, (1.1) is the extended Aldous-Broder theorem established in [11] and [9].

The classical proofs [1, 4] identify the distribution of the last-exit tree of a stationary walk and then use time reversal to obtain the first-entrance tree law. A weighted reversible version is given in [17]. For general irreducible chains, [11] conditions on the number of traversals of each directed edge. Given these counts, the walk corresponds to a uniformly sampled Eulerian path in a directed multigraph. The BEST theorem gives the conditional tree probabilities, and the limiting transition frequencies yield the tree weights in (1.1). [9] gives both an adaptation of the stationary argument and a combinatorial proof that decomposes an encoding of the walk into golf sequences and heaps of cycles.

However, none of the existing proofs take the direct route by evaluating the summation of the joint probabilities of the tree and its compatible growth orders over the orders in which the vertices are discovered. Indeed, in [9], the difficulty of such evaluation is discussed. In this paper, we pursue this calculation using basic algebraic tools.

To make this difficulty precise, let τ(X)\tau(X) be the order in which the nodes other than rr are discovered. For an ordering τ=(τ1,…,τn−1)\tau= (\tau_1,\ldots,\tau_{n-1}), define B0={r}B_0 = \{r\} and Bℓ=Bℓ−1∪{τℓ}B_\ell= B_{\ell-1} \cup\{\tau_\ell\} for ℓ=1,…,n−1\ell= 1,\ldots,n-1. For a fixed tree F0={(f(v),v)}F_0 = \{(f(v),v)\}, if f(τℓ)∈Bℓ−1f(\tau_\ell) \in B_{\ell-1} for every ℓ=1,…,n−1\ell= 1,\ldots,n-1, then the discovery order τ\tau is “compatible” with F0F_0, and we have the factorization (Proposition 3.4)

P(F=F0, τ(X)=τ)∝w(F0)⋅ωf(τ),(2)\mathbb{P}(F = F_0,\ \tau(X) = \tau) \propto w(F_0)\cdot\omega_f(\tau), \tag*{(2)}

where ωf(τ)\omega_f(\tau) is the order weight that depends both on ff and τ\tau. The proportionality constant is independent of both F0F_0 and τ\tau. Summing (1.2) over the compatible orders gives the probability of F0F_0. Since the tree weight w(F0)w(F_0) does not depend on the order, it remains to sum the order weights. In particular, the tree law follows once we establish, for each fixed tree,

∑τ:τ compatible with F0ωf(τ)=1.\sum_{\tau:\tau\ \mathrm{compatible\ with}\ F_0} \omega_f(\tau) = 1.

For different trees, both the number of compatible orders and their weights ωf(τ)\omega_f(\tau) can differ substantially, so directly evaluating the summation is not trivial.

To evaluate this sum, we group the compatible orders according to their first discovered vertex. Once this vertex is treated as an additional root, the remaining vertices form a smaller problem of the same kind. This observation motivates us to study rooted forests, even though our original question concerns a single tree. We establish an identity that expresses the sum of order weights associated with each root as a principal cofactor of a matrix indexed by the roots. The proof proceeds by induction on the number of nonroot vertices, using a cofactor relation to connect successive steps.

We call this result the order-mass identity. For a single root, the identity gives the required sum of one and hence a direct proof of the Aldous-Broder theorem. More generally, the sum depends on which vertices belong to each root’s tree, but not on the edges within those trees. Thus, forests with the same root components have the same order masses, even though their compatible orders and individual order weights may differ.

With several roots, the identity also answers our second question. The stopped covering walk samples each forest with probability proportional to its forest weight multiplied by a completion weight, which measures the total weight of the edges that can complete it to a tree rooted at the seed. This extra factor explains why the stopped walk does not generally sample the weight-proportional forest law. It also determines whether importance weighting can recover the target law, since forests with zero completion weight are never sampled.

The article makes four contributions.

  1. We establish the order-mass identity in Theorem 4.4 under a nonsingularity condition involving only the bases along the growth orders of the given forest and prove it using linear algebraic tools.

  1. For a single root, we use the identity to give a direct proof of the extended Aldous-Broder theorem in Theorem 6.1 and derive the conditional distribution of the discovery order in Theorem 6.2.

  1. For multiple roots, we derive the forest law produced by the stopped covering walk in Theorem 6.5, making explicit how it differs from the weight-proportional forest law.

  1. We formalize the order-mass identity, the Aldous-Broder theorem, and the stopped-walk law in Lean 4.

The remainder of the article follows the calculation. § 2 introduces harmonic extensions and growth orders. § 3 gives the joint probability decomposition, § 4 and § 5 establish the order-mass identity, and § 6 derives its sampling consequences. § 7 gives a numerical illustration. Appendix § 11 contains the auxiliary proofs. The supplementary materials contain worked examples, further algebraic and combinatorial results, formalization details, and the full numerical study.

Preliminaries

To express the discovery-order probabilities, we need harmonic extensions on the sets visited by the walk and orders compatible with a fixed forest. We introduce these objects in an algebraic and combinatorial setting, together with the cofactor identities used to evaluate the resulting sum.

Notations and linear algebraic results

Throughout, VV is a set of n≥2n \ge2 vertices, and Uc:=V∖UU^{c} := V \setminus U for U⊆VU \subseteq V. We use u,v,wu,v,w for vertices and rr for a root. For a matrix AA, we write A.vA_{.v} for its column vv, Au.A_{u.} for its row uu, A[U]A[U] for the principal submatrix on the rows and columns in UU, A[R,C]A[R,C] for the submatrix on the rows RR and the columns CC, and adj⁡(A)\operatorname{adj}(A) for the adjugate of a square matrix, the transpose of its cofactor matrix. Matrices and vectors are indexed by sets of vertices. For example, if U={1,2}U = \{1,2\} and V={1,2,3}V = \{1,2,3\}, a matrix A∈RU×UcA \in\mathbb{R}^{U \times U^{c}} has one column, indexed by 33, so A.3A_{.3} denotes that column. The principal cofactor of A∈RU×UA \in\mathbb{R}^{U \times U} at u∈Uu \in U is det⁡(A[U∖{u}])\det(A[U \setminus\{u\}]). We use eve_v for the standard basis vectors, 1\mathbf{1} for the all-ones vector and 0\mathbf{0} for the zero vector. We write x∣Ux|_U for the restriction of a vector xx to UU, and we read a vector given on a subset of VV as a vector on VV with the missing entries 00 when the context requires it. For a statement EE, we use the indicator function

1(E):={1,if E holds,0,otherwise.\mathbf{1}(E) := \begin{cases} 1, & \text{if } E \text{ holds},\\ 0, & \text{otherwise}. \end{cases}

We use three classical facts about determinants [10]: for A∈RU×UA \in\mathbb{R}^{U \times U} and a,c∈RUa,c \in\mathbb{R}^U,

Aadj⁡(A)=adj⁡(A)A=det⁡(A)I,det⁡(I+acT)=1+cTa,det⁡(A with column v replaced by a)=∑uauadj⁡(A)vu.(3)\begin{aligned} A\operatorname{adj}(A) &= \operatorname{adj}(A)A = \det(A)I,\qquad \det(I + ac^{\mathsf T}) = 1 + c^{\mathsf T}a,\\ \det(A\text{ with column }v\text{ replaced by }a) &= \sum_u a_u\operatorname{adj}(A)_{vu}. \tag*{(3)} \end{aligned}

The following lemma expresses the adjugate of a matrix with zero row sums through its principal cofactors and uses them to evaluate a rank-one perturbation. These relations will be used to compare cofactors when the root set is enlarged.

Lemma 2.1 (Cofactors of a matrix with zero row sums). Let SS be a nonempty finite set, let A∈RS×SA \in\mathbb{R}^{S \times S} satisfy A1=0A\mathbf{1} = \mathbf{0}, and let d∈RSd \in\mathbb{R}^S be its vector of principal cofactors, du:=det⁡(A[S∖{u}])d_u := \det(A[S \setminus\{u\}]). Then

(a) adj⁡(A)=1dT\operatorname{adj}(A) = \mathbf{1}d^{\mathsf T} and dTA=0Td^{\mathsf T}A = \mathbf{0}^{\mathsf T};

(b) det⁡(A+acT)=(cT1)(aTd)\det(A + ac^{\mathsf T}) = (c^{\mathsf T}\mathbf{1})(a^{\mathsf T}d) for all a,c∈RSa,c \in\mathbb{R}^S.

Harmonic extensions

Suppose that values are given on the complement of UU. A harmonic extension fills in the values on UU so that the corresponding rows of LL annihilate the resulting vector.

Definition 2.2 (Harmonic extension). Let L∈RV×VL \in\mathbb{R}^{V \times V}, let U⊊VU \subsetneq V with det⁡L[U]≠0\det L[U] \ne0, and let m∈RUcm \in\mathbb{R}^{U^c}. We call the matrix Γ~U∈RV×Uc\widetilde{\Gamma}^{U} \in\mathbb{R}^{V \times U^c} with the rows

Γ~U[U,Uc]:=−L[U]−1L[U,Uc],Γ~U[Uc,Uc]:=I∣Uc∣\widetilde{\Gamma}^{U}[U,U^c] := -L[U]^{-1}L[U,U^c],\qquad \widetilde{\Gamma}^{U}[U^c,U^c] := I_{|U^c|}

the harmonic extension map, and γU(m):=Γ~Um∈RV\gamma^U(m) := \widetilde{\Gamma}^{U}m \in\mathbb{R}^V the harmonic extension of mm into UU. In particular, Γ~∅=I\widetilde{\Gamma}^{\varnothing} = I and γ∅(m)=m\gamma^{\varnothing}(m) = m.

The following lemma shows that the prescribed values outside UU and the equations (Lx)∣U=0(Lx)|_U = 0 uniquely determine the extension.

Lemma 2.3. Let L∈RV×VL \in\mathbb{R}^{V \times V}, let U⊊VU \subsetneq V with det⁡L[U]≠0\det L[U] \ne0, and let m∈RUcm \in\mathbb{R}^{U^c}. For x∈RVx \in\mathbb{R}^V,

x∣Uc=mand(Lx)∣U=0⟺x=γU(m).x|_{U^c} = m \quad\text{and} \quad(Lx)|_U = 0 \qquad\Longleftrightarrow\qquad x = \gamma^U(m).

Proof. We have (Lx)∣U=L[U]x∣U+L[U,Uc]x∣Uc(Lx)|_U = L[U]x|_U + L[U,U^c]x|_{U^c}. Hence, given x∣Uc=mx|_{U^c} = m, the condition (Lx)∣U=0(Lx)|_U = 0 holds if and only if x∣U=−L[U]−1L[U,Uc]mx|_U = -L[U]^{-1}L[U,U^c]m, that is, if and only if x=Γ~Umx = \widetilde{\Gamma}^{U}m. This completes the proof.

The map m↦γU(m)=Γ~Umm \mapsto\gamma^{U}(m) = \widetilde{\Gamma}^{U}m is linear. Each column has a simple interpretation: for v∈Ucv \in U^{c}, the vector γU(ev)\gamma^{U}(e_v) equals 1 at vv and 0 at the other vertices outside UU. Its restriction to UU solves the Dirichlet problem with these boundary values. If L1=0L\mathbf{1}=0, then 1\mathbf{1} is annihilated by every row of LL and equals 1 off UU. Hence, by uniqueness,

References

  1. [1]David J. Aldous. The random walk construction of uniform spanning trees and uniform labelled trees. SIAM Journal on Discrete Mathematics, 3(4):450–465, 1990. doi: 10.1137/0403039.DOI
  2. [2]Venkat Anantharam and Pantelis Tsoucas. A proof of the Markov chain tree theorem. Statistics & Probability Letters, 8(2):189–192, 1989. doi: 10.1016/0167-7152(89)90016-3.DOI
  3. [3]Luca Avena and Alexandre Gaudillière. Two applications of random spanning forests. Journal of Theoretical Probability, 31(4):1975–2004, 2018. doi: 10.1007/s10959-017-0771-3.DOI
  4. [4]Andrei Z. Broder. Generating random spanning trees. In Proceedings of the 30th Annual Symposium on Foundations of Computer Science (FOCS), pages 442–447. IEEE, 1989. doi: 10.1109/SFCS.1989.63516.DOI
  5. [5]Seth Chaiken. A combinatorial proof of the all minors matrix tree theorem. SIAM Journal on Algebraic and Discrete Methods, 3(3):319–329, 1982. doi: 10.1137/0603033.DOI
  6. [6]Leonardo de Moura and Sebastian Ullrich. The Lean 4 theorem prover and programming language. In Automated Deduction – CADE 28, volume 12699 of Lecture Notes in Computer Science, pages 625–635. Springer, 2021. doi: 10.1007/978-3-030-79876-5_37.DOI
  7. [7]Leo L. Duan and Arkaprava Roy. Spectral clustering, Bayesian spanning forest, and forest process. Journal of the American Statistical Association, 119(547):2140–2153, 2024. doi: 10.1080/01621459.2023.2250098.DOI
  8. [8]Sergey Fomin. Loop-erased walks and total positivity. Transactions of the American Mathematical Society, 353(9):3563–3583, 2001. doi: 10.1090/S0002-9947-01-02824-0.DOI
  9. [9]Luis Fredes and Jean-François Marckert. A combinatorial proof of the Aldous–Broder theorem for general Markov chains. Random Structures & Algorithms, 62(2):430–449, 2023. doi: 10.1002/rsa.21101.DOI
  10. [10]Roger A. Horn and Charles R. Johnson. Matrix Analysis. Cambridge University Press, Cambridge, 2nd edition, 2013. doi: 10.1017/CBO9781139020411.DOI
  11. [11]Yiping Hu, Russell Lyons, and Pengfei Tang. A reverse Aldous–Broder algorithm. Annales de l’Institut Henri Poincaré, Probabilités et Statistiques, 57(2):890–900, 2021. doi: 10.1214/20-AIHP1101.DOI
  12. [12]Alex Kruckman, Amy Greenwald, and John Wicks. An elementary proof of the Markov chain tree theorem. Technical Report CS-10-04, Brown University, Department of Computer Science, 2010.
  13. [13]Frank Thomson Leighton and Ronald L. Rivest. Estimating a probability using finite memory. IEEE Transactions on Information Theory, 32(6):733–742, 1986. doi: 10.1109/TIT.1986.1057250.DOI
  14. [14]David A. Levin and Yuval Peres. Markov Chains and Mixing Times. American Mathematical Society, Providence, RI, 2nd edition, 2017. doi: 10.1090/mbk/107.DOI
  15. [15]R. Duncan Luce. Individual Choice Behavior: A Theoretical Analysis. Wiley, New York, 1959.
  16. [16]Zhao Tang Luo, Huiyan Sang, and Bani Mallick. A Bayesian contiguous partitioning method for learning clustered latent variables. Journal of Machine Learning Research, 22(37):1–52, 2021. URL https://jmlr.org/papers/v22/20-136.html.
  17. [17]Russell Lyons and Yuval Peres. Probability on Trees and Networks, volume 42 of Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge University Press, Cambridge, 2016. doi: 10.1017/9781316672815.DOI
  18. [18]Philippe Marchal. Loop-erased random walks, spanning trees and Hamiltonian cycles. Electronic Communications in Probability, 5:39–50, 2000. doi: 10.1214/ECP.v5-1016.DOI
  19. [19]Igor Nunes, Giulio Iacobelli, and Daniel Ratton Figueiredo. A transient equivalence between Aldous–Broder and Wilson’s algorithms and a two-stage framework for generating uniform spanning trees. Discrete Mathematics, 348(2), 2025. doi: 10.1016/j.disc.2024.114285. Art. 114285.DOI
  20. [20]Yusuf Yiğit Pilavcı, Pierre-Olivier Amblard, Simon Barthéléme, and Nicolas Tremblay. Graph Tikhonov regularization and interpolation via random spanning forests. IEEE Transactions on Signal and Information Processing over Networks, 7:359–374, 2021. doi: 10.1109/TSIPN.2021.3084879.DOI
  21. [21]Jim Pitman and Wenpin Tang. Tree formulas, mean first passage times and Kemeny’s constant of a Markov chain. Bernoulli, 24(3):1942–1972, 2018. doi: 10.3150/16-BEJ916.DOI
  22. [22]R. L. Plackett. The analysis of permutations. Journal of the Royal Statistical Society. Series C (Applied Statistics), 24(2):193–202, 1975. doi: 10.2307/2345657.DOI
  23. [23]Piotr Pokarowski. Directed forests with application to algorithms related to Markov chains. Applicaciones Mathematicae, 26(4):395–414, 1999. doi: 10.4064/am-26-4-395-414.DOI
  24. [24]James G. Propp and David B. Wilson. How to get a perfectly random sample from a generic Markov chain and generate a random spanning tree of a directed graph. Journal of Algorithms, 27(2):170–217, 1998. doi: 10.1006/jagm.1997.0917.DOI
  25. [25]Edric Tam, David B. Dunson, and Leo L. Duan. Exact sampling of spanning trees via fast-forwarded random walks. Biometrika, 112(2), 2025. doi: 10.1093/biomet/asaf031. Art. asaf031.DOI
  26. [26]The mathlib Community. The Lean mathematical library. In Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs, pages 367–381. ACM, 2020. doi: 10.1145/3372885.3373824.
  27. [27]William T. Tutte. The dissection of equilateral triangles into equilateral triangles. Proceedings of the Cambridge Philosophical Society, 44(4):463–482, 1948. doi: 10.1017/S030500410002449X.DOI
  28. [28]Alexander D. Ventsel’ and Mark I. Freidlin. On small random perturbations of dynamical systems. Russian Mathematical Surveys, 25(1):1–55, 1970. doi: 10.1070/RM1970v025n01ABEH001254. Translated from Uspekhi Mat. Nauk, 25 (1970), pp. 3–55.DOI
  29. [29]David B. Wilson. Generating random spanning trees more quickly than the cover time. In Proceedings of the 28th Annual ACM Symposium on Theory of Computing (STOC), pages 296–303. ACM, 1996. doi: 10.1145/237814.237880.DOI

Paper details

vlnc:W_3x5a5zrt
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC0-1.0
Usage

views · 11

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Mathematics

Generative-AI tools

View statement
Looking for related papers…
Contents