Jump to content

Catalan number

From Wikipedia, the free encyclopedia

Template:Short description Template:Distinguish Template:Use American English

File:Noncrossing partitions 5.svg
The Template:Math noncrossing partitions of a 5-element set (below, the other 10 of the 52 partitions)

In 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 Eugène Catalan, though they were previously discovered in the 1730s by Minggatu.

The Template:Tmath-th Catalan number can be expressed directly in terms of central binomial coefficients by

<math display="block">C_n = \frac{1}{n+1}{2n\choose n} = \frac{(2n)!}{(n+1)!\,n!} \qquad\text{for }n\geq 0.</math>

The first few Catalan numbers are

<math>1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, \dots</math>

(sequence A000108 in the OEIS).

Properties

An alternative expression for Template:Tmath is <math display="block">C_n = \binom{2n}{n} - \binom{2n}{n+1} \quad \text{for } n\geq 0,</math> which is equivalent to the expression given above because <math display="inline">\binom{2n}{n+1}=\frac{n}{n+1}\binom{2n}n</math>. This expression notably shows that Template:Tmath is an integer, which is not immediately obvious from the first formula. This expression forms the basis for a proof of the correctness of the formula.

Another alternative expression is <math display="block">C_n = \frac{1}{2n+1} \binom{2n+1}{n}\,,</math> which can be directly interpreted in terms of the cycle lemma; see below.

The Catalan numbers satisfy the recurrence relations <math display="block">C_0 = 1 \quad \text{and} \quad C_{n}=\sum_{i=1}^{n}C_{i-1}C_{n-i}\quad\text{for }n > 0</math> and <math display="block">C_0 = 1 \quad \text{and} \quad C_{n} = \frac{2(2n-1)}{n+1}C_{n-1}\quad\text{for }n > 0.</math>

Asymptotically, the Catalan numbers grow as <math display=block>C_n \sim \frac{4^n}{n^{3/2}\sqrt{\pi}}\,,</math> in the sense that the quotient of the Template:Tmathth Catalan number and the expression on the right tends towards 1 as Template:Tmath approaches infinity. This can be proved by using the asymptotic growth of the central binomial coefficients, by Stirling's approximation for Template:Tmath, or via generating functions.

The only odd Catalan numbers Template:Tmath are those for which Template:Math; all others are even. The only prime Catalan numbers are Template:Math and Template:Math.[1] More generally, the multiplicity with which a prime Template:Tmath divides Template:Math can be determined by first expressing Template:Math in base Template:Tmath. For <math>p=2</math>, the multiplicity is the number of 1 bits, minus 1. For Template:Tmath an odd prime, count all digits greater than <math>\tfrac{p+1}{2}</math>; also count digits equal to <math>\tfrac{p+1}{2}</math> unless final; and count digits equal to <math>\tfrac{p-1}{2}</math> if not final and the next digit is counted.[2] The only known odd Catalan numbers that do not have last digit 5 are Template:Math, Template:Math, Template:Math, Template:Math, Template:Math and Template:Math. The odd Catalan numbers, Template:Math for Template:Math, do not have last digit 5 if Template:Math has a base 5 representation containing 0, 1 and 2 only, except in the least significant place, which could also be a 3.[3]

The Catalan numbers have the integral representations[4][5]

<math display="block">C_n=\frac {1}{2\pi}\int_0^4 x^n\sqrt{\frac{4-x}{x}}\,dx\, =\frac{2}{\pi}4^n\int_{-1}^{1} t^{2n}\sqrt{1-t^2}\,dt. </math> which immediately yields <math display="block">\sum_{n=0}^\infty \frac{C_n}{4^n} = 2.</math>

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 Template:Math is Template:Math. Since the one-dimensional random walk is recurrent, the probability that the walker eventually arrives at −1 is <math display="block">\sum_{n=0}^\infty \frac{C_n}{2^{2n+1}} = 1.</math>

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 Template:Math and Template:Math.

File:Dyck lattice D4.svg
Lattice of the 14 Dyck words of length 8 – Template:Mvar and Template:Mvar interpreted as up and down

