Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees...

73
Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers from 1 to n. We can count such trees for small values of n by hand so as to conjecture a general formula.

Transcript of Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees...

Page 1: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Enumerating labeled trees

Definition: A labeled tree is a tree the vertices of which are assigned unique numbers from 1 to n.

We can count such trees for small values of n by hand so as to conjecture a general formula.

Page 2: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Enumerating labeled trees

Definition: A labeled tree is a tree the vertices of which are assigned unique numbers from 1 to n.

We can count such trees for small values of n by hand so as to conjecture a general formula.

1

2 3

2

1 3

3

1 2

1

3 2

2

3 1

3

1 2

Page 3: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Enumerating labeled trees

Definition: A labeled tree is a tree the vertices of which are assigned unique numbers from 1 to n.

We can count such trees for small values of n by hand so as to conjecture a general formula.

1

2 3

2

1 3

3

1 2

1

3 2

2

3 1

3

1 2

Page 4: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Enumerating labeled trees

Definition: A labeled tree is a tree the vertices of which are assigned unique numbers from 1 to n.

We can count such trees for small values of n by hand so as to conjecture a general formula.

3

Page 5: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Enumerating labeled trees

Definition: A labeled tree is a tree the vertices of which are assigned unique numbers from 1 to n.

We can count such trees for small values of n by hand so as to conjecture a general formula.

3 4 4!/2=12

Page 6: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Enumerating labeled trees

Definition: A labeled tree is a tree the vertices of which are assigned unique numbers from 1 to n.

We can count such trees for small values of n by hand so as to conjecture a general formula.

3 4 4!/2=12

5!/2=60 5 5!/2

Page 7: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

So what is the general formula?

Let Tn denote the number of labeled trees on n vertices. We now know the following values for small n:

T2 = 1 as there is only one tree on 2 vertices

Page 8: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

So what is the general formula?

Let Tn denote the number of labeled trees on n vertices. We now know the following values for small n:

T2 = 1 as there is only one tree on 2 vertices

3T3 = 3 as we have seen before:

Page 9: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

So what is the general formula?

Let Tn denote the number of labeled trees on n vertices. We now know the following values for small n:

T2 = 1 as there is only one tree on 2 vertices

3T3 = 3 as we have seen before:

T4 = 4+12=16 as we have also seen before:4

Page 10: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

So what is the general formula?

Let Tn denote the number of labeled trees on n vertices. We now know the following values for small n:

T2 = 1 as there is also one tree on 2 vertices

3T3 = 3 as we have seen before:

T4 = 4+12=16 as we have also seen before:4 24!/2=12

T5 = 60+5+60=125

5!/2=60 5 5!/2

Page 11: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

If we continue in this fashion, we will obtain the

following sequence:

1, 3, 16, 125,1296,16807,262144...

So what is the general formula?

Page 12: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

2−= n

nnT

So what is the general formula?

If we continue in this fashion, we will obtain the

following sequence:

1, 3, 16, 125,1296,16807,262144...

Page 13: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Theorem (Cayley) There are labeled trees on n vertices.

2−nn

