In how many ways can the digits of $45025$ be arranged to form a $5$-digit number such that it is divisible by $5$?
I got $$\frac{4 \cdot 4 \cdot 3 \cdot 2}{2!} = 48$$ different arrangements for how many $5$-digit numbers you can make with the digits of $45025$. The problem is I'm not quite sure how to tackle the second part. I know for a number to be divisible by 5 it has to end with either a $0$ or $5$, but I'm not sure how to find how many combinations $45025$ can make so that it has $0$ or $5$ at the end.
$\endgroup$ 12 Answers
$\begingroup$You have to make cases.
CASE 1:
No.of ways when unit digit is $5$ =$4!=24$
No.of ways when unit digit is $5$ and leading digit is $0$ =$3!=6$
Thus,valid cases when unit digit is $5=24-6=18$
CASE 2:
No.of ways when unit digit is $0$ =$4!/2!=12$
Thus,total no. of ways is $18+12=30$.
$\endgroup$ 0 $\begingroup$Method 1: We consider cases, depending on whether the units digit is $0$ or $5$.
Case 1: The units digit is $0$.
We have to arrange the digits $2, 4, 5, 5$ in the first four positions. Choose two of those four positions for the $5$s, then arrange the remaining two distinct digits in the remaining two positions, which can be done in$$\binom{4}{2}2!$$ways.
Case 2: The units digit is $5$.
We have to arrange the digits $0, 2, 4, 5$ in the first four positions. There are three possible positions for the $0$ since it cannot be the leading digit. Once it is placed, arrange the remaining three distinct digits in the remaining three positions. There are$$3 \cdot 3!$$such numbers.
Total: Since the two cases are mutually exclusive and exhaustive, the number of ways the digits of the number $45025$ can be permuted to form a five-digit positive integer that is divisible by $5$ is$$\binom{4}{2}2! + 3 \cdot 3! = 30$$
Method 2: We subtract those integers formed by permuting the digits of $45025$ which are not divisible by $5$ from the $48$ total permutations you found.
Those integers have a $2$ or $4$ in the units digit. Choose whether $2$ or $4$ is the units digit. Since $0$ cannot be the leading digit, choose which of the three middle positions is occupied by the $0$. Choose which of the remaining three positions is occupied by whichever of the digits $2$ or $4$ we have not already used. The two $5$s must occupy the remaining two positions. Hence, there are$$2 \cdot 3 \cdot 3 = 18$$five-digit positive integers that can be formed by permuting the digits of $45025$ which are not divisible by $5$, leaving$$48 - 18 = 30$$five-digit positive integers that can can be formed by permuting the digits of $45025$ which are divisible by $5$.
$\endgroup$