Loading [MathJax]/jax/output/CommonHTML/jax.js
Press "Enter" to skip to content

Kirchhoff determinant and Markov chain tree

Gustav Robert Kirchhoff
Gustav Robert Kirchhoff (1824 - 1887)

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)t0 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,jV,ij,Qi,j0,Qi,i=kiQi,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,jV,

(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 jV we get

0=det(Q)=ni=1Qi,j(1)i+jdet(Q(i,j))=iVQi,jμi

which shows that the vector (μi)iV is invariant for Q. The fact that (μi)iV has positive coordinates follows from the Kirchhoff formula

μi:=det(Q(i,i))=TTi(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 iV 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(n1). Every s specifies n1 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,jV with ij. 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

iV,μ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,jV,μ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

PQ(x)=det(xIn+Q)=x(xλ2)(xλn).

By looking at the coefficient of x in this polynomial we get (Jacobi formula)

(1)n1λ2λn=(1)n1Tr(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 nn2 covering trees. In this case G=Kn and Q=nIJ where J is the n×n matrix full of 1. The matrix J has rank 1, its eigenvalues are 0 with multiplicity n1 and n with multiplicity 1, and thus it follows that the eigenvalues of Q are 0 with multiplicity 1 and n with multiplicity n1. Hence λ2==λn=n and finally κ=nn2.

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,jV,μj=(limm1mm1k=0ekQ)i,j.

Further reading.

One Comment

  1. Gérard Letac 2015-09-22

    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,jT,i<jqij. Pourtant tu utilises la positivité dans la démonstration où apparaissent des qij (heu, je suppose Q symétrique, et naturellement qii=jiqij). Bref, on souhaite une démonstration plus algébrique.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Syntax · Style · .