Permutations and combinations and divisibility problem

49 Views Asked by At

I have a problem with this question. I solved it and also got the correct answer but my process is not correct as the solution given in the book is completely different.

The number of $5$ digit numbers which are divisible by $4$, with digits from the set $\{1,2,3,4,5\}$ and the repetition of digits allowed, is ___ .

What I did was that I took the unit digit only 4 but as I checked the solution their are also some numbers ending with 2 and divisible by 4 . But using only 4 as the unit digit I got the correct answer.

Please clear my doubt.

1

There are 1 best solutions below

5
On

The last two digits need to be divisible by 4. This means that given the conditions, the last two digits can be $\{12, 24, 32, 44, 52\}$

Since the repetition of digits is allowed, the remaining 3 places can be filled in $5^3$ ways for each of the 5 cases. The total number of ways is thus $5 \times 5^3 = 625$