Mathematics (JEE)HardGATE CS

How many strings of length 5 over {0, 1, 2} contain no two consecutive 0s?

  1. A. 164
  2. B. 81
  3. C. 100
  4. D. 120

Correct answer: A. 164

Each position after a 0 has 2 choices and any other position has 3, so the count follows a linear recurrence; enumeration gives 164. Option 81 is 3⁴ and ignores the restriction.

More Permutations, Combinations and Probability questions

Exams that ask this topic