Mathematics (JEE)HardGATE CS
How many strings of length 5 over {0, 1, 2} contain no two consecutive 0s?
- A. 164
- B. 81
- C. 100
- D. 120
Correct answer: A. 164
Each position after a 0 has 2 choices and any other position has 3, so the count follows a linear recurrence; enumeration gives 164. Option 81 is 3⁴ and ignores the restriction.
Practise more Permutations, Combinations and Probability questionsPermutations, Combinations and Probability: notes and key points
More Permutations, Combinations and Probability questions
- How many non-negative integer solutions are there to x + y + z = 6 with x ≤ 2?
- How many ordered 4-tuples of integers, each between 1 and 4 inclusive, have sum 12?
- How many triples of integers (a, b, c) with 0 ≤ a < b ≤ c ≤ 5 are there?
- Five fair dice are rolled. What is the probability that their total is exactly 6?
- A fair coin is tossed repeatedly. What is the probability that the first head appears on the 4th toss?
- Four people put their hats in a box and each takes one hat at random. What is the expected number of people who take their own hat?