How many combinations have the same amount of ones and zeros?

1.7k Views Asked by At

In an even n digit binary number, how do you calculate the number of combinations that have the same number of ones and zeros.

1

There are 1 best solutions below

0
On BEST ANSWER

Imagine you write the $n$ zeros and the $n$ ones along a line. The possible configurations can be created by permuting them in all possible ways. There are $(2n)!$ permutations of $2n$ digits.

However, permutations that only exchange ones among themselves do not produce new configurations. You must discard them. There are $n!$ permutations among the $n$ ones. So you must divide by $n!$.

Likewise, there are $n!$ permutations that alter the positions only of the zeros. You must divide by $n!$ again.

Final result is $$\frac{(2n)!}{n!^2}$$ or $$\binom{2n}{n}$$