generating function for the Catalan numbers
This article derives the formula
for the generating function for the Catalan numbers, given in the parent (http://planetmath.org/CatalanNumbers) article, in two different ways.
A Dyck path is a lattice path
in the Euclidean plane
from to whose steps are either or , i.e. either upwards diagonals or downwards diagonals, and which never goes below the -axis. Here are two Dyck paths:
If you rotate a Dyck path counterclockwise by and then reflect it in the line , the result is a lattice path from to that never goes above the diagonal. One can also think of such a path as a path from to that never touches or crosses the diagonal. As the article on ballot numbers (http://planetmath.org/LatticePathsAndBallotNumbers) explains, these paths are counted by the Catalan numbers, and thus the number of Dyck paths of length (or Dyck paths of semilength ) is equal to , the Catalan number.Note that any Dyck path has a unique decomposition as follows. Every Dyck path returns to the -axis at some point (possibly at its end). Split the path at the first such point. Then the original path consists of an up step (the first step of the path), an arbitrary (perhaps empty) Dyck path, a down step returning to the -axis, and then another arbitrary (perhaps empty) Dyck path.Considering the first example above, this decomposition looks like this:So a Dyck path is either empty, or consists of an up/down and two arbitrary Dyck paths. If one thinks about the lengths of the paths involved, it is clear that in terms of the generating function, we havesince a nonempty Dyck path of semilength consists of two Dyck paths the sum of whose semilengths is together with the unique Dyck path of semilength (the up-down steps).Solving this quadratic equation, we getand we must decide between the plus and minus sign. However, note that is a formal power series with only nonnegative powers of , and the expansion of starts with the constant term |