Wolf, goat and cabbage problem

In the earliest known occurrence of this problem, in the medieval manuscript Propositiones ad Acuendos Juvenes, the three objects are a wolf, a goat, and a cabbage, but other cosmetic variations of the puzzle also exist, such as: wolf, sheep, and cabbage;[4][2], p. 26 fox, chicken, and grain;[5] fox, goose and corn;[6] and panther, pig, and porridge.

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.

[10] The puzzle has been found in the folklore of African-Americans, Cameroon, the Cape Verde Islands, Denmark, Ethiopia, Ghana, Italy, Romania, Russia, Scotland, the Sudan, Uganda, Zambia, and Zimbabwe.

In his 'Arabian Nights' memoir, Meetings with Remarkable Men, the metaphysical Magus, G. I. Gurdjieff cites this riddle as "The Wolf, the goat and the cabbage".

He notes, "This popular riddle clearly shows that...not solely by means of the ingenuity which every normal man should have, but that in addition he must not be lazy nor spare his strength, but must cross the river extra times for the attainment of his aim."

In the Class of 3000 episode "Westley Side Story", Sunny and his students perform a similar exercise involving a chicken, a coyote and a sack of corn.

The Between the Lions episode "Farmer Ken's Puzzle" portrays it being made into a computer game with a cat, a hen, and a sack of seeds.

In the Star Trek: Prodigy episode "Time Amok", a holographic version of Kathryn Janeway employs the tale (here told as the chicken, fox and grain problem) to teach the crew of the USS Protostar how to work together.

Illuminated illustration depicting the wolf, goat and cabbage problem in the Ormesby Psalter , dating to 1250–1330
The two solutions with the vertical axis denoting time, and brown, grey, green and beige paths denoting the wolf, goat, cabbage and boat, respectively
An animation of the solution
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.
Interactive chicken, fox and grain problem.