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)?
- A. 16
- B. 56
- C. 20
- 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.
Practise more Permutations, Combinations and Probability questionsPermutations, Combinations and Probability: notes and key points
More Permutations, Combinations and Probability questions
- How many ordered pairs (A, B) of subsets of {1, 2, 3, 4, 5} satisfy |A intersect B| = 2?
- How many permutations of {1, 2, 3, 4, 5, 6} contain no three consecutive positions i, i+1, i+2 whose values are strictly decreasing?
- How many 3-element subsets of {1, 2, ..., 20} have an element sum divisible by 4?
- How many ordered triples (a, b, c) of distinct elements from {1, 2, ..., 7} have a + b + c divisible by 3?
- How many functions f from {1, 2, 3, 4} onto {1, 2, 3} (every value 1, 2, 3 is attained) satisfy f(1) != f(2)?
- How many permutations p of {1, 2, ..., 6} satisfy p(i) != i and p(i) != 7 - i for every i from 1 to 6?