River Crossing Puzzles: How to Solve Them, With Three Originals
River crossing puzzles are some of the oldest puzzles on record. NRICH, the mathematics enrichment project at the University of Cambridge, notes that they go back to Alcuin, a 9th-century scholar who set them for the Emperor Charlemagne. Alcuin's best-known version used a wolf, a goat, and a cabbage. NRICH's retelling uses a fox, a hen, and a sack of corn.
The setup is always similar: a small boat, a rule about who can travel together, and a rule about who cannot be left alone. The method below solves any puzzle of this kind and shows how to prove one is impossible. Three original puzzles follow. Each answer was confirmed by searching every reachable arrangement of the two banks.
1. The classic puzzle
In NRICH's version, a farmer must take a fox, a hen, and a sack of corn across a river. The boat holds the farmer and one purchase, and only the farmer can row. Left alone without the farmer, the fox would eat the hen, and the hen would eat the corn.
NRICH gives the answer: there are exactly two ways to do it in seven crossings, and both start with the hen. Here is one:
- Take the hen across.
- Return alone.
- Take the fox across.
- Bring the hen back.
- Take the corn across.
- Return alone.
- Take the hen across.
The surprising move is step 4. Bringing something back feels like going backward, but it is the only way to avoid leaving a dangerous pair together.
2. A method that works every time
1. Write the state as two lists. Who is on the near bank, who is on the far bank, and which side the boat is on. NRICH's guidance on working systematically stresses recording results in an organized way, and a two-column list after each crossing does exactly that.
2. Check only the bank the farmer is leaving. The farmer's own bank is always safe, because the farmer is there. Danger only exists on the bank left behind.
3. List every legal trip from the current state. With a one-item boat, the choices are "go alone" or "take one item." That is a short list.
4. Never repeat a state. If a trip recreates an arrangement you already had, it cannot be part of a shortest solution.
5. Count one-way trips. Every crossing in either direction counts as one. Because the boat must end on the far side, the total is always odd.
3. How to tell a puzzle is impossible
Look at the very first trip. The farmer leaves everything except what fits in the boat. If every possible load leaves a dangerous pair behind, the puzzle cannot even start. That is the quickest impossibility test, and it is the key to Puzzle 1 below.
4. Puzzle 1
A farmer must take a dog, a cat, a mouse, and a piece of cheese across a river. The boat holds the farmer plus one item. Left alone without the farmer, the dog will chase the cat, the cat will chase the mouse, and the mouse will eat the cheese. Can it be done?
5. Puzzle 2
Same farmer, same four items, same rules about who cannot be left together. This time the boat holds the farmer plus up to two items. What is the fewest number of crossings?
6. Puzzle 3
Four hikers weigh 40, 60, 80, and 100 kilograms. Their raft carries at most 120 kilograms, needs at least one person aboard to paddle, and anyone can paddle. What is the fewest number of crossings to get all four across?
7. Answers
Puzzle 1: No, it is impossible. On the first trip the farmer leaves three items behind. Taking the dog leaves the cat with the mouse. Taking the cat leaves the mouse with the cheese. Taking the mouse leaves the dog with the cat. Taking the cheese leaves the dog with the cat. Going alone leaves all four. Every option leaves a dangerous pair, so no first move is safe.
Puzzle 2: 3 crossings.
- Take the cat and the cheese across. The dog and the mouse stay behind, and neither bothers the other.
- Return alone. The cat and the cheese wait together, which is safe.
- Take the dog and the mouse across.
Three crossings is the minimum, because one trip cannot carry four items and the next odd number is 3. The search found one other 3-crossing route, using the same idea.
Puzzle 3: 7 crossings.
- 40 and 60 cross.
- 40 returns.
- 100 crosses alone.
- 60 returns.
- 40 and 60 cross.
- 40 returns.
- 40 and 80 cross.
Why not fewer? The 100-kilogram hiker must cross alone, and 60 and 80 together are too heavy. Every trip except the last also needs someone to bring the raft back. A search of every possible sequence confirmed that no route with 5 crossings exists, while several different routes reach 7.
8. Common mistakes
- Forgetting the return trip. The boat does not row itself back, so every outward trip except the last needs a return.
- Checking the wrong bank. The bank with the farmer is always safe; check the one being left.
- Ignoring "bring something back." Many shortest solutions need an item to make a return journey.
9. Key takeaways
- Track both banks and the boat after every crossing, and only check the bank the farmer is leaving.
- Count each one-way trip; since the boat must finish on the far side, the minimum is always odd.
- If every possible first load leaves a dangerous pair behind, the puzzle is impossible.
- A bigger boat can turn an impossible puzzle into a 3-crossing one.
- In weight puzzles, find who must travel alone first; that usually sets the minimum number of trips.