Why is this an incorrect solution to "Find how many $4$-digit numbers are divisible by $5$."?

133 Views Asked by At

Problem: Find how many 4-digit numbers are divisible by 5.

I started from two facts:

  1. The number divisible by 5 ends with either 0 or 5.
  2. The 4-digit number can't start with 0.

Then I calculated how many permutations end with 5 or 0: since there are 4 placeholders, if I put in the last one 0 or 5, there are three left to be filled with any digit, therefore $2 \cdot 10^3=2000$ (I multiplied by two because if the number ends in either $0$ or $5$, there are $3$ placeholders in case of both $0$ and $5$).

So, there are in total $2000$ permutations that end in $0$ or $5$.

Then I calculated how many of them start with 0: since, if we put 0 in the first place, there are 3 placeholders left, and each of them can hold up to 10 digits, and we arrive at the conclusion that there are $10^3=1000$ permutations that start with $0$.

Then I subtracted from the number of permutations that end in $0$ or $5$ the number of permutations that start with $0$: $2000-1000=1000$.

And then I concluded that there $1000$ $4$-digit numbers that are divisible by $5$.


But the solution is actually $1800$, which is arrived at like this: $9 \cdot 10 \cdot 10 \cdot 2=1800$. $9 \cdot 10 \cdot 10$ comes from that that when the last placeholder is filled, there are three placeholders left, each of which can be filled with any of the $10$ digits, except the first one that can't contain $0$. It is multiplied by two for both cases: $5$ in the last placeholder or $0$ in the last placeholder.


Why is the way that I tried incorrect?

3

There are 3 best solutions below

0
On BEST ANSWER

Then I calculated how many of them start with 0: since, if we put 0 in the first place, there are 3 placeholders left, and each of them can hold up to 10 digits, and we arrive at the conclusion that there are $10^3=1000$ permutations that start with 0.

Here is your mistake: you use the 'them' to refer to the $2000$ strings that end in a $0$ or $5$, but you proceeded to calculate the number of $4$ digit strings out of all $10,000$ digit strings that start with a $0$.

To see how many out of the $2,000$ ending with a $0$ or $5$ start with a $0$: given that they end with a $0$ or $5$, you only have $2$ possibilities for that last digit, and $10^2$ for the other two, making a total of $200$ out of those $2000$ that start with a $0$

0
On

The number of numbers starting with $0$ is not $10^3$. It is $10\cdot10\cdot2$. You should only subtract out the numbers starting with $0$ which are divisible by $5$, so there are only two choices for the last digit.

2
On

Consider four digit numbers: $0000-9999$.

Numbers ending with $0$: $$***0 \Rightarrow n=10^3=1000.$$ Numbers ending with $5$: $$***5 \Rightarrow n=10^3=1000.$$ So numbers ending with $0$ or $5$ is $2000$.

Numbers starting with $0$ and ending with $0$: $$0**0 \Rightarrow n=10^2=100.$$ Numbers starting with $0$ and ending with $5$: $$0**5 \Rightarrow n=10^2=100.$$ So numbers starting with $0$ and ending with $0$ or $5$ is $200$.

Hence, $2000-200=1800$.