# Combinatorial question: permutation, binomial coefficient

1. Mar 4, 2013

### blob84

How many numbers of 6 digits which have exatctly the digit 1 (2 times), digit 2 (2 times), without zero, are there?
The book post this solution: $$\frac{6!}{2!2!}*\binom{7}{2} + \frac{6!}{2!2!2!}*7= 4410$$,
but i'm trying to find an explanation for this result.

2. Mar 4, 2013

### Staff: Mentor

That is a weird way to calculate the number.

Here is what I would do:

There are $6 \choose 2$ ways to place the "1"s, and $4 \choose 2$ ways to place the "2"s afterwards. If you write both with factorials, a 4! cancels and you get $\frac{6!}{2! 2! 2!}$. The remaining two digits have 7 options each (3...9), therefore the total number of digits is...

Of course, you can split 7*7 in $2 {7\choose 2} + 7$, but where is the point? The first part corresponds to the number of numbers where the two remaining digits are different, but I don't see a reason to consider them separately.

3. Mar 4, 2013

### blob84

It is $$\binom{6}{2}*\binom{4}{2}*7^2$$ by the general form of the product rule, where there are for any pairs of digits 3 cases, if I'm not wrong, thank you.
I suppose to get this weird formula it calculate permutation with repetition and it brokes the problem in two sets.

4. Mar 4, 2013

### ssd

The 1st term corresponds to the case when the other two digits are different and the 2nd term corresponds to the case when another digit is repeated (three double digits).