$5$ digit no. in which at least $3$ digits are identical. The number of $5$-digit numbers that can be made with digits $\left\{1,2,3,4,5,6\right\}$
in which at least $3$ digits are identical is.
$\bf{My\; Try::}$ 
No.,s in which at least $3$ digits are Identical is $ = $ Total -no digit are identical - exactly $2$ digit are 
identical.
So Total no. of ways is $ = 6\times 6 \times 6 \times 6 \times 6=6^5$ 
and no digit are identical is $ = 6\times 5 \times 4 \times 3 \times 2 = 6!$
and I did not understand how can i find the cases in which exactly $2$ digits are identical.
Help me
Thanks
 A: Notice that you could have one or two pairs of identical digits, e.g. 11234 or 11223.


*

*Number of numbers with exactly one pair of identical digits =
(ways to chose the digit-value that will be repeated) $\cdot$ (ways to select the positions of the identical digits) $\cdot$ (ways to choose the other digits).

*Number of numbers with exactly two pairs of identical digits = (ways to chose the set of the two digit-values that will be repeated) $\cdot$ (ways to position the two chosen pairs) $\cdot$ (ways to choose the remaining digits).
Try to count them with extra care for the second factor of the second bullet, as @André suggested.
A: There are 3 cases:
1. 3 digits identical: $aaabc$
There are $4+3+2+1$ ways of arranging $b$ and $c$ such that $b$ always comes before $c$. Then there are $6$ choices for $b$, $5$ for $c$ and $4$ for $a$. Thus there are $10\cdot6\cdot5\cdot4=1200$ numbers.
For $aaabb$, we have $10$ ways of arrangement and therefore a total of $10\cdot6\cdot5=300$ numbers.
2. 4 digits are identical: $aaaab$
There are $5$ positions for $b$. So there $5\cdot6\cdot5=150$ numbers.
3. 5 digits are identical: $aaaaa$
There are clearly $6$ such numbers.
So there are $\boxed{1656}$ such numbers.

To count the ones with $2$ identical digits, we have $2$ cases.
1. $aabcd$
There are ${5\choose 2}$ ways of placing the $a$'s. We will not arrange $bcd$ since it will cause over counting. So we have $10\cdot6\cdot5\cdot4\cdot3=3600$ such numbers.
2. $aabbc$
There are $5$ ways for placing the $c$. For the remaining $4$ positions we have $4\choose 2$ ways of placing the $a$'s and $1$ way of placing the $b$'s. So there are $5\cdot 6$ ways of arranging. But we divide this by $2$ since $a$ and $b$ are interchangeable. So we have $15$ ways of arranging these. Thus there are $15\cdot6\cdot5\cdot4=1800$ numbers.
So there are $5400$ numbers with $2$ digits identical. 
A: Continuing from the comment, the way to calculate 2 doubles and a single is to count the amount of ways to choose 3 from 6, multiply it by the 3 ways to choose the single element out of them, and multiply that by the amount of ways to permute xxyyz
