QlarIITy

MathematicsJEE Main 2021 · 25 FebruaryInteger

The total number of numbers, lying between 100 and 1000 that can be formed with the digits 1, 2, 3, 4, 5, if the repetition of digits is not allowed and numbers are divisible by either 3 or 5, is

Try it before you look.The full solution is on this page, below the answer box, the moment you check. No sign-in needed.

Solution

Core idea. Either of two properties: add the two counts and remove the overlap.

Concept refresher. For two properties AA and BB, the number of objects with at least one of them is

n(A∪B)=n(A)+n(B)−n(A∩B)n(A \cup B) = n(A) + n(B) - n(A \cap B)

and the remaining objects have neither.

Picture the situation. A number between 100 and 1000 has three digits, here three different digits from 1 to 5. Divisibility by 5 depends on the last digit, and divisibility by 3 on the set of digits used. Numbers divisible by both would be counted twice, so they are subtracted once.

Approach. Count the numbers divisible by 5, by 3 and by both, then apply inclusion and exclusion.

  1. Step 1: Divisible by 5

    The last digit must be 5, and the first two places take two of the other 4 digits in order, giving 4×3=124 \times 3 = 12 numbers.

  2. Step 2: Divisible by 3

    The sets of three digits with a sum divisible by 3 are 1, 2, 3; then 1, 3, 5; then 2, 3, 4; then 3, 4, 5. Each gives 3!=63! = 6 numbers, so 24 in all.

  3. Step 3: Both

    A number divisible by both uses the set 1, 3, 5 or 3, 4, 5 with 5 last, which gives 2+2=42 + 2 = 4 numbers. So the count is 12+24−4=3212 + 24 - 4 = 32.

Answer. 32

Sanity check. The four numbers divisible by both are 135, 315, 345 and 435, each a multiple of 15.

Common wrong answers

  • 36: Not subtracting the 4 numbers divisible by both gives 36.
  • 28: Removing the overlap twice, as for numbers divisible by exactly one of them, gives 28.

Key takeaway

The trap. Numbers divisible by both appear in both counts.

How toppers think. They list the few numbers in the overlap to be sure of it.

Remember. Either: add the two counts, subtract the overlap.

More on Inclusion–Exclusion Principle