A river, a small boat and three passengers who cannot stay with just any company. The farmer will have to come and go more times than seems necessary.

The wolf, the goat and the cabbage

Riddle statement

A farmer must cross a river with a wolf, a goat and a cabbage. The boat can only carry the farmer and one of the other three.

If you leave the wolf alone with the goat, the wolf eats it. If you leave the goat alone with the cabbage, the goat will eat it.

How can everyone cross without either of those things happening?

Show solution

Solution

Answer: a minimum valid sequence is:

  1. The farmer takes the goat to the other side.
  2. The farmer returns alone.
  3. The farmer takes the wolf to the other side.
  4. The farmer returns with the goat.
  5. The farmer carries the cabbage to the other side.
  6. The farmer returns alone.
  7. The farmer takes the goat to the other side.

It also works by exchanging the order of the wolf and the cabbage: take the cabbage first, bring back the goat, then carry the wolf and finish by carrying the goat.

At the end, wolf, goat and cabbage are on the other side.