Topics
Catalan numbers are a fascinating sequence of numbers appearing in various counting problems in combinatorics. One of the most intuitive ways to understand and derive the formula for Catalan numbers is through the lens of grid paths.
Imagine an grid, starting from coordinate at the bottom-left and ending at at the top-right. We are interested in paths from to that only move right (R) or up (U), often called monotonic paths. Each such path consists of exactly right steps and up steps, making a total of steps.
1. Counting All Paths
First, let’s determine the total number of monotonic paths from to without any restrictions. We have steps in total, and we need to choose of them to be right steps (or equivalently, to be up steps). The number of ways to do this is given by the binomial coefficient:
2. Defining “Good” and “Bad” Paths
Now, let’s introduce a condition. We are interested in paths that do not go above the main diagonal, the line connecting to , which is given by the equation . A “good” path is a monotonic path from to that stays on or below the main diagonal. A “bad” path, on the other hand, is a monotonic path from to that crosses above the main diagonal, meaning it goes above the line at some point. Our goal is to count the number of “good” paths, which is given by the Catalan numbers.
3. The Reflection Principle: Mapping Bad Paths
To count “good” paths, we will use a clever trick to count “bad” paths instead, and then subtract this count from the total number of paths. The reflection principle provides a beautiful way to count “bad” paths.
Consider a “bad” path. Since it starts at (where ) and ends at (where ), and it crosses above the main diagonal, it must at some point touch the line , which is the diagonal just above the main diagonal. Let’s find the first point where a “bad” path touches the line . Let’s call this point .
Now, for the portion of the path after this point , we perform a reflection across the line . What does this reflection do? Whenever the original path takes a right step (R), the reflected path takes an up step (U), and whenever the original path takes an up step (U), the reflected path takes a right step (R). In essence, for every step after point , we swap right steps with up steps and vice versa.
4. Understanding the Reflected Path’s Endpoint
Let’s analyze where this reflection takes us. Suppose the point is (since it lies on ). Consider the portion of the “bad” path from to . Let’s break it into two parts: the part before and the part from to . The part before remains unchanged. We only reflect the part after .
Let’s think about the number of steps in the reflected portion. Suppose from to , the original “bad” path had right steps and up steps. Then, in the reflected path, this portion will have right steps and up steps. The total number of steps in the portion from to is still .
Crucially, when we reflect the path after the first touch at , consider the number of right and up steps. In the original “bad” path from to , there are right steps and up steps in total. Let’s analyze the section of the path before the first touch of at point . To reach from staying below or on , we must have taken some number of right steps and up steps. At point , the x-coordinate is and y-coordinate is . So to reach , we have taken right steps and up steps in the part of the path before .
For a “bad” path, before reflection up to point :
- Number of right steps =
- Number of up steps =
- Total steps to .
Remaining steps from to in the original “bad” path:
- Number of remaining right steps =
- Number of remaining up steps =
- Number of reflected right steps =
- Number of reflected up steps =
So the endpoint of the reflected path will be:
x-coordinate: (x-coordinate of ) + (Number of reflected right steps) =
y-coordinate: (y-coordinate of ) + (Number of reflected up steps) =
Therefore, every “bad” path from to is transformed into a path from to .
Black diagonal: . red diagonal: . The invalid portion of the path (dotted red) is flipped (solid red). Bad paths (after the flip) reach instead of .
5. Bijection and Reversibility
The reflection establishes a bijection because every monotonic path from to is guaranteed to touch the higher diagonal . This is because such paths start with and end with , requiring a passage through . Also, the reflection process itself is reversible; applying it twice brings us the original path. Therefore, this reflection creates a one-to-one correspondence between the set of “bad” paths in the grid and the set of all monotonic paths in the grid.
6. Counting Bad Paths and Catalan Numbers
The number of monotonic paths from to is:
Recall that the total number of monotonic paths from to is . The number of “good” paths (Catalan numbers, ) is the total number of paths minus the number of “bad” paths:
We can simplify this expression:
Thus, the -th Catalan number is given by the formula: