Math 2.0

Combinatorics Proof

Proof that binary trees are counted by Catalan numbers

Builds on Binary treeCatalan numbersRule of sumRule of productBijection principleStrong induction

Proof

We show that the counts satisfy the Catalan recursion, and conclude by strong induction.

  1. For a natural number mm, let TmT_m be the set of binary trees with exactly mm nodes.
  2. A tree of the form node⁡(L,R)\operatorname{node}(L, R) has at least one node, its root. So the only tree with 00 nodes is the empty tree, and T0T_0 has 11 element.
  3. Fix a natural number nn. By the definition, every tree in Tn+1T_{n+1} is node⁡(L,R)\operatorname{node}(L, R) for a unique pair (L,R)(L, R) of binary trees.
  4. Its number of nodes is 1+∣L∣+∣R∣1 + |L| + |R|, where ∣L∣|L| and ∣R∣|R| are the numbers of nodes. So ∣L∣=i|L| = i and ∣R∣=n−i|R| = n - i for some 0≤i≤n0 \le i \le n.
  5. Conversely, for 0≤i≤n0 \le i \le n, L∈TiL \in T_i and R∈Tn−iR \in T_{n-i}, the tree node⁡(L,R)\operatorname{node}(L, R) has n+1n + 1 nodes.
  6. By steps 3 to 5, the map node⁡(L,R)↦(L,R)\operatorname{node}(L, R) \mapsto (L, R) is a bijection from Tn+1T_{n+1} onto the disjoint union over 0≤i≤n0 \le i \le n of the sets Ti×Tn−iT_i \times T_{n-i}.
  7. We prove by strong induction on mm that TmT_m is finite with ∣Tm∣=Cm|T_m| = C_m, where CmC_m are the Catalan numbers, defined by C0=1C_0 = 1 and Cn+1=∑i=0nCi Cn−iC_{n+1} = \sum_{i=0}^{n} C_i\, C_{n-i}.
  8. For m=0m = 0, step 2 gives ∣T0∣=1=C0|T_0| = 1 = C_0.
  9. For m=n+1m = n + 1, assume the claim for all i≤ni \le n. By step 6, the bijection principle, the rule of product and the rule of sum, Tn+1T_{n+1} is finite and ∣Tn+1∣=∑i=0nCi Cn−i=Cn+1|T_{n+1}| = \sum_{i=0}^{n} C_i\, C_{n-i} = C_{n+1}.
  10. Hence the number of binary trees with exactly nn nodes is CnC_n for every natural number nn.

Idea

A nonempty binary tree is a root with a left and a right subtree, whose node counts add up to one less. So the counts obey the same recursion and start value as the Catalan numbers.

Reading path

To understand this page from the ground up, read these 52 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 a composition of surjections is surjective, Proof of the rule of sum, Proof of the bijection principle.

  1. Binary tree definition
  2. Cardinality of a finite set definition
  3. Catalan numbers definition
  4. Definition by recursion concept
  5. Element definition
  6. Mathematical induction concept
  7. Natural numbers object
  8. Peano axioms concept
  9. Proposition concept
  10. Set definition
  11. Successor function definition
  12. Conjunction definition
  13. Implication definition
  14. Predicate definition
  15. Empty set object
  16. Ordered pair definition
  17. Intersection definition
  18. Addition of natural numbers definition
  19. Existential quantifier definition
  20. The successor function is injective statement
  21. Universal quantifier definition
  22. Zero is not a successor statement
  23. Cartesian product definition
  24. Disjoint sets definition
  25. Subset definition
  26. Order on the natural numbers definition
  27. Uniqueness quantifier definition
  28. Binary relation definition
  29. Proof of strong induction from ordinary induction proof
  30. Function definition
  31. Strong induction statement
  32. Codomain definition
  33. Function composition definition
  34. Identity function definition
  35. Injective function definition
  36. Surjective function definition
  37. Left inverse definition
  38. Right inverse definition
  39. Proof that a composition of injections is injective proof
  40. Proof that a composition of surjections is surjective proof
  41. Bijective function definition
  42. Composition of injections is injective statement
  43. Composition of surjections is surjective statement
  44. Proof of the rule of sum proof
  45. Proof that a function is bijective iff it has a two-sided inverse proof
  46. Rule of sum statement
  47. Bijective iff it has a two-sided inverse statement
  48. Proof of the rule of product proof
  49. Proof of the bijection principle proof
  50. Rule of product statement
  51. Bijection principle statement
  52. Proof that binary trees are counted by Catalan numbers proof

Where this leads

1 page builds on this one.

Further reading

  1. Web https://en.wikipedia.org/wiki/Catalan_number, Applications in combinatorics
About this page
TagXCGX4XJYJE
URIm2://XCGX4XJYJE
Kindproof
WritingW0 stub
MSC05C05
ProvesBinary trees are counted by Catalan numbers
UsesBinary tree, Catalan numbers, Rule of sum, Rule of product, Bijection principle, Strong induction
Changed4 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)

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.