A Note on Kirchhoffs Formula and Wilsons Algorithm

6
A note on Kirchho’s formula and Wilson’s algorithm Ron Rosenthal Based on a basic notion lecture given on 2.5.2013 by Shlomo Sterenbrg May 6, 2013 1 Introduction The goal of this note is to give a relatively simple proof to Kircho’s formula and the Theorem beyong Wilson’s algorithm (To be state d belo w). Let  G = (V, E )  be a nite conn ected graph. a spanning tree in  G  is a sub-graph H  = ( V H ,E H ) ⊂ G  such that  H  is a tree and  V H  = V . Denote by  κ  = κ (G)  the number of spanning trees of  G. To each graph  G  as above we can associate an operator  ∆ :  C  (V )  → C  (V )  given by f  (v) = de g (v) f  (v) wv f  (w) , where w  ∼  v  means that  w  is a neighbor of  v , i.e.  {v, w}  E . If  f  is a constant function then  ∆f  = 0 and therefore zero is always an eigenvalue of the Laplacian. Since we assumed that  G  is a connected graph the constant functions are the only eigenf uncti ons with eige nv alue zero. Since  ∆ is also self adjoi nt positiv e semi -den ite. Thus we can write the eigenvalues of  ∆  as a sequence 0 =  λ 1  < λ 2  ≤  λ 3  ≤  ... ≤ λ n , where  | V |  = n. We are now ready to state Kircho’s formula Theorem 1.1  (Kircho’s formula) .  For every nite connected graph  G κ =  1 n n i=2 λ i . Next we turn to dene Loop Erased Random Walks (LERW). Given a nite graph  G  = (V, E )  and a path  γ  = (v 1 , v 2 ,...,v m )  of a random walk in it we dene the loop erasure of  γ  is a new simple path created by erasing all the loops of  γ  in the chronological order. Formally , we dene  i 1  = 1 and inductively i j+1  = max {i ≤ n  :  γ (i) =  γ (i j )}+ 1  (if the  max  is over an empty set we dene  i j+1  = n  and stop the process) . Then the loop erased vers ion of  γ , denoted by LE (γ ), is the path  ( γ (i 1 ) , γ (i 2 ) ,..., γ (i J )), where  J  is the last index in the induction process. Wilso n’s algorith m suggest a method to const ruct a spann ing tree in any nite connecte d graph. Wilson’s algorithm Fix some ordering of the vertices  V  = {v 1 , v 2 ,...,v n }. 1. Deno te  A 1  =  {v 1 }  and take a path  γ 1  of simple random walk starting from  v 2  until it hits  A 1 . 2. Dene  A 2  =  A 1  ∪ LE (γ 1 ). 3. If   A 2  =  V  the algorithm is nished. Otherwise, take a path  γ 2  of simple random walk starting from the vertex with the minimal index in  V \A 2  until it hits  A 2 . 4. Dene  A 3  =  A 2  ∪ LE (γ 2 ). 5. Contin ue inductively until all vertices are visited. 1

Transcript of A Note on Kirchhoffs Formula and Wilsons Algorithm

8/14/2019 A Note on Kirchhoffs Formula and Wilsons Algorithm

http://slidepdf.com/reader/full/a-note-on-kirchhoffs-formula-and-wilsons-algorithm 1/6

A note on Kirchhoff’s formula and Wilson’s algorithm

Ron Rosenthal

Based on a basic notion lecture given on 2.5.2013 by Shlomo Sterenbrg

May 6, 2013

1 Introduction

The goal of this note is to give a relatively simple proof to Kirchoff’s formula and the Theorem beyong Wilson’salgorithm (To be stated below). Let G = ( V, E ) be a nite connected graph. a spanning tree in G is a sub-graphH = ( V H , E H ) ⊂ G such that H is a tree and V H = V . Denote by κ = κ (G) the number of spanning trees of G.

To each graph G as above we can associate an operator ∆ : C (V ) → C (V ) given by

∆ f (v) = deg ( v) f (v) −w∼v

f (w) ,

where w ∼ v means that w is a neighbor of v, i.e. {v, w} ∈ E . If f is a constant function then ∆ f = 0 and thereforezero is always an eigenvalue of the Laplacian. Since we assumed that G is a connected graph the constant functionsare the only eigenfunctions with eigenvalue zero. Since ∆ is also self adjoint positive semi-denite. Thus we canwrite the eigenvalues of ∆ as a sequence

0 = λ1 < λ 2 ≤ λ3 ≤ . . . ≤ λn ,

where |V | = n.We are now ready to state Kirchoff’s formula

Theorem 1.1 (Kirchoff’s formula) . For every nite connected graph G

