Mathematics (JEE)HardCodeforces Div2 C

How many binary strings s_0 s_1 ... s_7 of length 8 contain exactly three 1s and no two 1s in cyclically adjacent positions (s_7 and s_0 count as adjacent)?

  1. A. 16
  2. B. 56
  3. C. 20
  4. D. 8

Correct answer: A. 16

Gaps: 3 ones on a cycle of 8 with no two adjacent leave 5 zeros in 3 gaps of at least one zero, counted by (8/(8-3)) * C(8-3, 3) = (8/5) * 10 = 16.

More Permutations, Combinations and Probability questions

Exams that ask this topic