Mathematics (JEE)HardGATE CS

How many strings of length 4 over {0, 1} contain no substring 010?

  1. A. 10
  2. B. 16
  3. C. 14
  4. D. 12

Correct answer: D. 12

Enumerating the 16 binary strings of length 4 and removing those with 010 at positions 1–3 or 2–4 gives 12. Option 16 ignores the forbidden pattern.

More Permutations, Combinations and Probability questions

Exams that ask this topic