Boxes numbered 1 to 5 are in a row. Each box is filled with either a red (R) or a blue (B) ball such that no two adjacent boxes contain blue balls. Balls of the same colour are identical. How many valid colourings are possible?

Difficulty: Easy

Correct Answer: 13

Explanation:


Introduction / Context:
We are counting binary strings of length 5 using symbols {R,B} with the constraint that there are no consecutive B’s. Boxes are distinct (positions matter), colours are identical items.



Given Data / Assumptions:

  • Length n = 5.
  • Alphabet {R,B}; constraint: no BB.
  • All that matters is the pattern across positions.


Concept / Approach:
Let a(n) be the number of valid strings of length n with no consecutive B. Standard recurrence: a(n) = a(n−1) + a(n−2), with bases a(1) = 2 (R,B) and a(2) = 3 (RR, RB, BR). This is the Fibonacci-type count for “no adjacent 1s” problems.



Step-by-Step Solution:
a(1)=2, a(2)=3.a(3)=a(2)+a(1)=3+2=5.a(4)=5+3=8.a(5)=8+5=13.



Verification / Alternative check:
Constructive count by splitting into strings ending with R (a(n−1) choices) or with B (requires previous R, giving a(n−2)).



Why Other Options Are Wrong:
10 and 8 undercount by truncating the recurrence; 22 is overcounting unconstrained patterns; 13 is exact.



Common Pitfalls:
Assuming indistinguishable boxes (they are positioned) or forgetting that pattern RB R… is allowed but BB is not.



Final Answer:
13

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion