NVAMediumJEE 2023Applications of P&C

JEE Mathematics 2023 Question with Solution

The number of seven digit positive integers formed using the digits 11, 22, 33, and 44 only and the sum of the digits equal to 1212 is:

Answer

Correct answer:413

Step-by-step solution

Standard Method

Given: We need to find the number of seven-digit positive integers formed using the digits 11, 22, 33, and 44 such that the sum of the digits is 1212.

Find: The total number of such integers.

Let the digits be x1,x2,x3,x4,x5,x6,x7x_1, x_2, x_3, x_4, x_5, x_6, x_7, where each xi{1,2,3,4}x_i \in \{1,2,3,4\}.

Then

x1+x2+x3+x4+x5+x6+x7=12x_1 + x_2 + x_3 + x_4 + x_5 + x_6 + x_7 = 12

We want the number of solutions subject to 1xi41 \le x_i \le 4 for each ii.

Let

yi=xi1y_i = x_i - 1

Then xi=yi+1x_i = y_i + 1 and 0yi30 \le y_i \le 3.

Substituting,

(y1+1)+(y2+1)++(y7+1)=12(y_1 + 1) + (y_2 + 1) + \cdots + (y_7 + 1) = 12

so

y1+y2++y7=5y_1 + y_2 + \cdots + y_7 = 5

First count all non-negative integer solutions:

(5+7171)=(116)=462\binom{5+7-1}{7-1} = \binom{11}{6} = 462

Now subtract the cases where some yi4y_i \ge 4.

Since the total sum is only 55, at most one variable can be at least 44.

If one variable, say y14y_1 \ge 4, let

z1=y14z_1 = y_1 - 4

Then

z1+y2++y7=1z_1 + y_2 + \cdots + y_7 = 1

The number of solutions is

(1+7171)=(76)=7\binom{1+7-1}{7-1} = \binom{7}{6} = 7

Any one of the 77 variables could be the variable exceeding or equal to 44, so the number of invalid cases is

7×7=497 \times 7 = 49

Hence the required count is

46249=413462 - 49 = 413

Therefore, the number of such seven-digit integers is 413413.

Counting With Variable Shift

Given: A seven-digit number uses only the digits 1,2,3,41,2,3,4 and has digit sum 1212.

Find: The number of such numbers.

Because every digit is at least 11, start by assigning 11 to each of the 77 positions. This contributes

77

to the digit sum.

So we still need an additional

127=512 - 7 = 5

to be distributed among the 77 positions.

If the extra amount added to the ii-th digit is yiy_i, then

y1+y2++y7=5y_1 + y_2 + \cdots + y_7 = 5

with

0yi30 \le y_i \le 3

because the original digit cannot exceed 44.

Ignoring the upper bound for a moment, the number of non-negative integer solutions is

(116)=462\binom{11}{6} = 462

Now remove forbidden cases.

A forbidden case occurs when some yi4y_i \ge 4. Since the total sum is only 55, two variables cannot both be at least 44. So only one-variable violations are possible.

Choose the violating variable in

77

ways.

After forcing that variable to contribute 44, the remaining sum is

54=15 - 4 = 1

which can be distributed among 77 variables in

(76)=7\binom{7}{6} = 7

ways.

Thus invalid cases are

77=497 \cdot 7 = 49

Therefore,

46249=413462 - 49 = 413

So the required number is 413413.

Common mistakes

  • Using stars and bars directly to get (116)=462\binom{11}{6} = 462 and stopping there is incorrect because it ignores the upper bound xi4x_i \le 4. After shifting variables, you must also exclude cases with yi4y_i \ge 4.

  • Forgetting to shift variables by writing the equation directly for unrestricted non-negative integers is wrong because the digits start from 11, not 00. First set yi=xi1y_i = x_i - 1 so that the transformed sum becomes 55.

  • Overcounting invalid cases using full inclusion-exclusion for multiple variables exceeding 33 is unnecessary here. Since the total sum is only 55, at most one variable can satisfy yi4y_i \ge 4.

Practice more Applications of P&C questions

Get unlimited AI-adaptive practice, mastery tracking, and an AI tutor that explains every step — free to start.

Related questions