Placement AptitudeHardWipro NLTH · Cognizant pattern

How many solutions in non-negative integers does x + y + z = 10 have, if none of x, y, z may exceed 5?

  1. A. 21
  2. B. 66
  3. C. 36
  4. D. 18

Correct answer: A. 21

Without the cap: C(12, 2) = 66. If x ≥ 6, set x = 6 + x′: x′ + y + z = 4 gives C(6, 2) = 15; same for y and z. Two variables cannot both be ≥ 6. Answer = 66 − 45 = 21. 66 ignores the cap; 36 subtracts only 30.

More Permutations, Combinations and Probability (Placement) questions

Exams that ask this topic