I don't understand how to interpret the left side. You can look at it as constructing a binary string by setting the first n ones in the first n+k spots and then appending an arbitrary string of length n-k but this doesn't count strings with less than n ones and this overcounts some strings.
Asked
Active
Viewed 94 times
1
-
Look at the first $n+1$ ones in the first $n+k+1$, including the last one. They are not double counted any more. – Empy2 Feb 01 '25 at 11:36
1 Answers
4
Think about the binary strings of length $2n$ like this. Let $n+k+1$ be the first time there are $n+1$ '$0$'s or '$1$'s. This would mean that the $(n+k+1)^{th}$ element is exactly the element that has appeared $n+1$ times. Otherwise, it would not be the first time $n+1$ elements of this type has appeared. This could either be $0$ or $1$ ($2$ choices).
This means that $\binom{n+k}{n}$ is the number of ways of picking the other $n$ places where it appeared in the first $n+k$ positions ($\binom{n+k}{n}$ choices). The rest can be either $0$ or $1$, which gives $2^{n-k-1}$ choices.
We have not counted the case where both $0$ and $1$ appear exactly $n$ times. This is just $\binom{2n}{n}$. Summing gives us required identity.
Umesh Shankar
- 3,391
- 1
- 6
- 23
-
Is there a need to account for the 2 choices for which element appears n+1 times? – Grass Porridge Feb 01 '25 at 12:08
-
You're correct. The remaining only give $2^{n-k-1}$ choices. The choice is required. I have fixed my typo. – Umesh Shankar Feb 02 '25 at 04:23