κ = 1n

n

i =2

λ i .

Next we turn to dene Loop Erased Random Walks (LERW). Given a nite graph G = ( V, E ) and a path γ =(v1 , v2 , . . . , vm ) of a random walk in it we dene the loop erasure of γ is a new simple path created by erasing all theloops of γ in the chronological order. Formally, we dene i1 = 1 and inductively ij +1 = max {i ≤ n : γ (i) = γ (i j )}+1 (if the max is over an empty set we dene ij +1 = n and stop the process). Then the loop erased version of γ ,denoted by LE (γ ), is the path (γ (i1) , γ (i2) , . . . , γ (iJ )) , where J is the last index in the induction process.

Wilson’s algorithm suggest a method to construct a spanning tree in any nite connected graph.

Wilson’s algorithm

Fix some ordering of the vertices V = {v1 , v2 , . . . , vn }.

1. Denote A1 = {v1} and take a path γ 1 of simple random walk starting from v2 until it hits A1 .

2. Dene A2 = A1 ∪LE (γ 1).

3. If A2 = V the algorithm is nished. Otherwise, take a path γ 2 of simple random walk starting from the vertexwith the minimal index in V \ A2 until it hits A2 .

4. Dene A3 = A2 ∪LE (γ 2).

5. Continue inductively until all vertices are visited.

1

8/14/2019 A Note on Kirchhoffs Formula and Wilsons Algorithm

http://slidepdf.com/reader/full/a-note-on-kirchhoffs-formula-and-wilsons-algorithm 2/6

Not that the resulting graph is a spanning tree in G.

The following theorem is the main result regarding the algorithm:

Theorem 1.2 (Wilson’s algorithm) . The random spanning tree constructed by the algorithm is uniformly distributed among all spanning trees of G.

2 Proof details

2.1 Simple result from linear algebra

Claim 2.1. Let M be an n × n matrix and (i1 , i2 , . . . , i n ) any ordering of the number 1, 2, . . . , n . Denote M (0) = M

and for 1 ≤ j ≤ n − 1 let M ( j ) be the matrix obtained from M by removing the ithk

j

k =1rows and columns. Keep

the indexed names as in the original matrix M , e.g., after removing the ith1 row and column and assuming thati2 > i 1 , the row that was originally the ith2 row and now is the (i2 − 1)th one is still called the ith2 row. Then

1det M

=n − 1

j =0M − 1

( j ) i j +1 ,i j +1

.

Remark 2.2. Note that the result is independent of the order of the indexes removed. This fact will play a crucialrule in the future and is the reason that the order in which we erase loops in LERW is not important.

Example 2.3. The case n = 2 . Let M = a bc d . Using the order i1 = 1 , i2 = 2 we get

1

j =0

M − 1( j ) i j +1 ,i j +1

= M − 1(0) i 1 ,i 1

· M − 1(1) i 2 ,i 2

= M − 11,1 · d− 1 =

dad − bc

· 1d

= 1

ad − bc =

1det M

.

Proof. The proof follows by induction. The case n = 1 is immediate. Assume that this holds for n − 1 and let M be an n × n matrix. Applying the induction assumption for the (n − 1) × (n − 1) matrix M (1) we get that

n

j =1M − 1

( j ) i j +1 ,i j +1

= 1

det M (1).

Consequently, using the fact that A− 1i,i = 1

det A (adj A)i,i = 1det A · det A( i ) , it follows that

n

j =0

M − 1( j ) i j +1 ,i j +1

=M − 1

(0) i 1 ,i 1

det M (1)=

1det M (1)

· det M (1)

det M =

1det M

as required.

2.2 Markov chains with sinksBefore we can turn to the proofs of Theorems 1.1 and 1.2 we turn to discuss the model of nite Markov chains withsinks.

Denition 2.4. Let A be a nite set. A homogenous Markov chain M on the state space A is dened by a matrixM = ( M i,j )i,j ∈A such that M i,j ≥ 0 for every i, j ∈ A and j ∈A M i,j = 1 for every i ∈ A. The Markov chain isthen a stochastic process {X k }k ≥ 1 dened by the transition law

P (X k +1 = j |X k = i) = M ij .

If we will specify the initial distribution P (X 0 = i) = πi (which we will usually take to be just the indicator of somei0 ∈ A), this denes the process completely.

2

8/14/2019 A Note on Kirchhoffs Formula and Wilsons Algorithm

http://slidepdf.com/reader/full/a-note-on-kirchhoffs-formula-and-wilsons-algorithm 3/6

Denition 2.5. Let M = ( M ij )i,j ∈A be a homogenous Markov chain on the nite state space A.

