0
$\begingroup$

Assume we have 4 digits that can be either 0 or 1. How many possible ways are there to list the diffrent combinations of 0's and 1's given that we want exactly two 0's and two 1's.

I was thinking 6, but I can't explain why.

0011 0101 0110 1010 1001 1100

I guess what I am trying to find out is the generic thinking of how I solve this problem for n digits (where n is an even natural number) when I want the digits to have n/2 0's and n/2 1's.

$\endgroup$

1 Answer 1

0
$\begingroup$

The general case is the number of ways to choose $r$ things out of $n$ without respect to the order you choose them. This gives the number of combinations ${n \choose r}=\frac {n!}{r!(n-r)!}$ For the case $r=\frac n2$ you have the central binomial coefficient $\frac {(2r)!}{(r!)^2}$

$\endgroup$
1
  • $\begingroup$ I did know the theory about combination without order and how to compute it. What tricked me (and confused me) was that I didn't recognise that this particular problem was such a case. Cheers. PS more specifically I should have calculated the ways n/2 zeros can fit into n spots AND disregard ones. My problem in my thinking was that I mistankenly thought that I should have cared for ones as well. $\endgroup$ Commented Feb 16, 2014 at 15:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .