Sequences of $0$ and $1$

96 Views Asked by At

How many is sequences with length $4n$ which contain only $0$ and $1$.
$0$ occurs $2n$ times and $1$ occurs $2n$ times. Moreover number of occurs $0$ before $n$'th occur of $1$ can't be bigger than $n$

My attempt

I thought that I can use there generating functions. So let assume that we have put our $"1"$ and now we want to put $0$ between them.

$$[x^{2n}] (1+x)(1+x+x^2)\cdot...\cdot(1+x+x^2+...+x^{2n})$$ Each fraction represents how many zeros we can put before $i'th$ $1$.
$$[x^{2n}] \frac{(1-x^2)(1-x^4)...(1-x^{2n})}{(1-x)^{2n}}$$ $$[x^{2n}] (1-x^2)(1-x^4)...(1-x^{2n}) \cdot \sum_{0\le k}\binom{k+2n-1}{2n-1}x^k$$

But I don't know how I can find $[x^{2n}]$ there

1

There are 1 best solutions below

0
On BEST ANSWER

Hint: Consider the position of the nth 1. Should it be larger than or equal to $2n$?

Solution:

The position of nth 1 should not be larger than or equal to $2n$. Otherwise, among the first $2n-1$ elements, there are $n-1$ 1's and $n$ 0 s.

Then you can freely distribute the first $2n-1$ positions with $n$ 1's and $n - 1$ 0s. Now, I think you can derive the answer yourself.