1. We say that a point i ∈ A is a sink of the Markov chain if M ii = 1 . This immediately implies that M ij = 0for every j = i. We denote by ∂A the set of sinks of the Markov chain M .

2. The Markov chain is called sink irreducible if for every i ∈ A which there exist a sink j ∈ A and k ∈ N suchthat P (X k = j |X 0 = i) > 0, i.e., We can get from every state in A to one of the Markov sinks in a nite time.

From now on assume that our Markov chain as at least one sink and that it is sink irreducible. Given such aMarkov chain, up to a permutation, we can write the Matrix associate with M as

M = I 0R Q ,

where I is the |∂A | × | ∂A | identity matrix.Next we claim that the Matrix I − Q is invertible and that its inverse is given by

∞k =0 Qk . This will follows

once we show that Q < 1 .Denote G = ( I − Q)− 1 . The Matrix G is the green function of the Markov chain and for i, j ∈ A\ ∂A we have

G i,j = E number of visits to j startingat i before hitting ∂A .

Indeed, denoting T i,j = E number of visits to j startingat i before hitting ∂A and using the denition of the Markov chain we get

E number of visits to j startingat i before hitting ∂A = δ i,j +

k∈A \ ∂A

Q i,k E number of visits to j startingat i before hitting ∂A .

In matrix form this givesT = I + QT

and thereforeT = ( I − Q)− 1 = G .

2.3 Generalized Wilson’s algorithm

Let M be a Markov chain on the nite state space A as dened in subsection 2.2. The generalized Wilson algorithmis dened as follows:

1. Denote A0 = ∂A.

2. Assume now that the set Aj is dened and A\ Aj = ∅. Fix some v ∈ A\ Aj and sample a path γ j of looperased random walk (with transition given by the Markov chain M ) from v until it hits A j .

3. Denote A j +1 = A j ∪γ j (including all edges the path passed through).

4. If A j +1 = A the algorithm is complete. Otherwise return to step 2 with j replaced by j + 1 .

Remark 2.6.

1. Note that unlike the original Wilson’s algorithm the resulting graph is not necessarily connected. In thegeneral case the resulting graph is a spanning forest.

2. The last algorithm also denes an ordering on the vertices in A\ ∂A as follows: Denote γ j = yj1 , . . . , y j

| γ j |− 1 , yj| γ j | ,

where |γ j | is the length of γ j (recall that the last vertex of the path belong to A j ). The ordering is then givenby

y01 , y0

2 , . . . , y0| γ 0 |− 1 , y1

1 , y12 , . . . , y1

| γ 1 |− 1 , . . . , y J 1 , yJ

2 , . . . , y J | γ J |− 1 ,

where J is the index such that A J = A.

3

8/14/2019 A Note on Kirchhoffs Formula and Wilsons Algorithm

http://slidepdf.com/reader/full/a-note-on-kirchhoffs-formula-and-wilsons-algorithm 4/6

Denition 2.7. Given a Markov chain M as above and a spanning forest T of A we dene the probability of theforest as

p (T ) =J

j =1

| γ j |− 1

i =1

M y ji ,y j

i +1.

Remark 2.8. Back to the original Wilson’s Algorithm where A is the set of vertices of the graph G, M is thetransition matrix of simple random walk and ∂A = {v0} for any choice v0 ∈ V , we get that

p (T ) =v ∈ V v = v0

1deg(v)

since the resulting spanning tree as exactly one edge going out from each vertex except the vertex v0 , and theprobability of using this edge is exactly the degree of the origin vertex of the edge.

2.4 Two observations regarding the Laplacian of a graph

Let G be a nite graph and ∆ the Laplace operator on it.Claim 2.9. There exists a constant C such that

adj ∆ = C ·

1 1 · · · · · · 1...

. . . ...

1 . . . 1

... . . .

...1 · · · · · · · · · 1

:= C · J n . (1)

Proof. Recall that zero is an eigenvalue of the Laplacian and that the space of eigenfunction corresponding to zerois the space of constant functions. This implies that

det∆ =n

i =1

λ i = 0

and therefore∆ · adj ∆ = det∆ · I = 0.

The last equation can hold if and only if each column of adj ∆ is constant. In addition the symmetry of ∆ impliesthat adj ∆ is also symmetric and therefore the rows are constant as well. All together this implies that adj ∆ is aconstant matrix.

Claim 2.10. The constant C from Claim 2.9 satisfy

C = 1n

n

i =2

λ i .

Proof. Denote by P (x) = det( xI − ∆) the characteristic polynomial of ∆ . On the one hand, using the observations

from the introduction on the eigenvalues of ∆ is follows that P is of the formP (x) = x (x − λ2) (x − λ3) · · · (x − λn )

