How many bitstrings of length n contain an equal number of zeros and ones?
Progress
Does $n!/2$ work as a solution since we know $n$ is even? For example, 000111 rearranged, $6!/2$?
What method is used to isolate strings with equal ones and zeros?
How many bitstrings of length n contain an equal number of zeros and ones?
Does $n!/2$ work as a solution since we know $n$ is even? For example, 000111 rearranged, $6!/2$?
What method is used to isolate strings with equal ones and zeros?
On
Hint: you need to decide "the number of ways of placing n/2 identical items in n spaces" as placing the ones will naturally give you the places of the zeros (or vice versa).
On
If $n$ is odd, then there can be no strings that satisfy the criterion. If $n$ is even, then exactly $\frac{n}{2}$ of the bits will be $1$. How will you choose which $\frac{n}{2}$ of $n$ bits receive the ones?
Note also that swapping the position of two $1$'s within the sequence yields the same sequence, and should not be counted twice.
Hint: you know exactly how many 0's and 1's you have; you merely need to decide which positions to put the 0's in (the remainder get 1's).