
This post is devoted to the Gustav Kirchhoff formula which expresses the invariant measure of an irreducible finite Markov chain in terms of spanning trees. Many of us have already encountered the name of Gustav Kirchhoff in Physics classes when studying electricity.
Let X=(Xt)t≥0 be a continuous time Markov chain with finite state space V={1,…,n}, and with infinitesimal generator or Q-matrix Q, meaning that
Qi,j=∂t=0+P(Xt=j|X0=i),P(Xt=j|X0=i)=(etQ)i,j.
The off-diagonal entries of Q are non-negative and the rows of Q have zero sum:
∀i,j∈V,i≠j,Qi,j≥0,Qi,i=−∑k≠iQi,k.
The skeleton graph G=(V,E) of Q is the oriented graph defined by
(i,j)∈EiffQi,j>0.
Let us assume that Q is irreducible, which means that G is connected. The Perron-Frobenius theorem states then that there exists a unique invariant probability measure, in other words ker(Q⊤) contains up to scaling a unique vector with positive coordinates. We will provide an explicit formula for it!
Since the sum of the columns of Q is zero, it follows that for every i,j∈V,
(cof(−Q))i,j:=(−1)i+jdet(−Q(i,j))=det(−Q(i,i))=:μi.
In other words the cofactors matrix of −Q has constant rows (identical columns). Now by expanding the determinant along an arbitrary column j∈V we get
0=det(−Q)=−n∑i=1Qi,j(−1)i+jdet(−Q(i,j))=−∑i∈VQi,jμi
which shows that the vector (μi)i∈V is invariant for Q. The fact that (μi)i∈V has positive coordinates follows from the Kirchhoff formula
μi:=det(−Q(i,i))=∑T∈Ti∏(j,k)∈TQj,k
where the sum runs over the set Ti of spanning trees of G rooted at i. Recall that a spanning tree or covering tree of G rooted at i∈V is a sub-graph of G with edge set V which is a tree rooted at i. Note that Ti is non-empty since G is connected. Note that T1,…,Tn do not have necessarily the same cardinal due to the fact that the edges are oriented: a covering tree rooted at i contains any j as a vertex but not necessarily as a possible root due to the arrows.
To prove the Kirchhoff formula, one can first label from 1 to m=|E| the edges of G, and define an n×m matrix L called the incidence matrix as follows: if (i,j) is the k-th edge of G then Li,k=Q1/2i,j, Lj,k=−Q1/2i,j, and L⋅,k=0 otherwise. Now
−Q=LL⊤.
We also have Q(i,i)=L(i)(L(i))⊤. Next we use the Cauchy-Binet formula
det(−Q(i,i))=∑sdet(L(i,s))2
where s runs over the subsets of cardinality m−(n−1). Every s specifies n−1 edges of G. It can then be shown that these edges induce a spanning tree iif det(L(i,s))≠0.
Random walk. Suppose now that Qi,j∈{0,1} for every i,j∈V with i≠j. Then X is the nearest neighbors random walk on G, the diagonal of −Q is formed by the degree sequence of G, and Q is the Laplacian ΔG of G. In this case Qj,k=1 for every (j,k)∈G and thus the Kirchhoff formula above boils down to
∀i∈V,μi=|Ti|.
Suppose now that Q is additionally symmetric, meaning that G is not oriented in the sense that (j,k)∈E iff (k,j)∈E. In this case the invariant probability measure of Q is then the uniform law on V. Due to the absence of orientation, the sets T1,…,Tn have the same cardinal κ, which is the number of spanning trees of G (without rooting). We have
∀i,j∈V,μi=(cof(−Q))i,j=(−1)i+jdet(−Q(i,j))=|T|i=κ.
In other words the cofactors matrix of the Laplacian of a non-oriented graph has constant entries equal to the number of spanning trees of the graph.
Let us connect κ with the eigenvalues of the the symmetric matrix −Q, numbered as
0=λ1<λ2≤⋯≤λn.
Here λ1 is simple since Q is irreducible. The characteristic polynomial of −Q is
P−Q(x)=det(xIn+Q)=x(x−λ2)⋯(x−λn).
By looking at the coefficient of x in this polynomial we get (Jacobi formula)
(−1)n−1λ2⋯λn=(−1)n−1Tr(cof(−Q))
which gives finally the remarkable Kirchhoff formula
λ2⋯λn=nκ.
(note that the left hand side is thus necessarily an integer!). Let us show how to recover from this formula the so-called Cayley formula which states that the complete graph Kn possesses nn−2 covering trees. In this case G=Kn and −Q=nI−J where J is the n×n matrix full of 1. The matrix −J has rank 1, its eigenvalues are 0 with multiplicity n−1 and −n with multiplicity 1, and thus it follows that the eigenvalues of −Q are 0 with multiplicity 1 and n with multiplicity n−1. Hence λ2=⋯=λn=n and finally κ=nn−2.
Wilson algorithm. David Wilson invented an exact algorithm to generate a spanning tree of G which follows the uniform distribution on the set of spanning trees of G. Starting from vertex 1, the algorithm consists in setting A1={1}, and to simulate a path of the simple random walk on G started from vertex 2 until it reaches A1. Then A2 is the union of A1 and of the loop erased version of this path. If A2=V, the algorithm is stopped. If not, then we redo the same starting this time the path from smallest vertex not in A2, stopping the path when it reaches A2, and so on. The Wilson algorithm can be naturally related to the Green function of the random walk on G with Dirichlet boundary conditions on a subset of V.
Markov matrix tree theorem. The Kirchhoff formula provides an exact and non-asymptotic formula for the invariant probability measure of a finite Markov chain (this is sometimes referred to as the Kirchhoff Markov matrix tree theorem). This is remarkable, and constitutes an alternative to the asymptotic formula
∀i,j∈V,μj=(limm→∞1mm−1∑k=0ekQ)i,j.
Further reading.
- Lyons and Peres, Probability on trees and networks (chapter 4)
- Leighton and Rivest, Estimating a probability using finite memory
- Anantharam and Tsoucas, A proof of the Markov chain tree theorem
- Biane, Polynomials associated with finite Markov chains
- Biane and Chapuy, Laplacian Matrices and Spanning Trees of Tree Graphs
- Rosenthal - A note on Kirchhoff formula and Wilson algorithm
- Harris and Hirst and Mossinghoff, Combinatorics and graph theory
Pas entièrement satisfait par cet intéressant texte. En effet la positivité des Qij ne joue aucun rôle dans la formule
cofacteur de −Q=∑TDT quand la somme est prise sur tous les arbres d'ensemble d'arêtes T et de sommets {1,…,n} et les DT=∏i,j∈T,i<jqij. Pourtant tu utilises la positivité dans la démonstration où apparaissent des √qij (heu, je suppose Q symétrique, et naturellement qii=−∑j≠iqij). Bref, on souhaite une démonstration plus algébrique.