Question:

In a bank the account numbers are all 8-digit numbers, and they all start with the digit 2. So, an account number can be represented as $2x_1x_2x_3x_4x_5x_6x_7$. An account number is considered to be a ‘magic’ number if $x_1x_2x_3$ is exactly the same as $x_4x_5x_6$ or $x_5x_6x_7$ or both. $x_i$ can take values from 0 to 9, but 2 followed by seven 0’s is not valid. What is the maximum possible number of customers having a ‘magic’ account number?

Show Hint

For problems with “at least one condition” (like Case 1 OR Case 2), always use the principle of inclusion–exclusion: $|A \cup B| = |A| + |B| - |A \cap B|$. Be careful to handle special restrictions (like invalid all-zero cases).
Updated On: Aug 23, 2025
  • 9989
  • 19980
  • 19989
  • 19999
  • 19990
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

Step 1: Structure of account numbers.
Each account number is of the form: \[ 2 \; x_1x_2x_3x_4x_5x_6x_7 \] where the first digit is always $2$, and $x_i$ can range from 0 to 9. A number is ‘magic’ if: - Case 1: $x_1x_2x_3 = x_4x_5x_6$, OR - Case 2: $x_1x_2x_3 = x_5x_6x_7$, OR both.

Step 2: Case 1 — $x_1x_2x_3 = x_4x_5x_6$.
- $x_1x_2x_3$ can be any 3-digit string from 000 to 999. - But “20000000” (all zeros) is invalid, so if $x_1x_2x_3 = 000$, then $x_7$ must not be 0. Hence: $9$ possibilities for $x_7$. - For each other $x_1x_2x_3$ ($001$ to $999$), $x_7$ can be $0$ to $9$ → 10 choices. So, total = $9$ (for 000 case) + $999 \times 10 = 9990$ possibilities.

Step 3: Case 2 — $x_1x_2x_3 = x_5x_6x_7$.
- Again, $x_1x_2x_3$ ranges from 000 to 999. - For $000$, $x_4$ cannot make “20000000” → 9 possibilities. - For others (001 to 999), $x_4$ can be anything (0–9) → 10 possibilities. So again, total = $9 + 999 \times 10 = 9990$ possibilities.

Step 4: Overlap of Case 1 and Case 2.
If both conditions hold, then: \[ x_1x_2x_3 = x_4x_5x_6 = x_5x_6x_7 \] That means $x_1x_2x_3 = x_4x_5x_6 = x_5x_6x_7$. So, the last 6 digits are of the form $abcabc$. There are 1000 such numbers (000000 to 999999). But “20000000” is not valid, so exclude that. So overlap = $999$ cases.

Step 5: Apply inclusion-exclusion.
\[ \text{Total magic} = 9990 + 9990 - 999 = 19989 \]

Final Answer: \[ \boxed{19989} \]
Was this answer helpful?
0
0

Questions Asked in XAT exam

View More Questions