Placement AptitudeVery hardTCS NQT · Infosys pattern

In how many ways can 20 identical chocolates be distributed among 5 children so that each child gets at least 2 and at most 6 chocolates?

  1. A. 375
  2. B. 406
  3. C. 396
  4. D. 381

Correct answer: D. 381

Let y_i=x_i-2>=0; then the sum of y_i=10 with each y_i<=4. Unrestricted: C(14,4)=1001. One variable >=5 (shift by 5, sum=5): C(9,4)=126 per child, 5 children giving 630. Two variables >=5 together (forced to exactly 5 each, rest 0): C(5,2)=10. By inclusion-exclusion: 1001-630+10=381.

More Permutations, Combinations and Probability (Placement) questions

Exams that ask this topic