卡特兰数

Author

李 辉

Published

April 2, 2026

平衡括号

n=1

()

n=2

()() \qquad (())

n=3

()()() \qquad ()(()) \qquad (())()

(()()) \qquad ((()))

Notes: “(())()” is valid, but “())(()” is not.


n=4

(((()))) ((()()))

((())()) \qquad (()(()))

((()))() \qquad (()()()) \qquad ()((()))

(()())() \qquad (())(()) \qquad ()(()())

(())()() \qquad ()(())() \qquad ()()(())

()()()()


There is a sequence 1, 2, 5, 14, …

It is Catalan numbers, denoted by C_n.

If We define the count for n = 0 to be 1, then the sequence becomes 1, 1, 2, 5, 14, …


Monotonic lattice paths. A monotonic path which starts in the upper left corner, moves along the edges of a grid to the lower right corner, and do not pass across the diagonal.

(0,0,0,2)(0,0,0,1)(0,0,2,2)(0,0,2,3)(0,0,1,1)(0,0,1,3)(0,0,1,2)(0,1,1,1)(0,1,1,3) (0,1,1,2)(0,1,2,2)(0,1,2,3)

Polygon triangulation. (This is Euler’s polygon division problem.)

递归数列

Counting Polygon triangulation of Octagon (C8-2=C6). (C6=C0C5+C1C4+C2C3+C3C2+C4C1+C5C0)

It is observed that all of the combinatorial problems listed above satisfy Segner’s recurrence relation

C_{n+1}=\sum_{i=0}^n C_i\,C_{n-i}\quad\text{for }n\ge 0, together with C_0=1 and C_1=1.

生成函数

The generating function for the Catalan numbers is defined by

c(x)=\sum_{n=0}^\infty C_n x^n=C_0+C_1x+C_2x^2+\cdots

The two recurrence relations together can then be summarized in generating function form by the relation

c^2(x)=C_0C_0+(C_1C_0+C_0C_1)x+(C_2C_0+C_1C_1+C_0C_2)x^2+\cdots

c^2(x)=C_1+C_2x+C_3x^2+\cdots

c(x)=1+xc(x)^2

c(x) = \frac{1-\sqrt{1-4x}}{2x}


\sqrt{1-4x}=\left(1-4x\right)^{1/2}=\sum_{n\ge 0}\binom{1/2}n(-4x)^n

\begin{aligned} =\sum_{n\ge 0}\frac{\left(\frac12\right)\left(-\frac12\right)\left(-\frac32\right)\dots\left(-\frac{2n-3}2\right)}{n!}(-4x)^n\\ =\sum_{n\ge 0}(-1)^{n-1}\frac{(2n-3)!!}{2^nn!}(-4x)^n\\ =-\sum_{n\ge 0}\frac{2^n(2n-3)!!}{n!}x^n\\ =-2\sum_{n\ge 0}\frac{2^{n-1}\prod_{k=1}^{n-1}(2k-1)}{n(n-1)!}x^n\\ \end{aligned}


\begin{aligned} =-2\sum_{n\ge 0}\frac{2^{n-1}(n-1)!\prod_{k=1}^{n-1}(2k-1)}{n(n-1)!^2}x^n\\ =-2\sum_{n\ge 0}\frac{\left(\prod_{k=1}^{n-1}(2k)\right)\left(\prod_{k=1}^{n-1}(2k-1)\right)}{n(n-1)!^2}x^n\\ =-2\sum_{n\ge 0}\frac{(2n-2)!}{n(n-1)!^2}x^n\\ =-2\sum_{n\ge 0}\frac1n\binom{2n-2}{n-1}x^n, \end{aligned}


\begin{aligned} c(x)\\ =\frac1{2x}\left(1+2\left(-\frac12+\sum_{n\ge 1}\frac1{n}\binom{2(n-1)}{n-1}x^n\right)\right)\\ =\sum_{n\ge 1}\frac1n\binom{2(n-1)}{n-1}x^{n-1}\\ =\sum_{n\ge 0}\frac1{n+1}\binom{2n}nx^n. \end{aligned}

通项公式

The formula of Catalan numbers

C_n = \frac{1}{n+1}{2n\choose n}


Figure 1: Counting Monotonic lattice paths using Path Reflection

The expression for C_n is

C_n = {2n\choose n} - {2n\choose n+1} = {\frac{1}{n+1}}{2n\choose n}


Figure 2: One can count the balanced parentheses by “0” -> “(”, “1” -> “)

Figure 3: Rooted binary trees with n internal nodes

明安图

Figure 4: Ming An tu (1692-1763) first established and used what was later to be known as Catalan numbers in 1730.

卡特兰数列表

 [1]          1          2          5         14         42        132
 [7]        429       1430       4862      16796      58786     208012
[13]     742900    2674440    9694845   35357670  129644790  477638700
[19] 1767263190 6564120420