I need to find the number of $10$-digit numbers in which every digit that appears appears exactly twice.
I have attempted to solve this but am not sure if I am not overcounting something.
The only problem is that a $0$ cannot stand on the leftmost position.
The first digit, say $i$, can be chosen in $9$ ways. Then, there are $9$ remaining places for the second $i$.
Now, we have $9$ possible remaining digits and $8$ remaining places. We need to choose $4$ digits, we can do so in $\binom{9}{4}$ ways.
Now, the remaining places must be divided into two-element subsets, which can be done in ${8\brace 2}$ ways (Stirling numbers of the second kind).
Finally, we only need to distribute these $4$ numbers between these subsets, in $4!$ ways.
And so the final answer is: $$9 \cdot 9 \cdot \binom{9}{4} \ {8 \brace 2} \cdot 4!$$ Is it the correct answer?
If we repeatedly (five times) pick the most significant not yet determined digit and then the position of its twin, we end up with $$9\cdot 9\cdot 9\cdot 7\cdot 8\cdot 5\cdot 7\cdot 3\cdot 6\cdot 1 =25719120$$ possibilities