Mathematics (JEE)HardGATE CS

How many binary strings of length 10 contain no three consecutive 1s?

  1. A. 274
  2. B. 504
  3. C. 149
  4. D. 233

Correct answer: B. 504

Let t(n) be the valid strings of length n, classified by how the string ends (in 0, 10, or 110, or 111 is forbidden): t(n) = t(n−1) + t(n−2) + t(n−3) with t(0) = 1, t(1) = 2, t(2) = 4, giving t(10) = 504. Option 274 is the count for length 9.

More Permutations, Combinations and Probability questions

Exams that ask this topic