Difficulty: Easy
Correct Answer: 13
Explanation:
Introduction / Context:
We are counting binary strings of length 5 with no consecutive B’s. This classic constraint yields a Fibonacci-type recurrence.
Given Data / Assumptions:
Concept / Approach:
Let a(n) be the number of valid strings of length n. Appending R to any valid string of length n−1 is always allowed; appending B is allowed only to strings of length n−1 that end in R. This leads to a(n) = a(n−1) + a(n−2), a Fibonacci recurrence.
Step-by-Step Solution:
Base cases: a(1) = 2 (R, B); a(2) = 3 (RR, RB, BR).Then a(3) = 5; a(4) = 8; a(5) = 13.Therefore, there are 13 valid arrangements for 5 boxes.
Verification / Alternative check:
Direct enumeration confirms: 8 with at most two B’s spaced apart plus 5 with exactly two B’s non-adjacent.
Why Other Options Are Wrong:
8 and 10 undercount; 15 and 22 overcount by allowing adjacent B’s.
Common Pitfalls:
Assuming each position always has 2 independent choices (which ignores the adjacency ban) or forgetting that RB and BR are both valid.
Final Answer:
13
Discussion & Comments