Cayley Formula and Matrix-Tree Theorem
Counting spanning trees reveals deep connections between combinatorics, linear algebra, and graph structure. Two fundamental resultsβCayley's formula and the matrix-tree theoremβprovide powerful tools for enumeration.
The complete graph has exactly labeled spanning trees.
For example: has trees, has trees, and has trees.
Multiple proofs of Cayley's formula exist, each offering different insights. The PrΓΌfer code provides a bijection between labeled trees on vertices and sequences of length from , directly establishing the count.
The PrΓΌfer code of a labeled tree on vertices is constructed by:
- Find the leaf with smallest label, say
- Record the label of 's unique neighbor
- Remove and repeat until 2 vertices remain
This produces a sequence with each . The map is bijective, proving Cayley's formula.
For a tree with edges on 5 vertices:
- Leaf 1 connects to 3: record , remove vertex 1
- Leaf 2 connects to 3: record , remove vertex 2
- Leaf 3 connects to 4: record , remove vertex 3
- Two vertices remain, stop
PrΓΌfer code: . Since there are such codes, has 125 spanning trees.
For any graph with Laplacian matrix , let denote the matrix obtained by deleting row and column from . Then the number of spanning trees of is:
for any . Remarkably, this determinant is independent of which row and column are deleted.
The matrix-tree theorem provides an algebraic method to count spanning trees without enumeration, connecting graph structure to linear algebra through the Laplacian matrix.
For , the Laplacian is:
Deleting the first row and column:
Computing: , confirming Cayley's formula: .
The matrix-tree theorem extends to weighted graphs by replacing entries with (negative edge weights) in the Laplacian. The determinant then sums over all spanning trees weighted by the product of their edge weights, providing a generating function for weighted tree counting.
These counting results have applications in network reliability, random graph generation, and statistical physics (counting configurations in the Ising model), demonstrating the interplay between combinatorics and analysis in graph theory.