Mathematics (JEE)Very hardGATE CS

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

  1. A. 80
  2. B. 59
  3. C. 24
  4. D. 48

Correct answer: B. 59

Choose the two positions of the 0s in C(5,2) = 10 ways. The other three positions take 1 or 2, and a 1 must not sit next to another 1. Count the valid fillings for each placement of the 0s to get the total.

More Permutations, Combinations and Probability questions

Exams that ask this topic