COMBINATORICS · LABELED TREES
CAYLEY’S FORMULA
HOW MANY TREES ON n LABELED VERTICES?
FOR EVERY n ≥ 1
|LabeledTree(n)| = n^(n − 2)
PRÜFER CODES
A tree on n ≥ 2 vertices corresponds to a sequence of length n − 2 with entries in Fin n.
LEAF → NEIGHBOR
Remove the least leaf and record its unique neighbor.
CODE → TREE
Reconnect the least missing remaining label, then join the final two labels.
WHY THE COUNT IS n^(n − 2)
n choices for each of n − 2 positions.
HOW THE PROOF MOVES
1 · CHOOSE THE LEAST LEAF
2 · ENCODE ITS NEIGHBOR
3 · REBUILD FROM THE CODE
4 · PROVE BOTH INVERSE LAWS
5 · TRANSFER CARDINALITY
EXACT SCOPE
Finite simple trees on the labeled vertex type Fin n. Counts labeled trees, not unlabeled tree shapes.