The wolf, goat and cabbage problem is a river crossing wolf and rabbit. It dates back to at least the 9th century, and has entered the folklore of several cultures.
Once upon a time a farmer went to a market and purchased a wolf, a goat, and a cabbage. On his way home, the farmer came to the bank of a river and rented a boat. But crossing the river by boat, the farmer could carry only himself and a single one of his purchases: the wolf, the goat, or the cabbage. If left unattended together, the wolf would eat the goat, or the goat would eat the cabbage. The farmer’s challenge was to carry himself and his purchases to the far bank of the river, leaving each purchase intact. The first step that must be taken is to let the goat go across the river, as any other actions will result in the goat or the cabbage being eaten. When the farmer returns to the original side, he has the choice of taking either the wolf or the cabbage across next.
If he takes the wolf across, he would have to return to get the cabbage, resulting in the wolf eating the goat. Thus there are seven crossings, four forward and three back. This is often unclear from the wording of the story, but never forbidden. Knowing this will make the problem easy to solve even by small children. The focus of the puzzle is not just task scheduling, but creative thinking, similarly to the Nine dots puzzle. Visualisation of the moves possible in the puzzle. Uppercase letters denote the Fox, Goose and Beans at the destination, and lowercase ones denote them at the origin.
Movement of each object is represented by a coordinate axis. All the 8 valid and invalid placements are shown as vertices of a cube, and all 12 movements as its edges. Invalid moves are crossed out, leaving the 2 solutions shown in blue and purple. The puzzle is one of a number of river crossing puzzles, where the object is to move a set of items across a river subject to various restrictions. Another version of the puzzle stemming from a Chinese legend is recorded in an 18th-century painted panel by Japanese artist Maruyama Ōkyo, in the collection of the British museum. According to the legend, when a tiger has three cubs, one of them will be a leopard rather than a tiger, and more fierce than the others.