In combinatorial mathematics, the Catalan numbers are a sequence of natural numbers that occur in various counting problems, often involving recursively defined objects. They are named after the French-Belgian mathematician Eugène Charles Catalan.

The nth Catalan number can be expressed directly in terms of the central binomial coefficients by

Catalan number

The first Catalan numbers for n = 0, 1, 2, 3, ... are

1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, ... .

Catalan number

Properties

An alternative expression for Cn is

for

which is equivalent to the expression given above because . This expression shows that Cn is an integer, which is not immediately obvious from the first formula given. This expression forms the basis for a proof of the correctness of the formula.

Catalan number

Another alternative expression is

which can be directly interpreted in terms of the cycle lemma; see below.

The Catalan numbers satisfy the recurrence relations

and

Asymptotically, the Catalan numbers grow as

in the sense that the quotient of the nth Catalan number and the expression on the right tends towards 1 as n approaches infinity.

This can be proved by using the asymptotic growth of the central binomial coefficients, by Stirling's approximation for , or via generating functions.

A more accurate asymptotic analysis shows that the Catalan numbers are approximated by the fourth order approximation

.

The only Catalan numbers Cn that are odd are those for which n = 2k − 1; all others are even. The only prime Catalan numbers are C2 = 2 and C3 = 5.

The Catalan numbers have the integral representations

which immediately yields .

This has a simple probabilistic interpretation. Consider a random walk on the integer line, starting at 0. Let -1 be a "trap" state, such that if the walker arrives at -1, it will remain there. The walker can arrive at the trap state at times 1, 3, 5, 7..., and the number of ways the walker can arrive at the trap state at time is . Since the 1D random walk is recurrent, the probability that the walker eventually arrives at -1 is .

Applications in combinatorics

There are many counting problems in combinatorics whose solution is given by the Catalan numbers. The book Enumerative Combinatorics: Volume 2 by combinatorialist Richard P. Stanley contains a set of exercises which describe 66 different interpretations of the Catalan numbers. Following are some examples, with illustrations of the cases C3 = 5 and C4 = 14.

Cn is the number of Dyck words of length 2n. A Dyck word is a string consisting of n X's and n Y's such that no initial segment of the string has more Y's than X's. For example, the following are the Dyck words up to length 6: XY XXYY XYXY XXXYYY XYXXYY XYXYXY XXYYXY XXYXYY Re-interpreting the symbol X as an open parenthesis and Y as a close parenthesis, Cn counts the number of expressions containing n pairs of parentheses which are correctly matched: ((())) (()()) (())() ()(()) ()()() Cn is the number of different ways n + 1 factors can be completely parenthesized (or the number of ways of associating n applications of a binary operator, as in the matrix chain multiplication problem). For n = 3, for example, we have the following five different parenthesizations of four factors: ((ab)c)d (a(bc))d (ab)(cd) a((bc)d) a(b(cd)) Successive applications of a binary operator can be represented in terms of a full binary tree, by labeling each leaf a,b,c,d. It follows that Cn is the number of full binary trees with n + 1 leaves, or, equivalently, with a total of n internal nodes:

Cn is the number of non-isomorphic ordered (or plane) trees with vertices. See encoding general trees as binary trees. For example, Cn is the number of possible parse trees for a sentence (assuming binary branching), in natural language processing. Cn is the number of monotonic lattice paths along the edges of a grid with n × n square cells, which do not pass above the diagonal. A monotonic path is one which starts in the lower left corner, finishes in the upper right corner, and consists entirely of edges pointing rightwards or upwards. Counting such paths is equivalent to counting Dyck words: X stands for "move right" and Y stands for "move up".

The following diagrams show the case n = 4:

This can be represented by listing the Catalan elements by column height: