Question:

The number of integers lying between 1000 and 10000 such that the sum of all the digits in each of those numbers becomes 30 is

Show Hint

When the required sum of digits is "high" (close to the maximum sum), transform the variables by letting \( y_i = (\text{max digit}) - d_i \). This flips the problem to a "low sum" problem, often removing the need to use the Principle of Inclusion-Exclusion for upper bounds.
Updated On: Mar 26, 2026
  • 84
  • 96
  • 45
  • 75
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Step 1: Understanding the Concept:

Integers between 1000 and 10000 are 4-digit numbers. Let the number be \( d_1 d_2 d_3 d_4 \). We need to find the number of solutions to \( d_1 + d_2 + d_3 + d_4 = 30 \) subject to the digit constraints: \( 1 \le d_1 \le 9 \) and \( 0 \le d_2, d_3, d_4 \le 9 \).
Step 2: Key Formula or Approach:

A substitution method using \( y_i = 9 - d_i \) is very efficient for digit sum problems where the sum is close to the maximum possible sum (which is 36 for four digits).
Step 3: Detailed Explanation:

Let \( y_i = 9 - d_i \) for \( i = 1, 2, 3, 4 \). Substituting \( d_i = 9 - y_i \) into the sum equation: \[ (9 - y_1) + (9 - y_2) + (9 - y_3) + (9 - y_4) = 30 \] \[ 36 - (y_1 + y_2 + y_3 + y_4) = 30 \] \[ y_1 + y_2 + y_3 + y_4 = 6 \] Now, let's determine the constraints on \( y_i \): 1. For \( d_1 \): \( 1 \le d_1 \le 9 \implies 1 \le 9 - y_1 \le 9 \implies 0 \le y_1 \le 8 \). 2. For \( d_2, d_3, d_4 \): \( 0 \le d_i \le 9 \implies 0 \le 9 - y_i \le 9 \implies 0 \le y_i \le 9 \). Since the sum of \( y_i \) is only 6, it is impossible for any \( y_i \) to exceed 6. Therefore, the upper bound constraints (\( y_1 \le 8 \) and \( y_i \le 9 \)) are automatically satisfied by any non-negative solution. The problem reduces to finding the number of non-negative integral solutions to: \[ y_1 + y_2 + y_3 + y_4 = 6 \] Using the stars and bars formula with \( n = 6 \) and \( r = 4 \): \[ \text{Number of solutions} = \binom{n+r-1}{r-1} = \binom{6+4-1}{4-1} \] \[ = \binom{9}{3} \] \[ = \frac{9 \times 8 \times 7}{3 \times 2 \times 1} \] \[ = 3 \times 4 \times 7 = 84 \]
Step 4: Final Answer:

There are 84 such integers.
Was this answer helpful?
0
0