The river crossing problem
A farmer is traveling with a fox, a goose, and a bag of beans. During his journey, he comes across a river with a boat to cross it.
The farmer can only fit one thing in the boat with him at a time. If left alone together, the fox will eat the goose or the goose will eat the beans.
How does the farmer get everything across the river safely?