River Crossing Puzzles
River crossing puzzles are transport logic problems dating back to at least the 9th century, when Alcuin of York recorded the wolf-goat-cabbage riddle. You must move a group across a river in a small boat while respecting rules about who can be left together, making them an early study in state-space search.
River Crossing Puzzles Rules
A set of characters or items must cross a river using a boat that holds a limited number — often just the ferryman plus one passenger. Everyone starts on the same bank, and the boat cannot cross empty when something needs to come back.
Constraints forbid certain combinations from being left alone on a bank without a guardian. In the classic version, the wolf eats the goat and the goat eats the cabbage if left together, so those pairs must never be unsupervised.
You make trips back and forth, sometimes carrying an item backward to keep the banks safe. The puzzle is solved when everyone has reached the far bank with no forbidden combination ever left alone.
River Crossing Puzzles Strategy & Tips
Identify the universal troublemaker
In the wolf-goat-cabbage puzzle the goat conflicts with both others, so it must move first and shuttle back later. Find the item that appears in every conflict and build the plan around it.
Embrace the backward trip
The key insight is that you sometimes ferry an item back to the start bank. Refusing to ever undo a crossing is exactly what makes the puzzle feel impossible.
Check both banks after every trip
A move is only legal if neither the bank you leave nor the bank you arrive at holds a forbidden pair. Verify both sides before committing to a crossing.
Work backward from the goal
Picture the last safe trip that lands everyone across, then reason about what state must precede it. Meeting in the middle from start and finish trims the search dramatically.
Frequently Asked Questions
How do you solve the wolf, goat, and cabbage puzzle?
Take the goat over first, return empty, take the wolf over and bring the goat back, leave the goat and take the cabbage over, then return for the goat. Seven crossings in all.
How old is the river crossing puzzle?
The wolf-goat-cabbage version appears in a manuscript attributed to Alcuin of York around 800 AD, making it well over 1,200 years old.
What's the missionaries and cannibals puzzle?
A harder variant where three missionaries and three cannibals cross in a two-seat boat, and cannibals must never outnumber missionaries on either bank. It takes eleven crossings.
Why do these puzzles matter in computer science?
They're textbook examples of state-space search. Each bank arrangement is a state, and solving the puzzle is finding a valid path between states — the core of many AI search algorithms.