Proof of Cayley's formula by Prüfer sequences
Builds on TreePrüfer sequenceEvery finite tree with at least two vertices has a leafConnected graphAcyclic graphCycleEvery walk contains a pathPathDegree of a vertexNumber of functions between finite setsBijection principle
Proof
We show that the Prüfer sequence is a bijection, by induction on the number of vertices. For the induction we allow any finite set of integers as vertex set.
- For a finite set with , let be the set of trees with vertex set . Let be the set of sequences of length with entries in .
- Lemma A: if is a tree with at least two vertices and is a leaf, then is a tree. Here removes and its edge.
- Proof of Lemma A. A cycle of would be a cycle of , so is acyclic. It has the vertex adjacent to .
- Let . By every walk contains a path, has a path from to . An inner vertex of a path has two distinct neighbours on it, so is not on this path.
- So the path lies in , and is connected. This proves Lemma A.
- Define for by recursion on . If , let be the empty sequence.
- If , let be the smallest leaf of , which exists by the leaf lemma, and let be its neighbour. Let , using Lemma A.
- Unwinding the recursion gives exactly the process that defines the Prüfer sequence. So for , is the Prüfer sequence of .
- Lemma B: each vertex of appears exactly times in . We prove it by induction on .
- If , has one edge, both vertices have degree , and is empty.
- Let , with as in step 7 and . The vertex has degree , and it does not appear in , since and is not a vertex of .
- The vertex appears times, by the induction hypothesis. Every other vertex has , and appears times.
- Consequence of Lemma B: every vertex of has degree at least , since is connected with vertices. So the leaves of are exactly the elements of that do not appear in .
- Claim: for every with , the map is a bijection. We argue by induction on .
- If , say , the only tree on has the single edge , because the graph with no edge is not connected. And has only the empty sequence.
- Let , and assume the claim for all sets of size . Let .
- The sequence has at most distinct entries, and has elements. Let be the smallest element of that does not appear in .
- Let and . Then . By the induction hypothesis, there is exactly one with .
- Existence. Let be with the new vertex and the new edge ; note . Then is connected, since is connected and is joined to .
- A cycle in through would give two distinct neighbours, but has degree . A cycle avoiding would lie in . So is acyclic, and .
- The vertex has degree at least in : one edge in by step 13, and the edge to . So is not a leaf of .
- Let be a leaf of . Then is a leaf of , so does not appear in by step 13. Also , so does not appear in .
- By the choice of in step 17, . So is the smallest leaf of , with neighbour , and .
- By step 7, .
- Uniqueness. Let with . By step 13, the leaves of are the elements of not in . The smallest of them is .
- By step 7, the neighbour of in is , and . By Lemma A, . By step 18, .
- So the edges of are those of together with . These are the edges of , so . This proves the claim.
- Take . By the number of functions between finite sets, .
- By the claim and the bijection principle, the number of trees with vertex set is .
Idea
Prüfer's code removes the smallest leaf again and again, and it writes down the neighbour of each removed leaf. A vertex is written times, so the leaves are exactly the labels that never appear. This lets us read off the first removed leaf from the code alone. Hence the code can be decoded step by step, and the tree can be rebuilt in exactly one way.
Reading path
To understand this page from the ground up, read these 70 pages in order. The foundations come first. The path takes the proofs Proof that a composition of injections is injective, Proof that a function is bijective iff it has a two-sided inverse, Proof of the rule of product, Proof of strong induction from ordinary induction, Proof that every finite tree with at least two vertices has a leaf, by a longest path, Proof of the number of functions between finite sets, Proof that a composition of surjections is surjective, Proof of the rule of sum, Proof that every walk contains a path, Proof of the bijection principle.
- Cardinality of a finite set definition
- Definition by recursion concept
- Element definition
- Graph definition
- Mathematical induction concept
- Natural numbers object
- Peano axioms concept
- Proposition concept
- Set definition
- Neighbourhood definition
- Walk definition
- Successor function definition
- Conjunction definition
- Implication definition
- Predicate definition
- Empty set object
- Ordered pair definition
- Degree of a vertex definition
- Intersection definition
- Path definition
- Reachability definition
- Trail definition
- Addition of natural numbers definition
- The successor function is injective statement
- Zero is not a successor statement
- Existential quantifier definition
- Universal quantifier definition
- Cartesian product definition
- Disjoint sets definition
- Subset definition
- Connected graph definition
- Circuit definition
- Order on the natural numbers definition
- Uniqueness quantifier definition
- Binary relation definition
- Cycle definition
- Proof of strong induction from ordinary induction proof
- Acyclic graph definition
- Function definition
- Strong induction statement
- Codomain definition
- Function composition definition
- Identity function definition
- Injective function definition
- Restriction of a function definition
- Tree definition
- Proof that every walk contains a path proof
- Surjective function definition
- Left inverse definition
- Right inverse definition
- Proof that a composition of injections is injective proof
- Proof that every finite tree with at least two vertices has a leaf, by a longest path proof
- Every walk contains a path statement
- Prüfer sequence definition
- Proof that a composition of surjections is surjective proof
- Bijective function definition
- Composition of injections is injective statement
- Every finite tree with at least two vertices has a leaf statement
- Composition of surjections is surjective statement
- Proof of the rule of sum proof
- Proof that a function is bijective iff it has a two-sided inverse proof
- Rule of sum statement
- Bijective iff it has a two-sided inverse statement
- Proof of the rule of product proof
- Proof of the bijection principle proof
- Rule of product statement
- Bijection principle statement
- Proof of the number of functions between finite sets proof
- Number of functions between finite sets statement
- Proof of Cayley's formula by Prüfer sequences proof
Where this leads
1 page builds on this one.
Further reading
About this page
| Tag | 900KK0PPYM |
|---|---|
| URI | m2://900KK0PPYM |
| Kind | proof |
| Writing | W0 stub |
| MSC | 05C30 |
| Proves | Cayley's formula |
| Uses | Tree, Prüfer sequence, Every finite tree with at least two vertices has a leaf, Connected graph, Acyclic graph, Cycle, Every walk contains a path, Path, Degree of a vertex, Number of functions between finite sets, Bijection principle |
| Changed | 4 November 2026 |
Markdown · JSON · Edit on GitHub
What this page needs for W1
- an inventory row: the row of the inventory that the node accounts for (0 of 1)
- a source with a locator (0 of 1)
The writing levels say how complete the text of a page is. They do not measure its truth.
What links here
No page links to this page yet.