Template:Flowlist

  • Re-interpreting the symbol X as an opening parenthesis and Y as a closing parenthesis, Template:Math counts the number of expressions containing Template:Mvar pairs of parentheses which are correctly matched. For instance, for Template:Math these are

Template:Hlist

Template:Hlist

File:Catalan 4 leaves binary tree example.svg
File:Tamari lattice, trees.svg
The associahedron of order 4 with the C4=14 full binary trees with 5 leaves
The following diagrams show the case Template:Math:

File:Catalan number 4x4 grid example.svg
This can be represented by listing the Catalan elements by column height:[8]

Template:Flowlist

File:Tamari lattice, hexagons.svg
The dark triangle is the root node, the light triangles correspond to internal nodes of the binary trees, and the green bars are the leaves.
File:Catalan-Hexagons-example.svg
File:Catalan stairsteps 4.svg
123   124   125   134   135
456   356   346   256   246
  • Template:Math is the number of length Template:Mvar sequences that start with 1, and can increase by either 0 or 1, or decrease by any number (to at least 1). For Template:Math these are 1234, 1233, 1232, 1231, 1223, 1222, 1221, 1212, 1211, 1123, 1122, 1121, 1112, 1111. From a Dyck path, start a counter at 0. An X increases the counter by 1 and a Y decreases it by 1. Record the values at only the X's. Compared to the similar representation of the Bell numbers, only 1213 is missing.

Proof of the formula

There are several ways of explaining why the formula <math display="block">C_n = \frac{1}{n+1}{2n\choose n}</math> solves the combinatorial problems listed above. The first proof below uses a generating function. The other proofs are examples of bijective proofs; they involve literally counting a collection of some kind of object to arrive at the correct formula.

First proof

We first observe that all of the combinatorial problems listed above satisfy Segner's[9] recurrence relation

<math display="block">C_0 = 1 \quad \text{and} \quad C_{n+1}=\sum_{i=0}^n C_i\,C_{n-i} \quad \text{for } n\ge 0 \,.</math>

For example, every Dyck word Template:Mvar of length 2 or more can be written in a unique way in the form

Template:Math

with (possibly empty) Dyck words Template:Math and Template:Math.

The generating function for the Catalan numbers is defined by

<math display="block">c(x)=\sum_{n=0}^\infty C_n x^n \,.</math>

The recurrence relation given above can then be summarized in generating function form by the relation

<math display="block">c(x)=1+xc(x)^2 \,;</math>

in other words, this equation follows from the recurrence relation by expanding both sides into power series. On the one hand, the recurrence relation uniquely determines the Catalan numbers; on the other hand, interpreting Template:Math as a quadratic equation of Template:Mvar and using the quadratic formula, the generating function relation can be algebraically solved to yield two solution possibilities

<math display="block">c(x) = \begin{cases} \dfrac{1+\sqrt{1-4x}}{2x} \\[4px] \dfrac{1-\sqrt{1-4x}}{2x} \end{cases}\,.</math>

From the two possibilities, the second must be chosen because only the second gives

<math display="block">C_0 = \lim_{x \to 0} c(x) = 1 \,.</math>

The square root term can be expanded as a power series using the binomial series

<math display=block> \begin{align} 1 - \sqrt{1-4x} & = -\sum_{n=1}^{\infty} \binom{\frac12}{n}(-4x)^{n} = -\sum_{n=1}^{\infty} \frac{(-1)^{n-1}(2n-3)!!}{2^{n}n!}(-4x)^{n} \\[6px] &= -\sum_{n=0}^{\infty} \frac{(-1)^n(2n-1)!!}{2^{n+1}(n+1)!}(-4x)^{n+1} = \sum_{n=0}^{\infty} \frac{2^{n+1}(2n-1)!!}{(n+1)!}x^{n+1} \\[6px] & = \sum_{n=0}^{\infty} \frac{2(2n)!}{(n+1)!n!}x^{n+1} = \sum_{n=0}^{\infty} \frac{2}{n+1} \binom{2n}{n}x^{n+1}\,. \end{align} </math> Thus, <math display=block> c(x) = \frac{1-\sqrt{1-4x}}{2x} = \sum_{n=0}^{\infty} \frac{1}{n+1} \binom{2n}{n}x^{n}\,. </math>

