Mathematics (JEE)Very hardGATE CS

How many words of length 8 over {a, b} contain no three consecutive equal letters?

  1. A. 256
  2. B. 136
  3. C. 64
  4. D. 68

Correct answer: D. 68

Words are runs of length 1 or 2 alternating between a and b; compositions of 8 into 1s and 2s number F₉ = 34, times 2 choices for the first letter: 68. The enumeration gives 68. Option 136 double-counts.

More Permutations, Combinations and Probability questions

Exams that ask this topic