GATE Computer ScienceVery hardGATE CS

How many ordered triples (a, b, c) of non-negative integers satisfy 2a + 3b + 5c = 40?

  1. A. 31
  2. B. 34
  3. C. 36
  4. D. 38

Correct answer: B. 34

For c = 0, 1, ..., 8 the remaining sum 40 − 5c = 40, 35, 30, 25, 20, 15, 10, 5, 0 has 7, 6, 6, 4, 4, 3, 2, 1, 1 solutions of 2a + 3b = N respectively (b must have the parity of N). The total is 34.

More Discrete Mathematics questions

Exams that ask this topic