[Math] Let T = {1000,1001…,9999}. How many numbers have at least one digit that is 0…

probability

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.

Best Answer

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$.