GATE Computer ScienceVery hardGATE CSE

How many integer solutions does x₁ + x₂ + x₃ + x₄ + x₅ = 30 have if 3 ≤ xᵢ ≤ 10 for every i?

  1. A. 3876
  2. B. 4035
  3. C. 4200
  4. D. 2226

Correct answer: D. 2226

Put yᵢ = xᵢ − 3: Σyᵢ = 15 with 0 ≤ yᵢ ≤ 7; inclusion–exclusion C(19,4) − 5·C(11,4) + 10·C(3,4)... gives 2226 (confirmed by polynomial DP).

More Discrete Mathematics questions

Exams that ask this topic