Dyck paths is Catalan

Tags: #theorem

Statement

The number of Dyck path of length 2n is equal to the Catalan numbers.

Below are three proofs:

Proof 1 (Generating functions)

First, we show the following relation:

Cn~=k=1nC~k1C~nk,C~0=1

Let's think about when the Dyck path first touches x-axis and call this 2k. Let's count the number of paths that first touches the x-axis at this point.

We can break this path into two parts left and right:

Summing over all possible k, we have C~n=k=1nC~k1C~nk as desired.

Now consider the generating function

f(x)=n=0C~nxn

fun fact: this power series converges for |x|<14

We now claim that f(x) satisfies the functional equation:

f=xf2+1

Now, we can use the quadratic equation to obtain the two solutions

f(x)=1±14x2x

To figure out which solution it is, note that f(0)=1.

Then (applying the generalized binomial theorem), we have

C~n=[xn]f(x)=12[xn+1](14x)1/2=12(1/2n+1)(4)n+1=1212(121)(12n)(4)n+1(n+1)!=121232522n124n+1(n+1)!=12n+1(2n)!2nn!4n+1(n+1)!=1n+1(2nn)

Proof 2 (reflection method)

We first notice that there are (2nn) number of paths from A=(0,0) to B=(2n,0). We'll call these paths lattice paths. We will count the number of non-Dyck paths, ie. the number of paths that intersect with the line y=1.

Suppose we have a non-Dyck path P. Let x be the first time it intersects with y=1. We construct the path P as follows:

20260204_133048.jpg

Now, we claim that this construction PP is a bijection between all non-Dyck paths AB and all lattice paths AB. We show this by exhibiting an inverse, which would be reflecting the directions again after we find x, the first time the path intersects with y=1.

Now there are (2nn1) ways of constructing lattice paths AB (pick n-1 ups, n+1 downs), so to obtain the number of Dyck paths, we have

C~n=(2nn)(2nn1)=2n(n+1)n!2n(n)(n+1)!=(2nn)(1nn+1)=1n+1(2nn)

as desired.

Proof 3 (cyclic shifts)

Motivation

First, we observe that

1n+1(2nn)=12n+1(2n+1n)

and we can interpret (2n+1n) as the number of lattice points with n up steps and n+1 down steps. In other words, paths from (0,0)(2n+1,1). The number of Dyck paths are equal to the number of lattice paths that go below the x-axis only at the last step. We'll call these paths Dyck- paths. We'll also denote up and down with + and - respectively.

We can cyclically shift the path:

This gives us 2n+1 different lattice paths (0,0)(2n+1,1).

Proof

We finish the proof if we can prove these two facts:

Since we can create an equivalence class of paths that can be obtained by cyclic shifting, which partition the space of all paths into classes of size n+1, and each of these equivalence classes has exactly one representative that is a Dyck- path. Thus, 1n+1 of the number of paths is a Dyck- path.

Mark the first (global) minimum as x. We claim that whenever we shift, the position of x decreases, unless x=1, then x becomes 2n+1.

For x>1, when we move the first segment to the end, the rest of the graph all gets shifted up or down one, so it follows that there is no point before x that is less than or equal to x (as we assumed that x is the first minimum), and there can't be a lower point after x as the last point will always be 1.

If x=1, then this means that the minimum is 1 and that the first move is down. When we move this move to the end, any other point that takes on a height -1 becomes 0. The only 1 is at the end.