Let T = {1000,1001...,9999}. How many numbers have at least one digit that is 0... Let T = {1000,1001...,9999}. How many numbers have at least one digit that is 0, at least one that is 1 and at least one that is 2. For example, 1072 and 2101 are two such numbers.
I have no idea to solve such probability question, I should use Permutation or Combination? why the answer is 150.
Thanks you guys.
 A: Let $A,B,C$ be the set of the numbers which have no $0$, no $1$, no $2$ respectively. Also, let $n(A)$ be the number of the elements of $A$. 
Then, find the following value $Z$ :
$Z=n(A)+n(B)+n(C)-n(A\cap B)-n(B\cap C)-n(C\cap A)+n(A\cap B\cap C).$
Then, the answer will be $9999-1000+1-Z$.
A: We can do a division into cases. It is unattractive, but will work. 
Case (i): Let the first digit be something other than $1$ or $2$. There are $7$ choices. Now we need to fill in the rest with $0,1,2$. There are $6$ ways to do this, for a total of $42$.
Case (ii) Let the first digit be $a$, where $a$ is $1$ or $2$. The counts are the same, so we count the cases where the first digit is $1$, and double the result.
We can repeat the $1$ somewhere. There are $3$ places to put it, and then there are $2$ choices for where the $0$ and $2$ go, a total of $6$.
We can have two $0$'s. These can be placed in $3$ ways. Or we can have two $2$'s, giving another $3$ possibilities. 
Or else we can make the digits all different. The digit other than $0$ or $2$ can be chosen in $7$ ways, and then we can arrange that digit and $0$ and $2$ in $3!$ ways, for a total of $42$. 
So we have $6+6+42=54$ ways to have first digit $1$, and another $54$ with first digit $2$, a total of $108$.
Finally, add the counts for (i) and (ii). 
A: Let's break up the different cases, shall we?


*

*If the leading digit $d$ is not one of the special digits, that leaves us with $d \in \left\{3,4,5,6,7,8,9\right\}$. So we have $7$ different options for the leading digit. After that, there are $3! = 6$ different options for our special digits — $\left\{(d,0,1,2),(d,0,2,1), (d,1,0,2),(d,1,2,0),(d,2,0,1),(d,2,1,0)\right\}$.
So the total number of combinations is $7 \cdot 3! = 42$.

*If the leading digit is a special digit $s$, it has to be either $1$ or $2$. It can't be $0$, as that would bring the number below $1000$, which is not allowed.  


*

*If the free digit $f$ is not equal to one of the remaining special digits, there are $3!$ ways of placing those digits, with $8$ options for the free digit — $f \in \left\{s,3,4,5,6,7,8,9\right\}$. This gives us $3! \cdot 8 = 48$ different options.  

*If $f$ is equal to one of the remaining special digits, there are $3$ ways of placing the other remaining digit and there are of course $2$ special digits that $f$ can be equal to, giving us $2\cdot3=6$ options.  


As noted earlier, there are $2$ possible leading special digits, giving us $2\cdot(48+6) = 108$ options for a leading special digit.
Adding these two cases gives us $42 + 108 = 150$, which is the answer you had.
