How many three-digit numbers can be formed using digits {$1$, $6$, $9$, $9$, $9$,}? If I had $5$ distinct digits $(1,2,3,4,5)$ I would do it like so:

$\frac{5!}{(5-3)!} = 60$

But I don't understand what to do if I have $3$ repeating digits
 A: *

*First Number - $999$ 

*Second Number (Take all distinct digits) = $3$!

*Third Number (Take $2$ $9$'s) = $C(1,1) * C(3,2) * C(2,1)= 3$!


Total Numbers = $1 + 6 + 6 = 13$

$C(1,1)$ - How many repeating numbers are there ? Only $9$ is repeating and choose to include only that .
$C(3,2)$ - How many $9$'s are there ? How many are we using ?
$C(2,1)$ - After including $9$, only one place left . How many ways to fill that ?
A: You can just make a decision tree, showing the options to pick $9$ (blue) or other (pink) at the earlier stages where it will have an effect on subsequent options; the last choice is green because that just represents the available choices. Then multiply down each branch and add:
$$2\cdot 1\cdot 1 + 2\cdot 1\cdot 2 + 1\cdot 2\cdot 2 + 1\cdot 1\cdot 3 = 2+4+4+3 = \fbox {13}$$


An inclusion-exclusion approach would be to regard this a choice with restrictions on how many $1$s and $6$s we're allowed.
The unrestricted choice would be $3^3=27$ options.
Excluding choices with excess $1$s involves any cases with two $1$s, $6$ cases, or three $1$s, $1$ case - in total $7$ cases to remove.
Excluding choices with excess $6$s likewise gives $7$ cases to remove.
Total valid choices then is $27-2\cdot 7=13$.
