Mathematics (JEE)HardTCS NQT · Accenture

How many strings of length 6 over the alphabet {0, 1, 2} contain exactly two 0s, with the two 0s not in adjacent positions?

  1. A. 240
  2. B. 320
  3. C. 160
  4. D. 80

Correct answer: C. 160

Non-adjacent positions for two 0s among 6 can be chosen in C(5,2) = 10 ways; each of the other 4 positions holds 1 or 2, giving 10 * 2^4 = 160.

More Permutations, Combinations and Probability questions

Exams that ask this topic