Mathematics (JEE)Very hardCodeforces Div2 C
How many binary strings of length 10 contain neither the substring 11 nor the substring 000?
- A. 28
- B. 144
- C. 504
- D. 1024
Correct answer: A. 28
Track the trailing run with a transfer matrix over states 'ends in 1', 'ends in one 0', 'ends in two 0s'; the valid length-10 strings number 28.
Practise more Permutations, Combinations and Probability questionsPermutations, Combinations and Probability: notes and key points
More Permutations, Combinations and Probability questions
- How many words of length 6 over the alphabet {a, b, c} contain neither the substring aa nor the substring bb?
- How many partial orders (reflexive, antisymmetric and transitive relations) are there on the labelled set {1, 2, 3, 4}?
- How many relations R on the set {1, 2, 3} are transitive, meaning that whenever (a,b) and (b,c) are in R, then (a,c) is also in R?…
- How many functions f from {1, 2, 3, 4, 5} to itself satisfy f(f(x)) = f(x) for every x?
- How many functions f from {1, 2, 3, 4} to {1, 2, 3, 4, 5} are non-decreasing, meaning f(1) <= f(2) <= f(3) <= f(4)?
- How many functions f from {0, 1, 2, 3, 4, 5} to itself satisfy f(f(x)) = x for every x?