Mathematics (JEE)HardGATE CS

In how many ways can 10 be written as an ordered sum of parts, each part equal to 1 or 3?

  1. A. 28
  2. B. 34
  3. C. 21
  4. D. 55

Correct answer: A. 28

Let c(n) count such sums; the last part is 1 or 3, so c(n) = c(n−1) + c(n−3) with c(0) = c(1) = c(2) = 1, and c(10) = 28. Option 34 comes from a shifted starting value.

More Permutations, Combinations and Probability questions

Exams that ask this topic