My own attempt is as follows. I consider the bijection between trees with $n$ nodes and monotonic paths on a square grid $(n-1) times (n-1)$ from $(0,0)$ to $(n-1,n-1)$ which do not cross the diagonal (and are made of two kinds of steps: $uparrow$ and $rightarrow$). These paths are sometimes called Dyck paths or excursions. I can express now $B_{nh}$ in terms of lattice paths: it is the number of Dyck paths of length 2(n-1) and height greater than or equal to $h$. (Note: a tree of height $h$ is in bijection with a Dyck path of height $h-1$.) Without loss of generality, I assume that they start with $uparrow$ (hence stay above the diagonal). For each path, I consider the first step crossing the line $y = x + h – 1$, if any. From the point above, all the way back to the origin, I change $uparrow$ into $rightarrow$ and vice versa (this is a reflection wrt the line $y=x+h$). It becomes apparent that the paths I want to count ($B_{nh}$) are in bijection with the monotonic paths from $(-h,h)$ to $(n-1,n-1)$ which avoid the boundaries $y=x+2h+1$ and $y=x-1$. (See figure.)
In the classic book Lattice Path Counting and Applications by Mohanty (1979, page 6) the formula $$ sum_{k in mathbb{Z}} left[binom{m+n}{m-k(t+s)} – binom{m+n}{n+k(t+s)+t}right], $$ counts the number of monotonic paths in a lattice from $(0,0)$ to $(m,n)$, which avoid the boundaries $y = x – t$ and $y = x + s$, with $t > 0$ and $s > 0$. (This result was first established by Russian statisticians in the 50s.) Therefore, by considering a new origin at $(-h,h)$, we satisfy the conditions of the formula: $s=1$, $t=2h+1$ and the destination point (the upper right corner) is now $(n+h-1,n-h-1)$. Then $$ B_{nh} = sum_{k in mathbb{Z}} left[binom{2n-2}{n+h-1-k(2h+2)} – binom{2n-2}{n-h-1+k(2h+2) + 2h+1}right]. $$ This can be simplified in $$ B_{n+1,h-1} = sum_{k in mathbb{Z}} left[binom{2n}{n+1-(2k+1)h} – binom{2n}{n-(2k+1)h}right], $$ which, in turn, is equivalent to $$ B_{n+1,h-1} = sum_{k geqslant 0} left[binom{2n}{n+1-(2k+1)h} – 2binom{2n}{n-(2k+1)h} + binom{2n}{n-1-(2k+1)h}right]. $$ The difference with the expected formula is that I sum over the odd numbers ($2k+1$), instead of all positive integers ($k$). Any idea where the problem is?
Asked By : Christian
Answered By : FrankW
Best Answer from StackOverflow
Question Source : http://cs.stackexchange.com/questions/4777