The Art of Combinatorial Counting
Decoding Divisibility
Welcome, aspiring mathematician! Today, we are going to unravel a classic JEE-style counting problem. At first glance, counting 5-digit numbers might seem like a tedious task, but the beauty of combinatorics lies in finding the hidden structure that turns a mountain of possibilities into a simple, elegant calculation.
Let us embark on this journey together.
The Tail Strategy
The Divisibility Rule for 4
Imagine you are an architect designing a 5-digit number using the set {1,2,3,4,5}. You have five empty slots to fill: _____. The constraint is that the final number must be divisible by 4.
Many students make the mistake of trying to construct the number from left to right, worrying about the entire magnitude of the number. But here is the secret: the divisibility rule for 4 is a 'tail-end' property.
Mathematically, any 5-digit number can be expressed as:
10000d1+1000d2+100d3+10d4+d5
Because 100 is a multiple of 4, any number 100k is automatically divisible by 4. Therefore, the divisibility of the entire number depends entirely on the last two digits, 10d4+d5. This is our 'Spark'—we only need to focus on the last two boxes.
Detective Work
Identifying Valid Pairs
Now, let us act as detectives. We need to find all pairs (d4,d5) from our set {1,2,3,4,5} such that the number 10d4+d5 is divisible by 4. Since repetition is allowed, we test them systematically:
Starting with 1: 12 is divisible by 4. (11,13,14,15 are not).
Starting with 2: 24 is divisible by 4. (21,22,23,25 are not).
Starting with 3: 32 is divisible by 4. (31,33,34,35 are not).
Starting with 4: 44 is divisible by 4. (41,42,43,45 are not).
* Starting with 5: 52 is divisible by 4. (51,53,54,55 are not).
We have found exactly 5 valid pairs: {12,24,32,44,52}. This is our 'Arsenal'—the set of building blocks for the end of our number.
The Freedom of the First Three Positions
With the last two positions locked into one of these 5 valid configurations, we turn our attention to the first three positions. Because the problem explicitly states that repetition is allowed, the first three digits are completely free.
They do not need to 'know' what happened at the end of the number. For the first position, we have 5 choices. For the second, we have 5 choices. For the third, we have 5 choices.
This is the 'Freedom' of the problem. We are not subtracting any cases, and we are not restricted by the digits chosen for the tail.
The Grand Synthesis
Fundamental Principle of Counting
Now, we bring it all together using the Fundamental Principle of Counting. We need to fill the first position AND the second AND the third AND the last two. In combinatorics, 'AND' translates to multiplication.
The total number of combinations is given by:
Let us calculate this step-by-step. The first three positions give us 53=125 combinations. The last two positions give us 5 valid combinations.
Multiplying these together:
There we have it! By identifying the most restrictive condition first (the divisibility rule) and then handling the unrestricted positions, we have navigated the problem with precision.
The final answer is 625. Remember, in JEE Advanced, it is rarely about brute force; it is about finding the most efficient path through the logic.