QlarIITy

MathematicsJEE Main 2024 · 9 AprilInteger

The number of integers, between 100 and 1000 having the sum of their digits equals to 14 , 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. A digit sum condition is an equation in whole numbers with limits on each variable.

Concept refresher. The number of solutions of x1+x2+…+xk=nx_1 + x_2 + \ldots + x_k = n in non-negative integers is

N=n+k−1Ck−1N = {}^{n+k-1}C_{k-1}

A variable that must be at least mm is replaced by mm plus a new non-negative variable.

Picture the situation. An integer between 100 and 1000 has three digits, the first from 1 to 9 and the others from 0 to 9. The condition is that the three digits add to 14. Counting such triples is like sharing 14 units among three boxes, with a cap on each box and at least one unit in the first.

Approach. Shift the first digit, count the solutions without upper limits, and subtract those that exceed a digit limit.

  1. Step 1: Set up

    Let the digits be aa, bb, cc with a+b+c=14a + b + c = 14, 1≤a≤91 \leq a \leq 9 and 0≤b,c≤90 \leq b, c \leq 9. Putting p=a−1p = a - 1 gives p+b+c=13p + b + c = 13 with 0≤p≤80 \leq p \leq 8.

  2. Step 2: Without the upper limits

    Ignoring the upper limits for a moment, the number of solutions is 15C2=105{}^{15}C_2 = 105.

  3. Step 3: Remove the bad cases

    If p≥9p \geq 9, the remaining total is 4, giving 6C2=15{}^6C_2 = 15 solutions. If b≥10b \geq 10 or c≥10c \geq 10, the remaining total is 3, giving 5C2=10{}^5C_2 = 10 each. No two of these can happen together, so the count is 105−15−10−10=70105 - 15 - 10 - 10 = 70.

Answer. 70

Sanity check. Counting by the first digit from 1 to 9, the other two digits can be chosen in 6, 7, 8, 9, 10, 9, 8, 7 and 6 ways, which add to 70.

Common wrong answers

  • 105: Ignoring the limit of 9 on each digit gives 105.

Key takeaway

The trap. A solution with a digit above nine is not a number and must be removed.

How toppers think. They cross-check by listing the count for each first digit.

Remember. Solutions: n+k−1Ck−1{}^{n+k-1}C_{k-1}

More on Distribution Problems