Placement AptitudeVery hardTCS Digital · Infosys SP · CAT

How many solutions in integers does x₁ + x₂ + x₃ + x₄ = 20 have with 1 ≤ xᵢ ≤ 8 for every i?

  1. A. 315
  2. B. 969
  3. C. 285
  4. D. 309

Correct answer: A. 315

Put yᵢ = xᵢ - 1, so the yᵢ sum to 16 with 0 ≤ yᵢ ≤ 7. Inclusion-exclusion: C(19,3) - 4·C(11,3) + 6·C(3,3) = 969 - 660 + 6 = 315.

More Permutations, Combinations and Probability (Placement) questions

Exams that ask this topic