Given the digits $0, 1, 2, 3, 4$, and $5$. How many four digit numbers can be formed if digits can be repeated and contain at least one digit $3$?
Asked
Active
Viewed 2,258 times
1
-
2Do you want to rule out numbers that begin with $0$? – user76568 Feb 25 '14 at 16:48
2 Answers
3
Hint: Count how many without the restriction and subtract the number with no $3$.
Robert Israel
- 448,999
-
-
1Robert is saying to figure out how many four digit numbers you can make using 0, 1, 2, 3, 4, and 5. You will end up with four digit numbers that might not have a 3 in them, like 1245 for instance. To fix this, find how many four digit numbers you can make using 0, 1, 2, 4, and 5. Then, subtract how many of these numbers you find from the original number you found. – josh Feb 25 '14 at 16:21
3
Generally, the number of strings of length $n$ with $m$ options per character is $m^n$.
So, the total number of four digit numbers, all digits being one of $\{0,1,2,3,4,5\}$ (other than the first which cannot be $0$) is: $$5 \cdot 6^3=1080$$
We don't want numbers that don't contain $3$ at all, and there are $4 \cdot 5^3=500$ of this kind.
So the total for $3$ appearing at least once is: $$5 \cdot 6^3 - 4 \cdot 5^3 = 580$$
user76568
- 4,542
-
The 4-digit numbers cannot start with $0$. That is a red herring if I am not missing something obvious. – Hawk Feb 25 '14 at 18:11
-
-
-
-
-
-
Yes, I do realise...and I am thinking about it...and I opened this question only because of that...because I am thinking about this since I answered. – Hawk Feb 25 '14 at 18:27
-