Second proof

{{#invoke:Labelled list hatnote|labelledList|See also|ifexists=true}}

File:Catalan number-path reflection.svg
Figure 1. The invalid portion of the path (dotted red) is flipped (solid red). Bad paths (after the flip) reach Template:Math instead of Template:Math.

Call a bad path one that starts at Template:Math, ends at Template:Math, is monotonic, and contains a point above the line Template:Math. We count the number of bad paths by establishing a bijection with paths that start at Template:Math, end at Template:Math, and are monotonic.

For a given bad path, construct a reflected path as follows. Let Template:Mvar be the first point on the bad path intersecting the line Template:Math. The bad path from Template:Math to Template:Mvar is the beginning of the reflected path. The part of the bad path from Template:Mvar to Template:Math reflected across the line Template:Math is the rest of the reflected path. See the illustration for an example. The black line is the points shared between the two paths, the dotted red line is the rest of the bad path, the solid red line is the rest of the reflected path.

This is a bijection because every monotonic path from Template:Math to Template:Math is constructable from a bad path, and every reflected path is uniquely invertible by finding the unique point Template:Mvar, which must exist because every such path must intersect Template:Math.

The number of steps in the reflected path is Template:Math. The number of upward steps is Template:Math because the path is monotonic and starts at Template:Math and ends at Template:Math.

The number of reflected paths can be counted in the usual way, by counting how many way upward steps may be distributed among total steps, which is <math display="inline">\binom{2n}{n+1}</math>, and the number of Catalan paths (good paths) is obtained by removing the number of bad paths from the total number of monotonic paths of the original grid,

<math display="block">C_n = \binom{2n}{n} - \binom{2n}{n+1} = \binom{2n}{n} - \frac{n}{n+1}\binom{2n}{n} = \frac{1}{n+1}\binom{2n}{n}.</math>

This proof can be restated in terms of Dyck words. We start with a (non-Dyck) sequence of Template:Mvar Xs and Template:Mvar Ys and interchange all Xs and Ys after the first Y that violates the Dyck condition.

Third proof

This bijective proof provides a natural explanation for the term Template:Math appearing in the denominator of the formula for Template:Math. A generalized version of this proof can be found in a paper of Rukavicka (2011).[10]

File:Catalan number exceedance example.png
Figure 2. A path with exceedance 5.

Given a monotonic path, the exceedance of the path is defined to be the number of vertical edges above the diagonal. For example, in Figure 2, the edges above the diagonal are marked in red, so the exceedance of this path is 5.

Given a monotonic path whose exceedance is not zero, we apply the following algorithm to construct a new path whose exceedance is Template:Math less than the one we started with.

  • Starting from the bottom left, follow the path until it first travels above the diagonal.
  • Continue to follow the path until it touches the diagonal again. Denote by Template:Mvar the first such edge that is reached.
  • Swap the portion of the path occurring before Template:Mvar with the portion occurring after Template:Mvar.

In Figure 3, the black dot indicates the point where the path first crosses the diagonal. The black edge is Template:Mvar, and we place the last lattice point of the red portion in the top-right corner, and the first lattice point of the green portion in the bottom-left corner, and place Template:Mvar accordingly, to make a new path, shown in the second diagram.

File:Catalan number swapping example.png
Figure 3. The green and red portions are being exchanged.

The exceedance has dropped from 3 to 2. In fact, the algorithm causes the exceedance to decrease by Template:Math for any path that we feed it, because the first vertical step starting on the diagonal (at the point marked with a black dot) is the only vertical edge that changes from being above the diagonal to being below it when we apply the algorithm – all the other vertical edges stay on the same side of the diagonal.

File:Catalan number algorithm table.png
Figure 4. All monotonic paths in a 3 × 3 grid, illustrating the exceedance-decreasing algorithm.

It can be seen that this process is reversible: given any path Template:Mvar whose exceedance is less than Template:Mvar, there is exactly one path which yields Template:Mvar when the algorithm is applied to it. Indeed, the (black) edge Template:Mvar, which originally was the first horizontal step ending on the diagonal, has become the last horizontal step starting on the diagonal. Alternatively, reverse the original algorithm to look for the first edge that passes below the diagonal.

This implies that the number of paths of exceedance Template:Mvar is equal to the number of paths of exceedance Template:Math, which is equal to the number of paths of exceedance Template:Math, and so on, down to zero. In other words, we have split up the set of all monotonic paths into Template:Math equally sized classes, corresponding to the possible exceedances between 0 and Template:Mvar. Since there are <math display="inline">\binom{2n}{n}</math> monotonic paths, we obtain the desired formula <math display="block">C_n = \frac{1}{n+1}\binom{2n}{n}.</math>

Figure 4 illustrates the situation for Template:Math. Each of the 20 possible monotonic paths appears somewhere in the table. The first column shows all paths of exceedance three, which lie entirely above the diagonal. The columns to the right show the result of successive applications of the algorithm, with the exceedance decreasing one unit at a time. There are five rows, that is Template:Math, and the last column displays all paths no higher than the diagonal.

Using Dyck words, start with a sequence from <math display="inline">\binom{2n}{n}</math>. Let Template:Math be the first Template:Mvar that brings an initial subsequence to equality, and configure the sequence as Template:Math. The new sequence is Template:Mvar.

Fourth proof

This proof uses the triangulation definition of Catalan numbers to establish a relation between Template:Math and Template:Math.

Given a polygon Template:Mvar with Template:Math sides and a triangulation, mark one of its sides as the base, and also orient one of its Template:Math total edges. There are Template:Math such marked triangulations for a given base.

Given a polygon Template:Mvar with Template:Math sides and a (different) triangulation, again mark one of its sides as the base. Mark one of the sides other than the base side (and not an inner triangle edge). There are Template:Math such marked triangulations for a given base.

There is a simple bijection between these two marked triangulations: We can either collapse the triangle in Template:Mvar whose side is marked (in two ways, and subtract the two that cannot collapse the base), or, in reverse, expand the oriented edge in Template:Mvar to a triangle and mark its new side.

Thus <math display="block">(4n+2)C_n = (n+2)C_{n+1}\,.</math>

Write <math display="block">\frac{4n-2}{n+1}C_{n-1} = C_n\,.</math>

Because

<math display="block">(2n)!=(2n)!!(2n-1)!! = 2^nn!(2n-1)!! \,,</math>

we have

<math display="block">\frac{(2n)!}{n!} = 2^n(2n-1)!! = (4n-2)!!!! \,.</math>

Applying the recursion with Template:Math gives the result.

Fifth proof

This proof is based on the Dyck words interpretation of the Catalan numbers, so Template:Mvar is the number of ways to correctly match Template:Mvar pairs of brackets. We denote a (possibly empty) correct string with Template:Mvar and its inverse with Template:Mvar. Since any Template:Mvar can be uniquely decomposed into Template:Math, summing over the possible lengths of Template:Math immediately gives the recursive definition <math display="block">C_0 = 1 \quad \text{and} \quad C_{n+1} = \sum_{i=0}^n C_i\,C_{n-i}\quad\text{for }n\ge 0</math>.

Let Template:Mvar be a balanced string of length Template:Math, i.e. Template:Mvar contains an equal number of Template:Math and Template:Math, so Template:Math. A balanced string can also be uniquely decomposed into either Template:Math or Template:Math, so

<math display="block">B_{n+1} = 2\sum_{i=0}^n B_i C_{n-i} \,.</math>

Any incorrect (non-Catalan) balanced string starts with Template:Math, and the remaining string has one more Template:Math than Template:Math, so <math display="block">B_{n+1} - C_{n+1} = \sum_{i=0}^n \binom{2i+1}{i} C_{n-i}</math>

Also, from the definitions, we have:

<math display="block">B_{n+1} - C_{n+1} = 2\sum_{i=0}^n B_i C_{n-i} - \sum_{i=0}^n C_i\,C_{n-i} = \sum_{i=0}^n (2B_i-C_i) C_{n-i} \,.</math>

Therefore, as this is true for all Template:Mvar,

<math display="block">\begin{align} 2B_i - C_i &= \binom{2i+1}{i} \\[6px] C_i &= 2B_i - \binom{2i+1}{i} \\[6px] &= 2\binom{2i}{i} - \binom{2i+1}{i} \\[6px] &= \frac{1}{i+1} \binom{2i}{i} \,. \end{align}</math>

Sixth proof

This proof is based on the Dyck words interpretation of the Catalan numbers and uses the cycle lemma of Dvoretzky and Motzkin.[11][12]

We call a sequence of Xs and Ys dominating if, reading from left to right, the number of Xs is always strictly greater than the number of Ys. The cycle lemma[13] states that any sequence of Template:Mvar Xs and Template:Mvar Ys, where Template:Math, has precisely Template:Math dominating circular shifts. To see this, arrange the given sequence of Template:Math Xs and Ys in a circle. Repeatedly removing XY pairs leaves exactly Template:Math Xs. Each of these Xs was the start of a dominating circular shift before anything was removed. For example, consider XXYXY. This sequence is dominating, but none of its circular shifts XYXYX, YXYXX, XYXXY and YXXYX are.

A string is a Dyck word of Template:Mvar Xs and Template:Mvar Ys if and only if prepending an X to the Dyck word gives a dominating sequence with Template:Math Xs and Template:Mvar Ys, so we can count the former by instead counting the latter. In particular, when Template:Math, there is exactly one dominating circular shift. There are <math display="inline">\binom{2n+1}{n}</math> sequences with exactly Template:Math Xs and Template:Mvar Ys. For each of these, only one of the Template:Math circular shifts is dominating. Therefore there are Template:Math distinct sequences of Template:Math Xs and Template:Mvar Ys that are dominating, each of which corresponds to exactly one Dyck word.

Hankel matrix

The Template:Math Hankel matrix whose Template:Math entry is the Catalan number Template:Math has determinant 1, regardless of the value of Template:Mvar. For example, for Template:Math we have <math display="block">\det\begin{bmatrix}1 & 1 & 2 & 5 \\ 1 & 2 & 5 & 14 \\ 2 & 5 & 14 & 42 \\ 5 & 14 & 42 & 132\end{bmatrix} = 1.</math>

Moreover, if the indexing is "shifted" so that the Template:Math entry is filled with the Catalan number Template:Math then the determinant is still 1, regardless of the value of Template:Mvar. For example, for Template:Math we have <math display="block">\det\begin{bmatrix}1 & 2 & 5 & 14 \\ 2 & 5 & 14 & 42 \\ 5 & 14 & 42 & 132 \\ 14 & 42 & 132 & 429 \end{bmatrix} = 1.</math>

Taken together, these two conditions uniquely define the Catalan numbers.

Another feature unique to the Catalan–Hankel matrix is that the Template:Math submatrix starting at Template:Math has determinant Template:Math.

<math display="block">\det\begin{bmatrix} 2 \end{bmatrix} = 2</math>

<math display="block">\det\begin{bmatrix} 2 & 5 \\5 & 14 \end{bmatrix} = 3</math>

<math display="block">\det\begin{bmatrix} 2 & 5 & 14\\5 & 14 & 42\\ 14 & 42 & 132\end{bmatrix} = 4</math>

<math display="block">\det\begin{bmatrix} 2 & 5 & 14 & 42 \\ 5 & 14 & 42 & 132 \\ 14 & 42 & 132 & 42 9\\ 42 & 132 & 429 & 1430\end{bmatrix} = 5</math>

et cetera.

History

File:Mingantu's Catalan numbers.JPG
Catalan numbers in Mingantu's book The Quick Method for Obtaining the Precise Ratio of Division of a Circle volume III

The Catalan sequence was described in 1751 by Leonhard Euler, who was interested in the number of different ways of dividing a polygon into triangles. The sequence is named after Eugène Charles Catalan, who discovered the connection to parenthesized expressions during his exploration of the Towers of Hanoi puzzle. The reflection counting trick (second proof) for Dyck words was found by Désiré André in 1887.

The name “Catalan numbers” originated from John Riordan.[14]

In 1988, it came to light that the Catalan number sequence had been used in China by the Mongolian mathematician Mingantu by 1730, when he started to write his book Ge Yuan Mi Lu Jie Fa [The Quick Method for Obtaining the Precise Ratio of Division of a Circle], which was completed by his student Chen Jixin in 1774 but published sixty years later.[15][16] Peter J. Larcombe (1999) sketched some of the features of the work of Mingantu, including the stimulus of Pierre Jartoux, who brought three infinite series to China early in the 1700s.

For instance, Mingantu used the Catalan sequence to express series expansions of <math>\sin(2 \alpha)</math> and <math>\sin(4 \alpha)</math> in terms of <math>\sin(\alpha)</math>.

Generalizations

The Catalan numbers can be interpreted as a special case of the Bertrand's ballot theorem. Specifically, <math>C_n</math> is the number of ways for a candidate A with Template:Math votes to lead candidate B with Template:Mvar votes.

The two-parameter sequence of non-negative integers <math>\frac{(2m)!(2n)!}{(m+n)!m!n!}</math> is a generalization of the Catalan numbers. These are named super-Catalan numbers, per Ira Gessel. These should not confused with the Schröder–Hipparchus numbers, which sometimes are also called super-Catalan numbers.

For <math>m=1</math>, this is just two times the ordinary Catalan numbers, and for <math>m=n</math>, the numbers have an easy combinatorial description. However, other combinatorial descriptions are only known[17] for <math>m=2, 3</math> and <math>4</math>,[18] and it is an open problem to find a general combinatorial interpretation.

Sergey Fomin and Nathan Reading have given a generalized Catalan number associated to any finite crystallographic Coxeter group, namely the number of fully commutative elements of the group; in terms of the associated root system, it is the number of anti-chains (or order ideals) in the poset of positive roots. The classical Catalan number <math>C_n</math> corresponds to the root system of type <math>A_n</math>. The classical recurrence relation generalizes: the Catalan number of a Coxeter diagram is equal to the sum of the Catalan numbers of all its maximal proper sub-diagrams.[19]

The Catalan numbers are a solution of a version of the Hausdorff moment problem.[20]

For coprime positive integers Template:Mvar and Template:Mvar, the rational Catalan numbers <math>\frac{1}{r+s} \binom{r+s}{r}</math> count the number of lattice paths with steps of unit length rightwards and upwards from Template:Math to Template:Math that never go above the line Template:Math.[21]

Catalan k-fold convolution

The Catalan Template:Mvar-fold convolution is:

<math display="block">\sum_{i_1+\cdots+i_k=n\atop i_1,\ldots,i_k\ge 0} C_{i_1}\cdots C_{i_k} = \dfrac{k}{2n + k} \binom{2n+k}{n}</math>

See also

{{#invoke:Portal|portal}} Template:Div col

Template:Div col end

Notes

Template:Reflist

References

Template:Classes of natural numbers Template:Factorial and binomial topics Template:Authority control

  1. ↑ Template:Cite journal
  2. ↑ Template:Cite OEIS
  3. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
  4. ↑ Template:Citation, Example 3.1
  5. ↑ Template:Citation,Theorem 1
  6. ↑ Dyck paths
  7. ↑ Stanley p.221 example (e)
  8. ↑ Template:Cite journal
  9. ↑ Template:Cite journal
  10. ↑ Template:Cite journal
  11. ↑ Template:Citation
  12. ↑ Template:Citation
  13. ↑ Template:Cite journal
  14. ↑ Template:Cite arXiv
  15. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
  16. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
  17. ↑ Template:Cite arXiv
  18. ↑ Template:Cite arXiv
  19. ↑ Sergey Fomin and Nathan Reading, "Root systems and generalized associahedra", Geometric combinatorics, IAS/Park City Math. Ser. 13, American Mathematical Society, Providence, RI, 2007, pp 63–131. Template:Arxiv
  20. ↑ Template:Citation
  21. ↑ Template:Cite book