A - Divide Grid 解説 by evima
First, fill the upper-left and lower-right as follows:
0000X
000X1
00X11
0X111
X1111
Then, if we alternately fill the X parts with \(0\) and \(1\), the condition is satisfied. For the proof, it suffices to show that “the sum of the numbers of paths from X that became \(0\) to somewhere in the upper-left” equals “the sum of the numbers of paths from X that became \(1\) to somewhere in the lower-right”.
If we allow not moving at all, the number of paths from cell \((i,N-i+1)\) to somewhere in the lower-right is \(\sum_{a=0}^{i-1} \sum_{b=0}^{N-i} \binom{a+b}{a}\). This becomes the problem “How many ways are there to choose at most \(i-1\) and \(N-i\) copies of \(0\) and \(1\) and arrange them?” The answer to this problem is \(\binom{N+1}{i} - 1\) by the correspondence “arrange \(i\) and \(N-i+1\) copies of \(0\) and \(1\) freely, then remove the last two blocks consisting of the same value from the back”. (The \(-1\) accounts for the fact that we cannot distinguish between 000011 and 110000.)
Thus, by excluding the path that does not move at all, the number of paths from cell \((i,N-i+1)\) to somewhere in the lower-right is \(\binom{N+1}{i} - 2\). Also, the number of paths from \((i,N-i+1)\) to somewhere in the upper-left equals this value.
We show \(f(0) = f(1)\). This is trivial when \(N\) is even, so consider when \(N\) is odd. Basically, \(\binom{N+1}{i}\) are divided into those with even \(i\) and those with odd \(i\), so the values are equal. Since there are no parts for \(i=0,N+1\), the even side has \(2\) less, and then the \(-2\) part is subtracted one more time on the odd side, so they cancel out, resulting in \(f(0) = f(1)\).
投稿日時:
最終更新: