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?
- A. 21
- B. 15
- C. 18
- 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
- How many words of length 8 over the alphabet {a, b, c} contain each of the letters a, b and c an even number of times (zero allowed)?
- How many binary search trees on the keys 1, 2, …, 9 have 4 at the root and 7 as the right child of the root?
- How many permutations of {1, …, 8} have no cycle of length 1 or 2 (every cycle has length ≥ 3)?
- How many permutations π of {1, …, 8} satisfy π² = identity with none of 1, 2, 3 being a fixed point?
- In an election A gets 10 votes and B gets 6. Votes are counted one at a time (votes for the same candidate indistinguishable). In how many…
- T(0) = T(1) = 1 and T(n) = T(n − 1) + T(n − 2) + n for n ≥ 2. What is T(12)?