Table of contents |
|
Introduction |
|
Problem Statement |
|
Solution |
|
Conclusion |
|
The farmer wants to cross the river with his goat, wolf, and cabbage but there is only one boat available which can support only two objects at a time. Moreover, he cannot leave the goat and wolf alone or the wolf will eat the goat, and he cannot leave the goat and cabbage alone or the goat will eat the cabbage. So, what is the solution to this problem?
How the Farmer Can Cross the River with His Belongings?
Step 1: Taking the goat on the other side
The farmer will take the goat on the other side and return back alone. So, on one side, we have the farmer, wolf, and cabbage, and on the other side, we have the goat.
Step 2: Taking the wolf on the other side
Next, he will take the wolf along, drop him on the other side, and return with the goat. So, on one side, we have the farmer, cabbage, and goat, and on the other side, we have the wolf.
Step 3: Taking the cabbage on the other side
Now, he takes the cabbage along and returns alone. So, on one side, we have the farmer and goat, and on the other side, we have the wolf and cabbage.
Step 4: Taking the goat on the other side
Finally, he crosses the river with the goat and succeeds in taking all his belongings with him.
The farmer successfully crossed the river with all his belongings by taking them one by one, ensuring that no two objects that cannot be left alone together are left on one side.