JEEAdvanced

Find the number of integer solutions (x1, x2, x3, x4) to x1 + x2 + x3…

Question

Find the number of integer solutions (x1, x2, x3, x4) to x1 + x2 + x3 + x4 = 20 with 0 <= xi <= 8 for each i.

✓ Verified answer: 375checked by our engine — not a guess

Step-by-step solution

Without upper bounds, solutions to x1+x2+x3+x4=20 in nonnegative integers number C(23,3) = 1771.
Apply inclusion-exclusion on the constraint xi <= 8, i.e.
exclude xi >= 9.

If we force a variable to be at least 9, substitute xi' = xi-9 and the remaining sum is 11, giving C(14,3) = 364 per offending variable; there are C(4,1)=4 of them.

Forcing two variables each >= 9 removes 18 from 20, leaving sum 2: C(5,3) = 10 each, with C(4,2)=6 pairs.
Three variables >= 9 would remove 27 > 20: impossible, contributes 0.
By inclusion-exclusion: 1771 - 4*364 + 6*10 = 1771 - 1456 + 60 = 375.

Final answer375

Stuck on a problem like this?

Paste any JEE or NEET question — verified working, a confidence %, and an honest “not sure” instead of a bluff.

Solve my doubt →

More Combinatorics solutions