1. InductionkAnA =⊂ ||},,...2,1{

knT , - the number of forests of k trees, for which the vertices from A appear in different components.

Cayley’s theorem

F(A, n) - the set of forests on n vertices in which vertices from A appear in different connected components(trees).

Page 14: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

kAnknknA =+−+−= ||},,...2,1{

knT , - the number of forests of k trees, for which the vertices from A appear in different components.

Cayley’s theorem - induction

F(A, n) - the set of forests on n vertices in which vertices from A appear in different connected components(trees).

n-k+1 n-k+2 n-k+3 n

i vertices

Page 15: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

n-k+1 n-k+2 n-1 n

i vertices

Page 16: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

∑−

=−+−⎟

⎞⎜⎝

⎛ −−−=

kn

iiknkn T

ikn

T0

1,1,)1()1(

1,

−−= knkn knT

n-k+1 n-k+2 n-1 n

i vertices

}}{}){\('),1,'({),( verticeschoseninAAnAFnAF ∪=−↔

Page 17: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

2. Establishing a 1-1 correspondence between trees and functions acting from 1..n into 1..n (Joyal)

|||| 2nn TnS =17 9 5 8

10

2 3

6

4

left endright end

⎟⎠

⎞⎜⎝

⎛=

49

85198754

71

|Mf

},...,1{},...,1{: nnf →

Page 18: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

⎟⎠

⎞⎜⎝

⎛=

710

4852195598765432

71

f

1 7 10 4 9

83

6

5

2

2. Establishing a 1-1 correspondence between trees and functions acting from 1..n into 1..n (Joyal)

Page 19: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

⎟⎠

⎞⎜⎝

⎛=

710

4852195598765432

71

f

1 7 10 4 9

83

6

5

2

}9,8,7,5,4,1{=M Mf | is a bijection

2. Establishing a 1-1 correspondence between trees and functions acting from 1..n into 1..n (Joyal)

Page 20: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

17 9 5 8

10

4

⎟⎠

⎞⎜⎝

⎛=

49

85198754

71

|Mf

2. Establishing a 1-1 correspondence between trees and functions acting from 1..n into 1..n (Joyal)

Page 21: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

17 9 5 8

10

4

⎟⎠

⎞⎜⎝

⎛=

49

85198754

71

|Mf1 7 10 4 9

83

6

5

2

2. Establishing a 1-1 correspondence between trees and functions acting from 1..n into 1..n (Joyal)

Page 22: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

17 9 5 8

10

3

4

⎟⎠

⎞⎜⎝

⎛=

49

85198754

71

|Mf1 7 10 4 9

83

6

5

2

2. Establishing a 1-1 correspondence between trees and functions acting from 1..n into 1..n (Joyal)

Page 23: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

17 9 5 8

10

2 3

4

⎟⎠

⎞⎜⎝

⎛=

49

85198754

71

|Mf1 7 10 4 9

83

6

5

2

2. Establishing a 1-1 correspondence between trees and functions acting from 1..n into 1..n (Joyal)

Page 24: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

17 9 5 8

10

2 3

6

4

⎟⎠

⎞⎜⎝

⎛=

49

85198754

71

|Mf1 7 10 4 9

83

6

5

2

2. Establishing a 1-1 correspondence between trees and functions acting from 1..n into 1..n (Joyal)

Page 25: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

17 9 5 8

10

2 3

6

4

left endright end

(7,9,1,5,8,4) -> (1,5,7,8,4,9)

⎟⎠

⎞⎜⎝

⎛=

485197987541

f

2. Establishing a 1-1 correspondence between trees and functions acting from 1..n into 1..n (Joyal)

Page 26: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

1 2

3

4

5

6

7

89

10),...,,( 221 −naaaLabeled tree ->

2. Pruefer code

Page 27: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

1 2

3

4

5

6

7

89

10),...,,( 221 −naaaLabeled tree ->

Pruefer code :1

2. Pruefer code

Page 28: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

1

3

4

5

6

7

89

10),...,,( 221 −naaaLabeled tree ->

Pruefer code :1 4

2. Pruefer code

Page 29: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

1

4

5

6

7

89

10),...,,( 221 −naaaLabeled tree ->

Pruefer code :1 4 4

2. Pruefer code

Page 30: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

1

46

7

89

10),...,,( 221 −naaaLabeled tree ->

Pruefer code :1 4 4 1

2. Pruefer code

Page 31: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

1

6

7

89

10),...,,( 221 −naaaLabeled tree ->

Pruefer code :1 4 4 1 6

2. Pruefer code

Page 32: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

6

7

89

10),...,,( 221 −naaaLabeled tree ->

Pruefer code :1 4 4 1 6 6

2. Pruefer code

Page 33: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

6

89

10),...,,( 221 −naaaLabeled tree ->

Pruefer code :1 4 4 1 6 6 8

2. Pruefer code

Page 34: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

6

8

10),...,,( 221 −naaaLabeled tree ->

Pruefer code :1 4 4 1 6 6 8 6

2. Pruefer code

Page 35: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

(1 4 4 1 6 6 8 6)

3

4

5

6

7

89

10

2. Pruefer code

Page 36: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

(1 4 4 1 6 6 8 6)

32 7 9 10

Reversing the correspondence

5

1

- deleted vertex- end vertex- inner vertex

Page 37: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

(1 4 4 1 6 6 8 6)

32 7 9 10

Reversing the correspondence

5

1 4

- deleted vertex- end vertex- inner vertex

Page 38: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

(1 4 4 1 6 6 8 6)

32 7 9 10

Reversing the correspondence

5

1 4

- deleted vertex- end vertex- inner vertex

Page 39: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

(1 4 4 1 6 6 8 6)

32 7 9 10

Reversing the correspondence

5

1 4

- deleted vertex- end vertex- inner vertex

Page 40: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

(1 4 4 1 6 6 8 6)

32 7 9 10

Reversing the correspondence

5

1 4

6

- deleted vertex- end vertex- inner vertex

Page 41: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

(1 4 4 1 6 6 8 6)

32 7 9 10

Reversing the correspondence

5

1 4

6

- deleted vertex- end vertex- inner vertex

Page 42: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

(1 4 4 1 6 6 8 6)

32 7 9 10

Reversing the correspondence

5

1 4

6

- deleted vertex- end vertex- inner vertex

Page 43: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

(1 4 4 1 6 6 8 6)

32 7 9 10

Reversing the correspondence

5

1 4

6

- deleted vertex- end vertex- inner vertex

Page 44: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Reversing the correspondence

1 2

3

4

5

6

7

89

10

32 7 9 105

1 4

6

Page 45: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Other applications: the number of trees with a given degree sequence

m

ii

m

dm

d

nddd m

nm xx

ddnxx ⋅⋅⋅⋅

=++ ∑

∑ =

……

1

11

),...,( 11 !!

!)...(

)!1()!1()!2(

1 −⋅⋅−−

mddn…

be the degree sequence),...,( 1 nddLet

Page 46: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Other applications: the number of trees with a given degree sequence

m

ii

m

dm

d

nddd m

nm xx

ddnxx ⋅⋅⋅⋅

=++ ∑

∑ =

……

1

11

),...,( 11 !!

!)...(

be the degree sequence),...,( 1 ndd

)!1()!1()!2(

1 −⋅⋅−

nddn…

1)1(12 −−−⎟⎠

⎞⎜⎝

⎛−− knn

kn -the number of trees in which vertex n has

degree k

Let

Page 47: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Polya’s approach

∑∞

==

1 !)(

n

n

n nxntxT

T(x) is the generating function for the number of rooted trees with n vertices

Let be the number of connected graphs on n vertices enjoying a certain property P.

nc

∑−

=

−−∑

= −⋅⋅=⋅⋅⎟

⎞⎜⎝

⎛ 1

1

1

1 )!(!!

21

21 n

kknk

knkn

k knc

kcncc

kn

∑∞

==

1 !)(

n

n

n nxсxС

Page 48: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Polya’s approach

∑∞

==

1 !)(

n

n

n nxntxT

T(x) is the generating function for the number of rooted trees with n vertices

)()( xTxexT =

Page 49: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Lagrange inversion formula

))(()( sxs ϕψϕ =

00 |)(1|)( == = tn

n

n

sn

nt

dtd

ns

dsd ψϕ

10|1 −

= == nt

ntn

n

n nedtd

nnt

Page 50: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

1 2

3

The number of spanning trees of a directed graph

Def. A spanning tree of a graph G is its subgraph T that includes all the vertices of G and is a tree

Def. A directed tree rooted at vertex n is a tree, all arcs of which are directed towards the root

1 2

3

1 2

3

Page 51: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

1 2

3

∑=

=h

jjsn

1

Knuth’s theorem

Consider an example: 2,2,3 321 === sss

Page 52: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

1

∑=

=h

jjsn

1

Knuth’s theorem

Consider an example: 2,2,3 321 === sss

Page 53: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

∑=

=h

jjsn

1

Knuth’s theorem

Consider an example:2,2,3 321 === sss

Page 54: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

∑=

=h

jjsn

1

Knuth’s theorem

Consider an example:2,2,3 321 === sss

Page 55: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

∑=

=h

jjsn

1

Knuth’s theorem

Consider an example:2,2,3 321 === sss

Page 56: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

∑=

=h

jjsn

1

Knuth’s theorem

Consider an example:2,2,3 321 === sss

Page 57: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Def. A function f is called a tree function of a directed tree T iff f(i)=j when j is the first vertex on the way from i to the root.

Let c(H) denote the number of spanning trees of the graph H

1S

2S

3S

Knuth’s theorem

Page 58: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

∑ ∏−

=

−Γ=f

h

ii

Si SfSHc i

1

1

1|| |)(||)(|)(Theorem (Knuth)

Knuth’s theorem

Theorem The number of spanning trees of a graph H arisen from a directed cycle equals

1143

12 ...321 −− ⋅⋅⋅⋅ hssss ssss

Page 59: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Knuth’s theorem

Theorem The number of spanning trees of a graph H arisen from a directed cycle equals

1143

12 ...321 −− ⋅⋅⋅⋅ hssss ssss

11

12

21 −− ⋅ ss ss is the number of r by s bipartite graphs

Page 60: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Knuth’s theorem

211

02)1( −−−−∑

==−−⎟

⎞⎜⎝

⎛ nkknn

knknk

kn

Page 61: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Matrix-Tree Theorem

Def. Let G be a directed graph without loops. Let denote the vertices of G, and denote the edges of G.

},...,{ 1 nvv},...,{ 1 mee

The incidence matrix of G is the n x m matrix A, such that

0,1

,1

,

,

,

=−==

ji

ji

ji

aaa if is the head of

if is the tail of

otherwise

1 2

34

1

2

3

4 5

111000011010011

01001

+++−+

−−−−+

iv

ivje

je

Page 62: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Matrix-Tree Theorem

1 2

34

1

2

3

4 5

111000011010011

01001

+++−+

−−−−+

Lemma. The incidence matrix of a connected graph on n vertices has the rank of n-1

The reduced incidence matrix A of a connected graph G is the matrix obtained from the incidence matrix by deleting a certain row.

Page 63: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Matrix-Tree Theorem

1 2

34

1

2

3

4 50011010011

01001

−+−−−

−+

Lemma. The incidence matrix of a connected graph on n vertices has the rank of n-1

The reduced incidence matrix A of a connected graph G is the matrix obtained from the incidence matrix by deleting a certain row.

Page 64: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Matrix-Tree Theorem

1 2

34

1

2

3

4 5010011101

+−−

−+

Lemma. The incidence matrix of a connected graph on n vertices has the rank of n-1

The reduced incidence matrix A of a connected graph G is the matrix obtained from the incidence matrix by deleting a certain row.

Page 65: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Matrix-Tree Theorem

1 2

34

1

2

3

4 5000101

011−−

−+

Lemma. The incidence matrix of a connected graph on n vertices has the rank of n-1

The reduced incidence matrix A of a connected graph G is the matrix obtained from the incidence matrix by deleting a certain row.

Page 66: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Matrix-Tree Theorem

Theorem (Binet-Cauchy)

∑= 2)(detdet BAA T

0A be the reduced incidence matrix of the graph G.Let

Theorem (Matrix-Tree Theorem)

If A is a reduced incidence matrix of the graph G, then the number of spanning trees equals )det( TAA ⋅

If R and S are matrices of size p by q and q by p, where , then

∑ ⋅= )det()det()det( CBRSqp ≤

Page 67: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Matrix-Tree Theorem

Gofedgeswithidentifiediablesee b var,...1 −

][)( ijmeM =

otherwiseitoincidentedgesifsumm

jiandjandijoinseifem

ij

kkij

=

≠−= ,

∑Π= )()( TeM nTheorem1 2

34

1

2

3

4 5=

+−

−++

−−+

=

32

2

2

521

1

1

41

4

0

0)(

eee

eeee

eeee

eM

543542432531431521421321 eeeeeeeeeeeeeeeeeeeeeeee +++++++=

Page 68: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Matrix-Tree Theorem

Gofedgeswithidentifiediablesee b var,...1 −

][)( ijmeM =

otherwiseitoincidentedgesifsumm

jiandjandijoinseifem

ij

kkij

=

≠−= ,

∑Π= )()( TeM nTheorem1 2

34

1

2

3

4 5

=+

−−

++−

−+

=

32

2

2

521

1

1

41

4

0

0)(

eee

eeee

eeee

eM

543542432531431521421321 eeeeeeeeeeeeeeeeeeeeeeee +++++++=

)det()( Tn AYAeM ⋅⋅=

Page 69: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Matrix-Tree Theorem

Another derivation of Cayley’s formula:

1111111111111111111111

−−−−−−−−−−−−−−−−−−−−−−

nn

nn

……

Page 70: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Matrix-Tree Theorem

Another derivation of Cayley’s formula:

111111111111111111

1111

−−−−−−−−−−−−−−−−−−

nn

n ……

Page 71: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Matrix-Tree Theorem

Another derivation of Cayley’s formula:

2

0000000000000001111

−= nn

nn

n ……

Page 72: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Matrix-Tree TheoremTheorem (Matrix-Tree Theorem for directed graphs)

Let be variables representing the arcs of the graph. Let denote the n by n matrix in which equals the sum of arcs directed from node i to node j if , and equals the sum of all arcs directed from node i to all other nodes.

][ ijcC =

ji ≠ijc−iic

Then∑Π= )(TСn

1 2

34

1

2

3

4 5

,

where the summation is over all spanning subtrees of G rooted at node n .

⎟⎟⎟⎟⎟⎟

++−−−−

⎜⎜⎜⎜⎜⎜

=

543354

22

11

00000000

eeeeeeee

ee

Сn

Page 73: Definition: A labeled tree is a tree the vertices of which ... · Enumerating labeled trees Definition: A labeled tree is a tree the vertices of which are assigned unique numbers

Matrix-Tree Theorem

1 2

34

1

2

3

4 5 521421321

54334

2

1

2 0000

eeeeeeeeeeeeee

ee

С ++=++−−

=