GATE Computer ScienceModerateGATE CS (PYQ pattern)

In how many ways can 50 be written as an unordered sum of 2s, 5s and 10s that uses at most three 10s?

  1. A. 21
  2. B. 15
  3. C. 18
  4. D. 16

Correct answer: C. 18

With c tens (c = 0…3) we need 2a + 5b = 50 − 10c, so b is even and b ≤ (50 − 10c)/5: the number of even b in [0, 10 − 2c] is 6 − c. Sum over c = 0..3: 6 + 5 + 4 + 3 = 18 (allowing up to five 10s adds 2 + 1 = 3, giving 21).

More Discrete Mathematics questions

Exams that ask this topic