Counting the number of spanning tree
Pied Piper Department of Computer Science and Engineering Shanghai Jiao Tong University
Counting the number of spanning tree Pied Piper Department of - - PowerPoint PPT Presentation
Counting the number of spanning tree Pied Piper Department of Computer Science and Engineering Shanghai Jiao Tong University Contents Co Comp mplet lete e Gr Grap aph 1 2 Proof of the Lemma Arbitrary Graph 3 4 Proof with
Pied Piper Department of Computer Science and Engineering Shanghai Jiao Tong University
目录 Contents 1
Co Comp mplet lete e Gr Grap aph
2
Proof of the Lemma
3
Arbitrary Graph
4
Proof with Matrics
Kn : a complete graph with n vertices
Cayley’s formula
vertebrates
De Defini nition ion: Kn : A spanning tree of the complete graph Kn ver erte tebr brate ate : consider a Kn , mark one vertex by a circle, one vertex by a square . : the set of all vertebrates (consider value of n) Ch Chor
A vertebrate on 19 vertices
From each given spanning tree, we can create n2 vertebrates. Therefore the number of all spanning trees equals
Lem emma.
and the set of all mappings of the vertex V to itself.
Since = all mappings of an n-element set to itself = according to the lemma, therefore the number of spanning trees is
Pr Proo
f of the lemm e lemma. a.
St Starts rts fr from
W
Vertices of the chord
3 4 7 8 9 14 15 as they appeared in chord: 8 4 14 9 3 7 15 1st
st st
step ep ---
to the vertex below it in the 2nd line. Vertebrate W 1st step
2nd
nd st
step ep ---
Vertebrate W 2nd step
3rd
rd st
step ep ---
Vertebrate W 3rd step
4th
th st
step ep ---
the components, plus the edges of the graph P. Step 4 --- graph G
the resulting directed graph G, is a graph of a mapping: For each , we set , where there exists an edge { i, j } in G. graph G
Starts from mapping f
A mapping f 1st
st st
step ep --- draw f into a directed graph( may be disjoint ), for each components, there must exists exactly one circle. Proof : For each vertex in a mapping, there is exactly 1 edges going from it. situation A : if there exists 2 or more circles, at least 1 vertex have more than 1 edges going from it, which is not possible in a mapping. Situation B : if the component is acyclic, at least 1 vertex does not have an edge going from it.
2nd
nd st
step ep --- we extract each circle from components, and for the vertices related to the circles, we write them in order of magnitude, and write the vertex it maps below it.
3 4 7 8 9 14 15 Vertices they map to: 8 4 14 9 3 7 15 A mapping f
3 4 7 8 9 14 15 Vertices they map to: 8 4 14 9 3 7 15 3rd
rd st
step ep --- define a undirected graph P P (a path) : with the vertices mentioned in 2nd step, and in order of 2nd line. A mapping f 3rd step
4th
th st
step ep --- we add the rest vertices and edges of the mapping into P, change the direct edges into undirected ones.
目录 Contents 1
Complete Graph
2
Proof of the Lemma
3
Ar Arbi bitr trar ary Gr y Grap aph
4
Proof of the theorem
▪ What’s the number of spanning trees of an arbitrary graph?
▪ Let G be an arbitrary graph with vertices 1, 2, …, n, n >= 2, and with edges 𝑓1, 𝑓2, …, 𝑓𝑛. ▪ We introduce an n*n matrix Q, called the Laplace matrix of the graph G, whose elements 𝑟𝑗𝑘 are determined by the following formula:
Laplace matrix
Laplace matrix
3 1 2 2 Graph G Laplace matrix 1 2 3 4 1 2 3 4
Laplace matrix
3 −1 −1 1 −1 −1 −1 −1 2 −1 −1 2 Graph G Laplace matrix Q 1 2 3 4 1 2 3 4 Ob Obse servat ation ion Th The e su sum m of
the ro e rows s of
the L e Lap aplace ace mat atrix ix is s the zer e zero
ector
▪ Definition
▪ Let 𝑅𝑗𝑘 denote the (n - 1) * (n - 1) matrix arising from the laplace matrix Q by deleting the 𝑗𝑢ℎ row and the 𝑘𝑢ℎ column.
Laplace matrix
▪ Definition
▪ Let 𝑅𝑗𝑘 denote the (n - 1) * (n - 1) matrix arising from the Laplace matrix Q by deleting the 𝑗𝑢ℎ row and the 𝑘𝑢ℎ column.
Laplace matrix
3 −1 −1 1 −1 −1 −1 −1 2 −1 −1 2 1 2 −1 −1 2 3 −1 −1 −1 −1 −1 2 𝑅 𝑅23 𝑅11
▪ Theorem
▪ 𝑈 𝐻 is the number of spanning tree in graph G. ▪ For every graph G, we have 𝑈 𝐻 = det 𝑅11
#Spanning Tree
▪ Theorem ▪ For every graph G, we have 𝑼 𝑯 = 𝐞𝐟𝐮 𝑹𝟐𝟐
▪ 𝐵𝑑𝑢𝑣𝑏𝑚𝑚𝑧, 𝑈 𝐻 = | det 𝑅𝑗𝑘| holds for any 𝑗, 𝑘 ∈ {1, 2, … , 𝑜}. (won’t prove here)
#Spanning Tree
▪ Theorem ▪ For every graph G, we have 𝑼 𝑯 = 𝐞𝐟𝐮 𝑹𝟐𝟐
▪ 𝑈 𝐻 = | det 𝑅𝑗𝑘| holds for any two indices 𝑗, 𝑘 ∈ {1, 2, … , 𝑜}. (won’t prove here)
▪ Take the figure before as an example
#Spanning Tree
#Spanning Tree
#Spanning Tree
#Spanning Tree
3 −1 −1 1 −1 −1 −1 −1 2 −1 −1 2 Q:
#Spanning Tree
3 −1 −1 1 −1 −1 −1 −1 2 −1 −1 2 𝑅 1 2 −1 −1 2 𝑅11
#Spanning Tree
3 −1 −1 1 −1 −1 −1 −1 2 −1 −1 2 1 2 −1 −1 2 𝑅11 𝑅 det 𝑅11 = 1 ∗ 2 ∗ 2 − −1 ∗ −1 − 0 + 0 = 3
目录 Contents 1
Complete Graph
2
Proof of the Lemma
3
Arbitrary Graph
4
Pr Proo
f of the theo e theorem rem
Proofs working with determinants
hypothesis and show that the theorem also holds for multigraphs. What does the Laplacian of a multigraph look like?
Proofs working with determinants
▪ New formula to be relied on:
Le Lemma1 a1: T(G) = T(G − e) + T(G : e)
▪ where e is an arbitrary edge of the graph G.
Proofs working with determinants
▪ New formula to be relied on:
Le Lemma1 a1: T(G) = T(G − e) + T(G : e)
▪ where e is an arbitrary edge of the graph G. ▪ G − e denotes the graph obtained by deleting that edge e in G.
Proofs working with determinants
▪ New formula to be relied on:
Le Lemma1 a1: T(G) = T(G − e) + T(G : e)
▪ where e is an arbitrary edge of the graph G. ▪ G − e denotes the graph obtained by deleting that edge e in G. ▪ G : e the one obtained by contracting the edge e.
Proofs working with determinants
▪ New formula to be relied on:
Le Lemma1 a1: T(G) = T(G − e) + T(G : e)
▪ where e is an arbitrary edge of the graph G. ▪ G − e denotes the graph obtained by deleting that edge. ▪ G : e the one obtained by contracting the edge e.
3 4 5 {1, 2}
Proofs working with determinants
▪ In order to see why the Lemma holds, we divide the spanning trees of G into two classes. Remember the Lemma1: T(G) = T(G − e) + T(G : e)
Proofs working with determinants
▪ In order to see why the Lemma holds, we divide the spanning trees of G into two classes. ▪ The spanning trees that do not contain the edge e. (exactly the spanning trees of the graph G−e, T(G−e).) Remember the Lemma1: T(G) = T(G − e) + T(G : e)
Proofs working with determinants
▪ In order to see why the Lemma holds, we divide the spanning trees of G into two classes. ▪ The spanning trees that do not contain the edge e. (exactly the spanning trees of the graph G−e, T(G−e).) ▪ The spanning trees that do contain the edge e. (one-to-one correspondence with the spanning trees of G : e, as indicated in the following picture, T(G : e) .) Remember the Lemma1: T(G) = T(G − e) + T(G : e)
Proofs working with determinants
▪ Here we give some symbols and their meaning: ▪ Q′ : the Laplacian of G−e. ▪ Q′ ′: the Laplacian of G : e ▪ Q11 : the (n − 1) × (n − 1) matrix arising from the matrix Q by deleting the first row and the first column. ▪ Q′ 11 : the (n − 1) × (n − 1) matrix arising from the matrix Q ′ by deleting the first row and the first column. ▪ Q11,22 : the (n − 2) × (n − 2) matrix arising from the matrix Q by deleting the first and second row and the first and second column. ▪ Q ′ ′11 : the (n − 2) × (n − 2) matrix arising from the matrix Q′ ′ by deleting the first row and the first column.
Proofs working with determinants
▪ Ob Obse serva rvation1 tion1: Q′ 11 arises from Q11 by subtracting 1 from the element in the upper left corner. ▪ Ob Obse serva rvation2 tion2: Q′ ′11 = Q11,22 Assume edge e has endvertices 1 and 2
Proofs working with determinants
= 𝑅′11 = 𝑅′′11 , , , ,
Proofs working with determinants
▪ Now we are ready to show by induction on m that T(G) = detQ11 holds for every multigraph G with at most m edges.
Proofs working with determinants
▪ If in a multigraph G the vertex number 1 is not incident to any edge, then we have T(G) = 0.
Proofs working with determinants
▪ If in a multigraph G the vertex number 1 is not incident to any edge, then we have T(G) = 0. ▪ And detQ11=0
2 −1 −1 −1 −1 2 −1 −1 2 2 −1 −1 −1 2 −1 −1 −1 2 𝑅11 𝑅
Proofs working with determinants
▪ If in a multigraph G the vertex number 1 is not incident to any edge, then we have T(G) = 0. ▪ And detQ11=0
2 −1 −1 −1 −1 2 −1 −1 2 2 −1 −1 −1 2 −1 −1 −1 2 𝑅11 𝑅 Sum Sum
Proofs working with determinants
▪ If in a multigraph G the vertex number 1 is not incident to any edge, then we have T(G) = 0. ▪ And detQ11=0
2 −1 −1 −1 2 −1 −1 −1 2 𝑅11 Sum
detQ11=0 T(G) = detQ11=0
Proofs working with determinants
▪ If in a multigraph G the vertex number 1 is not incident to any edge, then we have T(G) = 0. ▪ (In In pa partic icula lar, r, wh when m = 0 , theorem holds, this is our base case.).
Proofs working with determinants
▪ If the vertex number 1 is incident to at least one edge, then we fix
Proofs working with determinants
▪ If the vertex number 1 is incident to at least one edge, then we fix one such edge, call it e. Assume e has endvertices 1 and 2 . ▪ According to Observation2, we have the following formula : Remember the Observation2 : Q′ ′11 = Q11,22
Proofs working with determinants
▪ If the vertex number 1 is incident to at least one edge, then we fix one such edge, call it e. Assume e has endvertices 1 and 2 . ▪ According to Observation2, we have the following formula: ▪ the matrix Q’11 arises from Q 11 by adding the vector e1 = (1, 0, 0, . . . , 0) to the first row. Remember the Observation2 : Q′ ′11 = Q11,22 R: vertor e1 as it’s first row, the remaning part agrees with Q11
Proofs working with determinants
Proofs working with determinants
▪ From the three formula above, hence
Proofs working with determinants
▪ From the three formula above, hence ▪ This completes the inductive step and hence we proof it.
Q & A