combinatorial question: permutation, binomial coefficient How many numbers of $6$ digits which have exactly the digit $1$ ($2$ times), digit $2$ ($2$ times), without zero, are there?
The book posts this solution: $$ \frac{6!}{2!2!}\cdot \binom{7}{2} + \frac{6!}{2!2!2!} \cdot 7= 4410 \, ,$$
but i'm trying to find an explanation for this result.
 A: You want digit 1 twice anywhere AND digit 2 twice anywhere and any of the seven other digits (no 0's, 1's or 2's) in the remaining two slots:
$$
 \binom{6}{2}\cdot \binom{4}{2} \cdot 7^2 
$$ 
Clearly you can put the first digit anywhere you want, then there are 5 slots for the second digit, 4 for the third and 3 for the fourth and then you can put two out of 7 digits anywhere you want out of the remaining two.  
A: The book has (unnecessarily, as exhibited by Alex's solution) broken the problem into two cases:


*

*two 1s, two 2s, and two other distinct non-zero digits;

*two 1s, two 2s, and one other non-zero digit, repeated twice.


To enumerate case 1, count the number of arrangements of the "word" 1122LG, of which there are
$$\frac{6!}{2!2!1!1!}.$$  Here "L" stands for the lesser of the other digits and "G" for the greater.  Then multiply by the $\binom{7}{2}$ ways to choose the digits to replace L and G.
To enumerate case 2, count the number of arrangements of the "word" 1122DD, of which there are
$$\frac{6!}{2!2!2!}.$$  Here "D" stands for the other digit, which is now used twice.  Then multiply by the 7 choices for digit to replace D.
