1
$\begingroup$

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

$\endgroup$
  • 2
    $\begingroup$ Do you want to rule out numbers that begin with $0$? $\endgroup$ – user76568 Feb 25 '14 at 16:48
3
$\begingroup$

Hint: Count how many without the restriction and subtract the number with no $3$.

$\endgroup$
  • $\begingroup$ I dont get what youre saying :/ $\endgroup$ – user131419 Feb 25 '14 at 16:15
  • 1
    $\begingroup$ Robert 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. $\endgroup$ – josh Feb 25 '14 at 16:21
3
$\begingroup$

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

$\endgroup$
  • $\begingroup$ The 4-digit numbers cannot start with $0$. That is a red herring if I am not missing something obvious. $\endgroup$ – Hawk Feb 25 '14 at 18:11
  • $\begingroup$ @Hawk a red herring..? $\endgroup$ – user76568 Feb 25 '14 at 18:21
  • $\begingroup$ It is fine now. I think you have realised the mistake. $\endgroup$ – Hawk Feb 25 '14 at 18:22
  • $\begingroup$ @Hawk the mistake was allowing the number to begin with $0$? $\endgroup$ – user76568 Feb 25 '14 at 18:23
  • $\begingroup$ Yes, I meant that. $\endgroup$ – Hawk Feb 25 '14 at 18:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.