A simple way to prove the formula for
Catalan numbers
version 1.0
9 January 2011
We shall find the number of good bracketings with n pairs of parentheses.
Recall that a bracketing is simply a sequence of left and right parentheses,
n of each kind, and that a bracketing is good if every initial segment of the
sequence has at least as many left parentheses as right ones. Let a(n) be the
number of all sequences of n left and n right parentheses. Let g(n) be the
number of good bracketings with these numbers of left and right parentheses.
And let b(n) = a(n) − g(n) be the number of the bracketings that are not
good, that is, those that are bad. Clearly g(n) = a(n) − b(n).
It is easy to find a(n): for each bracketing, the positions of the n left (say)
parentheses among the 2n places in the sequence determine the sequence
uniquely. Thus
2n
a(n) =
.
n
To determine b(n) we define a bijection between the bad bracketings of
n pairs of parentheses and all bracketings of n + 1 left and n − 1 right
parentheses. Let s = s1 . . . s2n be a bad bracketing, with si ∈ {(, )}. Let
k be the least index for which the number of left brackets ` is smaller that
the number of right brackets r. Observe that r = ` + 1. Define ŝ = ŝ1 . . . ŝ2n
by ŝi = si for i = 1, . . . , k and ŝi = si for i = k + 1, . . . , 2n, with ( =) and
) = (. That is, reverse all brackets after the k-th. It is easy to see that the
number of left brackets if ŝ is ` + n − ` − 1 = n − 1 and the number of right
brackets in ŝ is r + n − ` = ` + 1 + n − ` = ` + 1. It is clear that the mapping
s −→ ŝ is injective since if ŝ = ŝ0 , then si = s0i for i = 1, . . . , k (and k must
be the same for both s and s0 ) and si = sˆi = sˆ0i = s0i for i = k + 1, . . . , 2n.
To see that the mapping is surjective, consider any bracketing ŝ of n + 1
right brackets and n − 1 left brackets. Let k be the first index such that
the number of left brackets is smaller than the number of right brackets in
s1 . . . sk . Define s = s1 . . . s2n by si = sˆi for i = 1, . . . , k and si = sˆi for
i = k + 1, . . . , 2n.
So there are as many bad bracketings as there are bracketings of n + 1
right and n − 1 left parentheses and the latter are easy to count. Choosing
1
n + 1 places for the right parentheses among the 2n available determines a
bracketing. This can be done in
2n
2n
b(n) =
=
n+1
n−1
ways and so
g(n) = a(n) − b(n) =
2n
2n
−
n
n+1
This gives
g(n) =
Thus
(2n)!
(2n)!(n + 1) − n(2n)!
(2n)!
−
=
n! n!
(n + 1)!(n − 1)!
(n + 1)!n!
(2n)!
1 (2n)!
1
2n
g(n) =
=
=
.
(n + 1)! n!
n + 1 n! n!
n+1 n
The values of g(n) are called Catalan numbers, after Eugène Charles Catalan,
a 19th century mathematician, and are often denoted by Cn . They appear
often since Cn is
• the number of good bracketings of 2n pairs of parentheses, n left, n
right;
• the number of ways of computing the associative but non-commutative
product x1 . . . xn+1 (this is what Catalan studied);
• the number of ways of triangulating a convex n-gon;
• the number of ordered trees on n + 1 vertices;
• the number of binary trees on n vertices;
2n
1
is often derived by using generating function,
The formula Cn = n+1
n
which is much longer if one does not know anything about them. The proof
above was given on 1878 D. André.
2
Here is a more compact and more precise (but much less comprehensible
at first sight) version of the proof.
Definition 1 Let S = {0, 1}, n ∈ N and b ∈ S 2n . For i ∈ S, and 1 ≤ k ≤
2n, let bk = b1 . . . bk (so that b2n = b) and let ci (bk ) be the number of i’s in
bk , i.e., c1 (bk ) = sumki=1 i and c0 (bk ) = k − c1 (b). Say that b is balanced if
c0 (b) = c1 (b). Say that b is good if it is balanced and for each 1 ≤ k ≤ 2n,
c0 (bk ) ≥ c1 (bk ). Let G(2n) = {b ∈ S 2n : b is good }, B(2n) = {b ∈ S 2n :
bisbalanced} and set N G(2n) = B(2n) \ G(2n). Let also B + (2n) = {b ∈
S 2n : c1 (b) = c0 (b) + 2}.
Definition 2 Let b ∈ N G(2n) and let k = min{i : c1 (bi ) > c0 (bi )}. Since
b ∈ N G(2n), such a k exists and must satisfy k < 2n and c0 (bk ) + 1 = c1 (bk ).
Define ρ : N G(2n) −→ B + 2n, defining ρ(b) = b̂ by bˆi = bi for i = 1, . . . , k
and bˆi = (1 + bi ) (mod 2) for i = k + 1, . . . , 2n.
Lemma 1 The function ρ defined above is bijective.
Proof. We first verify that b̂ ∈ B + (2n). We have that c0 (b̂) = c0 (bk ) +
(n−c1 (bk ) = c0 (bk )+n−(c0 (bk )+1) = n−1 and c1 (b̂ = c1 (bk )+(n−c0 (bk )) =
c0 (bk ) + 1 − n − c0 (bk ) = n + 1, verifying the claim.
Injective. Suppose b̂ = b̂0 . Observe that this means that ci (bj ) = ci (bj ) for
i ∈ {0, 1} and j = 1, . . . , 2n. This in turn implies that bi = bˆi = bˆ0i = b0i
for i = 1, . . . k and bi = (1 + bˆi ) (mod 2) = (1 + bˆ0i ) (mod 2) = b0i for
i = k + 1, . . . , 2n. So b = b0 .
Surjective. Consider b ∈ B + (2n). Let k = min{i : c1 (bi ) > c0 (bi )} and define
b̂ as in the definition of ρ (this is clearly possible). It is easy to see now that
b̂ ∈ N G(2n).
2
We note that ρ2 is the identity function on N G(2n).
Theorem 1 The number of elements in G(2n) is Cn =
2n
1
n+1 n
.
Proof. Clearly |G(2n)| = |B(2n)| − |N G(2n)| = |B(2n)| − |B + (2n)|, by the
Lemma. This gives
2n
2n
1
2n
G(2n) =
−
=
= Cn
n
n+1
n+1 n
2
as required.
3
Observation 1
2n
4n
≤ n+1
n
2
Observation 2
2n
4n+1
1
∈ Ω(
)
n+1 n
(n + 1)2
Observation 3 The number of ways of computing the associative but noncommutative product a1 · a2 · . . . · an is Cn−1 .
Note that proving this last observation requires work and imagination.
4
© Copyright 2026 Paperzz