Let $c_n$ be a sequence which is defined recursively as follows: $c_0 = 1$, $c_{2n+1} = c_n$ for $n \geq 0$, and $c_{2n} = c_n + c_{n-2^e}$ for $n > 0$ where $e$ is the maximal nonnegative integer such that $2^e$ divides $n$. Prove that \[\sum_{i=0}^{2^n-1} c_i = \frac{1}{n+2} {2n+2 \choose n+1}.\]
Problem
Source: USA TST 2011 P5
Tags: induction, modular arithmetic, function, limit, algebra, polynomial, binomial theorem
28.07.2011 22:55
According to property (m) of the Catalan numbers in Richard Stanley's Exercises on Catalan and Related Numbers, the $n+1$-th Catalan number $C_{n+1}$ equals the number of unordered pairs of lattice paths with $n$ steps each, starting at $\left(0,0\right)$, using steps $\left(0,1\right)$ and $\left(1,0\right)$, ending at the same point, such that one path never arises above the other path. If we define an $\ell_n$-path to mean a lattice path with $n$ steps, starting at $\left(0,0\right)$, using steps $\left(0,1\right)$ and $\left(1,0\right)$, then this rewrites as follows: $C_{n+1}$ equals the number of unordered pairs of $\ell_n$-paths ending at the same point, such that one path never arises above the other path. Let us reformulate this with ordered pairs (instead of unordered ones): $C_{n+1}$ equals the number of ordered pairs $\left(p,q\right)$ of $\ell_n$-paths ending at the same point, such that the path $q$ never rises above the path $p$. In other words, (1) $C_{n+1} = \sum\limits_{p\text{ is an }\ell_n\text{-path}} \left(\text{number of }\ell_n\text{-paths ending at the same point as }p\text{ and never arising above }p\right)$. Now, we notice that we can encode an $\ell_n$-path as a binary string of length $n$, namely by scanning it from right to left and coding every $\left(0,1\right)$ step as $0$ and every $\left(1,0\right)$ step as $1$. This binary string, then, can be seen as the binary representation of some $i\in\left\{0,1,...,2^n-1\right\}$. Thus we have got a bijection between $\ell_n$-paths and elements of $\left\{0,1,...,2^n-1\right\}$. If $i$ denotes the element of $\left\{0,1,...,2^n-1\right\}$ corresponding to a given $\ell_n$-path $p$, then it turns out that $c_i$ is the number of $\ell_n$-paths ending at the same point as $p$ and never arising above $p$. This is proven by induction over $i$ (more precisely, by the kind of induction where you assume something holds for $i$ and conclude that it holds for $2i$ and $2i+1$ as well). I won't go into details for now. Anyway, this solves the problem, as it transforms (1) into the claim of the problem. I am wondering whether this is the proposed solution, and how property (m) of the Catalan numbers is proven. (Then again, I could probably look this up in Stanley...)
29.07.2011 00:25
Your solution resembles the proposed one as far as it being a bijection. I don't think anyone who solved the problem gave a solution that wasn't one, but pretty much everyone's was different. Yours too; I never saw one using that method of counting the Catalan numbers. Here's what I thought was a very clean method: We use the bijection from number of $n$ balanced pairs of parentheses to $C_n$. Write $i$ in binary as $\overline{d_1 d_2 \ldots d_n}$, adding leading zeroes if necessary. We claim that $c_i$ counts the number of balanced pairs of $n+1$ parentheses such that for $k = 1, \ldots n$, the $2k$th parenthesis is open if $d_k = 1$ and closed otherwise. For $c_0$, we are given that the parenthesis in positions $2, 4, \ldots 2n$ are all closed, and position $2n+2$ also has a closed parenthesis. Thus all $n+1$ closed parentheses are specified, and filling the remaining spaces with open parentheses gives a valid expression. So $c_0 = 1$. Next, we wish to show $c_{2n+1} = c_n$. Consider an arbitrary expression counted by $c_{2n+1}$. The $2n$th, or 3rd to last, parenthesis is open, and the only way for this to be balanced is to end in $\ldots())$. Take the $()$ in positions $2n, 2n+1$ and move it to the beginning of the expression. This places a $)$ in the second position and shifts all other parentheses except the last over by 2, and this corresponds exactly to a valid expression for $c_n$. The inverse operation is easy to write down, so this is a bijection. Now consider $c_{2n}$ for $n > 0$. Consider the last 1 in the binary expansion of $2n$, corresponding to the last $($ in an even-numbered position. By assumption the parenthesis two to its right is closed, so we have $\ldots(?)\ldots$. a) If the $?$ is $($, take it with the $)$ to its right and move them to the beginning. This gets us a valid expression for $c_n$, and is also invertible. b) If the $?$ is $)$, take it with the $($ to its left and move them to the beginning. This gets us a valid expression for $c_{n-2^e}$ where $2^e$ is the maximal power of 2 dividing $n$ because we took the last 1 in the binary expansion. It is also invertible given $e$. So $c_{2n} = c_n + c_{n-2^e}$. The work above proves our claim about what the $c_i$ count. If we sum $c_i$ from $0$ to $2^n - 1$, we get all possible expressions of $n+1$ balanced pairs of parentheses, equal to $C_{n+1}$, which completes the proof. EDIT re below: Yes, you're right, I flipped things around in the base case. It's been fixed now. Thanks.
29.07.2011 22:28
MellowMelon wrote: For $c_0$, we are given that the parenthesis in positions $2, 4, \ldots 2n$ are all open, and position 1 also has an open parenthesis. Thus all $n+1$ open parentheses are specified, and filling the remaining spaces with closed parentheses gives a valid expression. So $c_0 = 1$. Shouldn't this rather be: For $c_0$, we are given that the parenthesis in positions $2, 4, \ldots 2n$ are all closed, and position $2n+2$ also must have a closed parenthesis. Thus all $n+1$ closed parentheses are specified, and filling the remaining spaces with open parentheses gives a valid expression. So $c_0 = 1$. Nice proof - so I now do know how to prove property (m) of the Catalan numbers
29.07.2011 22:39
Quote: I don't think anyone who solved the problem gave a solution that wasn't one, but pretty much everyone's was different. So I guess my progress was not really counted as a solution. (I did everything the same until I said "use the general Leibniz rule"; instead, I said "we can use the binomial theorem and the recurrence for Catalan numbers to finish"... oops?)
14.08.2011 13:21
This problem was proposed by me. My first solution uses a bijection counting some kinds of lattice paths, and second solution calculates the sum algebraically.
15.09.2011 02:44
Zhero wrote:
There's a (small, I guess, depending on your intuition?) issue with this: $v_2(0)=\infty$, so $c_0$ is only included in $s_{n,\infty}$. For example, we actually have $s_{0,0}=0$, not $s_{0,0}=1$. But the method is sound, and a little tweaking works...
16.07.2023 16:09
The number $\frac{1}{n+2}{2n+2 \choose n+1}$ is the $n+1$-th Catalan number, which is equal to the cardinality of $$X:=\{(x_0,x_1,\dots, x_{n+1})\in \mathbb{Z}^{n+2}\mid 0=x_0\leq x_1\leq \dots \leq x_{n+1}=n+1, \quad x_i\leq i \quad \text{for} \quad 0\leq i\leq n+1\}$$ Write each integer $0\leq i\leq 2^n-1$ in binary as an $n$-digit $0-1$ code. For any $0-1$ code $\alpha$ we process it the following way: If it ends with $1$, we delete the $1$; otherwise we either delete the $0$ at the end, or we change the last $1$ to $0$, then delete $0$ at the end. Observe that this fashion of deleting actually represents $2n+1 \to n$ as well as $2n \to n$ and $2n \to n-2^e$. For each element of $\{0,1\}^n$ we delete it as stated, after $n$ steps it would be fully redacted. Write the $n$ $0-1$ codes in the progress from right to left. We claim that $c_i$ equals to the number of different ways that the binary code of $i$ can be deleted. The claim is easily proved with induction. Now all we have to do is to find a bijection between $X$ and the ways to delete all $n$-digit codes $\mathcal{C}$. Instead of looking at the ways the codes are getting deleted, we look at how that are constructed. It is easy to see that the way of constructing is as follow: First start with nothing (step $0$). In each step, we either put a $0$ at the end, or we put a $1$ anywhere after the last $1$. Keep adding $0$ or $1$ until we reach $n$ digits. Now given a method of constructing $\Sigma\in \mathcal{C}$, in step $i$ there are $h_i$ zeros at the end of the code for $1\leq k\leq n$. We consider the vector $\Psi(\Sigma):=(0,1-h_1,2-h_2,\dots,n-h_n, n+1)$. It is not so hard to check that $\Psi: \mathcal{C}\to X$ is a bijection. Hence the equality is proved.