Fox, goose and grain: crossing the river
product-puzzle case · difficulty 2/5 · 15 minutes · other
Prompt
A man has a fox, a goose and a sack of grain. He must cross a river in a boat that holds only himself and one item. If he leaves the fox alone with the goose, the fox eats the goose. If he leaves the goose alone with the grain, the goose eats the grain. How does he get everything across?
Context
A classic interview puzzle. Core idea: Take goose, return empty. Take fox, return with goose. Take grain, return empty. Take goose. Talk through your reasoning; the interviewer cares as much about structure as about the answer.
Clarifying questions
- Can he bring items back?
- Yes, he may bring an item back and he may cross alone. The fox and the grain can safely be left together. Only fox with goose, and goose with grain, are unsafe without him.
Recommendation
**Answer:** 7 crossings: goose across; back alone; fox across; goose back; grain across; back alone; goose across. **Why:** The goose must never be left with either other item, so it has to cross first and be shuttled back once to avoid the fox and the goose being left alone.
Risks
- Taking the fox or the grain first, which leaves the goose with the other one
- Forgetting to bring the goose back on the second crossing
Next steps
- Write out the solution with the fox and grain swapped
- Try the harder missionaries and cannibals crossing puzzle