and therefore the coefficient of x in the polynomial is exactly (− 1)n − 1 ni =2 λ i . On the other hand, using Jacobi’s

formula, the coefficient of x is also given by

p (x) = ddx

det ( xI − ∆)x =0

= trace adj (xI − ∆) · ddx

(xI − ∆)x =0

= trace (adj (− ∆)) = ( − 1)n − 1 nC.

Comparing the two gives the result.

4

8/14/2019 A Note on Kirchhoffs Formula and Wilsons Algorithm

http://slidepdf.com/reader/full/a-note-on-kirchhoffs-formula-and-wilsons-algorithm 5/6

2.5 Main Lemmas

The proofs of both theorem follows from the following two lemmas.

Lemma 2.11. Let M be a Markov chain on a nite state space A and set of sinks ∂A A. The probability that T is the resulting forest (tree) achieved by the Wilson’s algorithm is

p (T ) · det G

where G is the green function dened in 2.2.Lemma 2.12. For any nite connected graph G = ( V, E ) x a vertex v0 ∈ V and dene M to be the Markov chain achieved by taking a simple random walk and changing the vertex v0 to be a sink. Then

det G = v∈V deg(v)deg(v0)

· 1C

,

where C is some constant to be dened later.

Proof of the main theorems assuming Lemmas 2.11 and 2.12. Using Both Lemmas and Remark 2.8 we get that theprobability that the spanning tree T is the result in Wilson’s algorithm is 1

C = 1n

ni =2 λ i

− 1 . Consequently, thedistribution is uniform and C = κ (G).

Proof. (Proof of Lemma 2.12) Without lose of generality assume that v0 is the the rst row in the matrix of ∆ .Recall that ∆ = D − A , where D is the diagonal degree matrix and A is the adjacency matrix. We denote byD (1) , A(1) and ∆ (1) the 1, 1 minor of D, A and ∆ respectively and by Q . It follows that

I − Q = I − D (1)− 1

A(1) = D (1)− 1

D (1) − A(1) = D (1)− 1

∆ (1) .

Consequently

det( G )− 1 = det ( I − Q) = det D (1)− 1

∆ (1) = det ∆ (1)

det D (1)

=adj (∆) 1,1

det D (1) = C · deg v0

v∈V deg v.

Proof. (Proof of Lemma 2.11) Fix some spanning forest (tree) T in A and assume the ordering of the vertices usedin the algorithm is {v1 , v2 , . . . , vn } . The probability that T is the resulting spanning forest is as follows: Theprocess start with a path from v2 to some xed vertex vj . The probability that this occurs is

γ : v2 → vj , v1 /∈ γ LE (γ ) = {v2 , vj }

P (γ ) ,

where P is the probability of the path w.r.t the law of simple random walk. Each such path can be written as apath the convolution of a closed path from v2 to itself and the path (v2 , vj ). Since the probability of the last pathis exactly 1

deg v 2we can write the probability above as

1deg v2

γ : v2 → v2v1 /∈ γ

P (γ ) = 1deg v2

n =0 γ : v2 → v2v1 /∈ γ , |γ | = n

P (γ )

= 1deg v2

n =0Qn

v 2 ,v 2=

1deg v2

n =0Qn

v 2 ,v 2

= 1deg v2

(I − Q)− 1v 2 ,v 2

= 1deg v2

G v 2 ,v 2

= 1deg v2

G (0) v 2 ,v 2.

5

8/14/2019 A Note on Kirchhoffs Formula and Wilsons Algorithm

http://slidepdf.com/reader/full/a-note-on-kirchhoffs-formula-and-wilsons-algorithm 6/6

Turning to deal with the next part of the forest we know that there is a path from vj to another vertex vk , butnow the vertex cannot use both v1 and v2 . Indeed, if the path have used the vertex v2 this will close an additionalloop around v2 , which contradicts the construction so far. Repeating the last estimation, we get that the probabilityof this event is given by

1deg vj

γ : vj → vj

v1 , v2 /∈ γ

P (γ )

which is the same as before except we think of both v1 and v2 as sinks. Thus the last term is exactly

1deg vj

G (1) v j ,v j,

where G (1) is the Green function for the Markov chain obtained by observing simple random walk with two sinksv1 , v2 . The proof now continues in induction. Multiplying the above probabilities we get that the probability tond the spanning forest T is

v ∈ V v = v0

1deg vj

·n − 1

j =0G ( j ) y j ,y j

with {yj }n − 1j =0 the order in which the vertices are ordered. This equals due to Claim 2.1

v∈V deg vdeg v0

· 1

det( G − 1) = v∈V deg v

deg v0· det( G )

as required.

6