LibraryQuant brainteasers

Wolf Goat Cabbage River Crossing Puzzle

Quant brainteaser · intro · members

The question

A farmer is on one bank of a river with a wolf, a goat, and a cabbage. There is a boat that holds the farmer and at most one of the other three at a time. If left alone together without the farmer present, the wolf will eat the goat, and the goat will eat the cabbage. The wolf has no interest in the cabbage.

Get the wolf, the goat, and the cabbage across the river, with nothing eaten along the way.

Hint

Write down which pairs cannot be left alone on a bank, and see what the two pairs have in common. Then check whether the rules ever require a return trip to be made empty.

The idea behind it

Treat the situation as a graph of allowed states connected by legal moves, and the puzzle becomes finding any path through it, which turns a riddle about intuition into a search problem, and the trick items falls out of noticing which one is safe to leave and re-collect.

The worked solution is for members

You have the question, a hint and the idea. It gives a full sequence of crossings, checks every bank along the way, and shows why no shorter sequence exists.

Further reading

Topics

Also in the library