In this appendix we give three elegant combinatorial proofs that the number of spanning trees of the complete graph K _{ p } is p ^{ p − 2} (Example 9.11). The proofs are given in chronological order of their discovery.

First proof (Prüfer). Given a spanning tree T of K _{ p } , i.e., a tree on the vertex set [p ], remove the largest endpoint (leaf) v and write down the vertex a _{1} adjacent to v . Continue this procedure until only two vertices remain, obtaining a sequence \((a_{1},\ldots,a_{p-2}) \in {[p]}^{p-2}\) , called the Prüfer sequence of T . For the tree below, we first remove 11 and then record 8. Next remove 10 and record 1. Then remove 8 and record 4, etc., ending with the sequence (8, 1, 4, 4, 1, 4, 9, 1, 9) and leaving the two vertices 1 and 9.

We claim that the map just defined from trees

T on [

p ] to sequences

\((a_{1},\ldots,a_{p-2}) \in {[p]}^{p-2}\) is a bijection, thereby completing the proof since clearly [

p ]

^{ p − 2} has

p ^{ p − 2} elements. The crucial observation is that the first vertex to be removed from

T is the largest vertex of

T missing from the sequence [why?—this takes a little thought]. This vertex is adjacent to

a _{1} . For our example, we get that 11 was the first vertex removed and that 11 is adjacent to 8. We can now proceed recursively. If

T _{1} denotes

T with the largest missing vertex removed, then the Prüfer sequence of

T _{1} is

\((a_{2},\ldots,a_{p-2})\) . The first vertex to be removed from

T _{1} is the largest vertex of

T _{2} missing from

\((a_{2},\ldots,a_{p-2})\) . This missing vertex is adjacent to

a _{2} . For our example, this missing vertex is 10 (since 11 is not a vertex of

T _{2} ), which is adjacent to 1. Continuing in this way, we determine one new edge of

T at each step. At the end we have found

p − 2 edges, and the remaining two unremoved vertices form the (

p − 1)st edge.

Second proof (Joyal). A

doubly rooted tree is a tree

T with one vertex

u labelled

S (for “start”) and one vertex

v (which may equal

u ) labelled

E (“end”). Let

t (

p ) be the number of trees

T on the vertex set [

p ], and let

d (

p ) be the number of doubly rooted trees on [

p ]. Thus

$$\displaystyle{ d(p) = {p}^{2}t(p), }$$

(9.6)

since once we have chosen

T there are

p choices for

u and

p choices for

v .

Let T be a doubly rooted tree. There is a unique path from S to E , say with vertices \(S = b_{1},b_{2},\ldots,b_{k} = E\) (in that order). The following diagram shows such a doubly rooted tree:

Let

\(a_{1} < a_{2} < \cdots < a_{k}\) be the increasing rearrangement of the numbers

\(b_{1},b_{2},\ldots,b_{k}\) . Let

π be the permutation of the set

\(\{a_{1},\ldots,a_{k}\}\) given by

\(\pi (a_{i}) = b_{i}\) . Let

D _{ π } be the digraph of

π , that is, the vertex set of

D _{ π } is

\(\{a_{1},\ldots,a_{k}\}\) , with a directed edge

\(a_{i} \rightarrow b_{i}\) for

\(1 \leq i \leq k\) . Since any permutation

π of a finite set is a disjoint product of cycles, it follows that

D _{ π } is a disjoint union of directed cycles (all edges of each cycle point in the same direction as we traverse the cycle). For the example above, we have

k = 7,

\((b_{1},\ldots,b_{7}) = (11,10,15,7,5,2,3)\) , and

\((a_{1},\ldots,a_{7}) = (2,3,5,7,10,11,15)\) . The digraph

D _{ π } is shown below.

Now attach to each vertex

v of

D _{ π } the same subgraph

T _{ v } that was attached “below”

v in

T and direct the edges of

T _{ v } toward

v , obtaining a digraph

D _{ T } . For our example we get

The graph

D _{ T } has the crucial property that every vertex has outdegree one, that is, one arrow pointing out. In other words,

D _{ T } is the graph of a function

f : [

p ] → [

p ], with vertex set [

p ] and edges

i →

f (

i ). Conversely, given a function

f : [

p ] → [

p ], all the above steps can be reversed to obtain a unique doubly rooted tree

T for which

D _{ T } is the graph of

f . We have therefore found a bijection from doubly rooted trees on [

p ] to functions

f : [

p ] → [

p ]. Since the number of such functions

f is

p ^{ p } , it follows that

d (

p ) =

p ^{ p } . Then from (

9.6 ) we get

\(t(p) = {p}^{p-2}\) .

Third proof (Pitman). A forest is a graph without cycles; thus every connected component is a tree. A planted forest is a forest F for which every component T has a distinguished vertex r _{ T } (called the root of T ). Thus if a component T has k vertices, then there are k ways to choose the root of T .

Let P _{p } be the set of all planted forests on [p ]. Let uv be an edge of a forest F ∈ P _{p } such that u is closer than v to the root r of its component. Define F to cover the rooted forest F′ if F′ is obtained by removing the edge uv from F and rooting the new tree containing v at v . This definition of cover defines the covering relation of a partial order on P _{p } . Under this partial order P _{p } is graded of rank p − 1. The rank of a forest F in P _{p } is its number of edges. The following diagram shows the poset P _{3} , with the root of each tree being its top vertex.

It is an easy exercise to see that an element

F of

P _{p } of rank

i covers

i elements and is covered by

\((p - i - 1)p\) elements. We now count in two ways the number

M _{p } of maximal chains of

P _{p } . On the one hand, we can start at the top. The number of maximal elements of

P _{p } is

p ⋅

t (

p ), where

t (

p ) as above is the number of trees on the vertex set [

p ], since there are

p ways to choose the root of such a tree. Once a maximal element

F is chosen, then there are

p − 1 elements

F′ that it covers, then

p − 2 elements that

F′ covers, etc., giving

$$\displaystyle{ M_{p} = p \cdot t(p)(p - 1)! = p!\,t(p). }$$

(9.7)

On the other hand, we can start at the bottom. There is a unique element

F of rank one (the planted forest with no edges), then (

p − 1)

p elements

F′ that cover

F , then (

p − 2)

p elements that cover

F′ , etc., giving

$$\displaystyle{ M_{p} = {p}^{p-1}(p - 1)!. }$$

(9.8)

Comparing (

9.7 ) and (

9.8 ) gives

\(t(p) = {p}^{p-2}\) .

Our third proof isn’t an explicit bijection like the first two proofs. On the other hand, it has the virtue of not depending on the names of the vertices. Note that in the first two proofs it is necessary to know when one vertex is larger than another.