# How many $4$ digit numbers divisible by $4$ can be formed using the digits $0,1,2,3,4$ (without repetition)?

Here is my approach:- Firstly, I fixed the last digit as $$4$$ then there will be only $$2$$ numbers $$(0,2)$$ for the ten's digit, $$3$$ numbers for the hundred's digit and $$2$$ numbers for the Thousand's digit (so that they don't repeat). Number of $$4$$ digit numbers in which $$4$$ is the last digit and is divisible by $$4 = 2 \times 3 \times 2 = 12$$. As there can be only $$4,2,0$$ as the last digit so there are $$12\times 3 = 36$$ numbers possible but that is an incorrect answer. The correct answer is $$30$$. Where did I go wrong?

• The last two digits must be divisible by 4. So, the last digit must be $0,4$ and the second last even, or the last digit must be $2$ and the second last $1$ or $3$. $\\$For the first possibility, there are $2\cdot2\cdot3\cdot2=24$ possibilities. For the second, there are $1\cdot2\cdot1\cdot3=6$. $$24+6=30$$ – Don Thousand Oct 28 '19 at 5:30
• @ Don thousand How there are 3 possibilities for the ten's digit if we fix the last digit as 4. The tens digit must be 0 or 2 then. – Ali Oct 28 '19 at 5:47
• I'm not doing it in that order. If I order it like that, it'd be $2\cdot3\cdot2\cdot2$ and $1\cdot3\cdot2\cdot1$. – Don Thousand Oct 28 '19 at 5:52
• Why did you separately calculate the the possibilities of 0,4 and 2. Why not calculate it altogether ? – Ali Oct 28 '19 at 6:20

Case 1: $$\underbrace{**}_{\{1,3,4\}}20 \Rightarrow P(3,2)=3!=6$$.

Case 2: $$**04 \Rightarrow P(3,2)=3!=6$$.

Case 3: $$**40 \Rightarrow P(3,2)=3!=6$$.

Case 4: $$**12=\underbrace{**}_{\{3,4\}}12+\underbrace{*}_{\{3,4\}}012 \Rightarrow P(2,2)+C(2,1)=4$$.

Case 5: $$**32 \Rightarrow P(2,2)+C(2,1)=4$$.

Case 6: $$**24 \Rightarrow P(2,2)+C(2,1)=4$$.

• Thank you for your solution. But can you tell where did i go wrong in calculating the answer this way ? – Ali Oct 28 '19 at 9:30
• You are saying "I fixed the last digit as 4 then there will be only 2 numbers (0,4) for the ten's digit". No, if you fix last digit as $4$, then the ten's digit cannot be $4$ again, the condition says "without repetition". – farruhota Oct 28 '19 at 9:34
• 3 ways to fill the last digit (4,2,0). 2 ways to fill the tens digit for every number we fill in the ones place. 3 ways to fill the hundreds digit and 2 ways to fill the thousands digit which makes 3×2×3×2=36 – Ali Oct 28 '19 at 9:37
• my bad I meant to say 2 and 0 if we select last digit as 4. – Ali Oct 28 '19 at 9:40
• remember, the thousand's digit cannot be $0$. – farruhota Oct 28 '19 at 9:41