Problem #11 EASY
Ferrying Animals Across the River
Meta Logic Lateral Thinking
Problem Statement
A farmer is returning from the market with a wolf, a goat, and a head of cabbage. He must cross a river, but his small boat can only hold himself and one of the three items at a time.
If left unattended, the wolf will eat the goat, and the goat will eat the cabbage. The farmer must safely transport all three to the other side of the river.
How can the farmer accomplish this task?
Answer & Quick Explanation
Think you've got it? Click below to check your answer.
Take the goat first, return empty, take the wolf, return with the goat, take the cabbage, return empty, and finally take the goat across.
Detailed Editorial Solution
Want to see the step-by-step breakdown? Click below to reveal the editorial.
This is a classic state-space search puzzle where we must avoid leaving the wolf with the goat, or the goat with the cabbage.
Here is the step-by-step ferry plan:
1. The farmer takes the goat across the river, leaving the wolf and cabbage together (safe).
2. The farmer returns alone.
3. The farmer takes the wolf across.
4. To prevent the wolf from eating the goat, the farmer brings the goat back to the starting side.
5. The farmer takes the cabbage across, leaving the goat behind. The cabbage is now safely on the other side with the wolf (safe).
6. The farmer returns alone.
7. The farmer takes the goat across one last time.
All three items are now safely on the other side.