Mathematics (JEE)Very hardGATE CS

How many binary strings of length 8 consist of exactly three runs, where a run is a maximal block of equal consecutive digits?

  1. A. 42
  2. B. 14
  3. C. 28
  4. D. 21

Correct answer: A. 42

Three runs cut the 8 digits into 3 non-empty blocks in C(7,2) = 21 ways, and the first digit has 2 choices, giving 2 × 21 = 42. Option 21 forgets the choice of the first digit.

More Permutations, Combinations and Probability questions

Exams that ask this topic