GATE Computer ScienceHardGATE CS (PYQ pattern)
In how many ways can 16 be written as an ordered sum (a composition) of parts each equal to 1, 3 or 4?
- A. 1144
- B. 1175
- C. 1156
- D. 987
Correct answer: C. 1156
cₙ = cₙ₋₁ + cₙ₋₃ + cₙ₋₄ with c₀ = 1: iterating gives c₁₆ = 1156.
More Discrete Mathematics questions
- How many ordered 5-tuples of positive odd integers, each at most 9, sum to 25?
- Eight people A, B, C, D, E, F, G, H sit around a round table (arrangements that differ by rotation are the same). In how many arrangements…
- How many permutations of {1, …, 6} have no increasing subsequence of length 4 and no decreasing subsequence of length 3?
- How many relations on {1, 2, 3} are reflexive and transitive (preorders) but are neither symmetric nor antisymmetric?
- A tree has 3 vertices of degree 4, 2 vertices of degree 3 and every other vertex is a leaf (degree 1). How many vertices does the tree have?
- The wheel W₉ consists of a hub joined to every vertex of a 9-cycle. What is its chromatic number?