Mathematics (JEE)Very hardCodeforces Div2 C

How many binary strings of length 10 contain neither the substring 11 nor the substring 000?

  1. A. 28
  2. B. 144
  3. C. 504
  4. D. 1024

Correct answer: A. 28

Track the trailing run with a transfer matrix over states 'ends in 1', 'ends in one 0', 'ends in two 0s'; the valid length-10 strings number 28.

More Permutations, Combinations and Probability questions

Exams that ask this topic