Analyzing the Setup
Imagine you are standing before a 6-digit number, constructed entirely from the digits 1 and 8. You are asked to determine the probability that this number is a multiple of 21.
We have 6 slots, and each slot has 2 choices (1 or 8). By the fundamental principle of counting, the total number of outcomes is:
This is our sample space. In the realm of JEE Advanced, we do not use brute force; we use insight.
The Divisibility Trap
The number 21 is a composite number, which is our first clue. To be a multiple of 21, a number must be a multiple of both 3 and 7.
The Modulo 7 Magic
This is where the problem transforms from a calculation into a revelation. We split the 6-digit number N into two 3-digit blocks, A and B, such that N=1000A+B.
Applying modulo 7, since 1000≡−1(mod7), we find:
The number is divisible by 7 if and only if B−A is divisible by 7. Note that 1≡1(mod7) and 8≡1(mod7).
In the world of modulo 7, the digits 1 and 8 are identical. This means any 3-digit block A or B formed by these digits will always be congruent to 111(mod7).
Since 111=7×15+6, both A and B are congruent to 6. Therefore:
Every single one of our 64 numbers is divisible by 7. The constraint of 7 is satisfied for all cases.
The Sum of Digits
Now, we only need to satisfy the condition for 3. A number is divisible by 3 if the sum of its digits S is a multiple of 3.
Let n1 be the number of 1s and n8 be the number of 8s. Since there are 6 digits, n8=6−n1. The sum is:
S=1(n1)+8(n8)=n1+8(6−n1)=48−7n1
For S to be divisible by 3, we require 48−7n1≡0(mod3). Since 48 is a multiple of 3, we need −7n1≡0(mod3), which simplifies to n1≡0(mod3).
Thus, n1 must be 0, 3, or 6.
The Final Tally
We count the favorable cases:
1) If n1=0, we have (06)=1 way.
2) If n1=6, we have (66)=1 way.
3) If n1=3, we have:
(36)=3×2×16×5×4=20 ways
The total favorable outcomes are 1+1+20=22. The probability p is:
Finally, we calculate 96p:
We have arrived at the answer, 33, not by grinding through numbers, but by understanding the structure of the problem. That is the JEE way.