Walking down Jane Street, Ralph passed four houses in a row, each painted a different color. He passed the orange house before the red house, and he passed the blue house before the yellow house. The blue house was not next to the yellow house. How many orderings of the colored houses are possible?
- A)
- B)
- C)
- D)
- E)
Answer
B
Key insight
Place blue and yellow first: blue before yellow and not adjacent leaves only positions (1,3), (1,4), (2,4), and orange-then-red fills the rest uniquely.
Solution
Number the positions to in the order Ralph passes them. The blue and yellow houses carry the tightest restrictions, so place them first: blue comes before yellow and they are not adjacent. The position pairs (blue, yellow) that are not consecutive are
For each of these, the two open positions must hold orange and red with orange first, which can be done in exactly one way. So each pair gives one ordering:
The answer is .
Why this works
Handle the most constrained objects first; once they are fixed, the remaining constraints often leave no choice. A condition of the form "X before Y" on two specific items means only one of the two placements of that pair counts, which is why the orange-red pair contributes a factor of rather than .
Alternative approach
Count from the other side: with colors there are orders, and the two "before" conditions each cut the count in half, leaving . Of these, the ones with blue directly followed by yellow are , , : three orders. So .
The trap
Forgetting the non-adjacency condition and counting all C(4,2) = 6 placements of blue and yellow, giving (E).
Common mistakes
- Forgetting the non-adjacency condition and counting all C(4,2) = 6 placements of blue and yellow, giving (E).
- Reading "not next to" as also forbidding orange next to red, which wrongly eliminates valid orders.
Techniques
Organized listing / direct enumeration