[[quoteright:348:[[{{Poptropica}} http://static.tvtropes.org/pmwiki/pub/images/foxchickengrainpuzzle_8397.png]]]]
[[caption-width-right:348: "I've got one word for you: ''Trebuchet!''"]]

->'''''RATS!''' Your goose is cooked!''
-->-- a failure message from one computer version of this puzzle

A StockPuzzle, subset of the InventoryManagementPuzzle. You are a farmer taking a fox (or a wolf), a chicken (or a goose) and a sack of grain to market ([[BellisariosMaxim don't ask why you're taking a fox to market]]) and you come across a river. The only way across the river is by a small boat, which can only hold at most you and one of the three items. Left unsupervised, the chicken will eat the grain or the fox will eat the chicken (however, the fox [[CaptainObvious won't try to eat the grain]], nor will the fox or the chicken wander off). What's the quickest way to get everything across the river?

The standard answer is:
# Take the chicken across
# Come back with the boat empty besides yourself
# Take the grain (or the fox) across
# Take the chicken back
# Take the fox (or the grain) across
# Come back with the boat empty besides yourself
# Take the chicken across

This puzzle's primary difficulty to those new to the puzzle is in accepting that one must accept the possibility of taking an action that seems detrimental or a step back from their original goal in order to ultimately complete it.

May also appear with different animals and vegetables, such as wolves, sheep and cabbages. A "jealous husbands" variant has three couples trying to cross a river with a two-person rowboat, but none of the men will allow his wife to be alone with either of the other men on either side of the river. It, too, can be solved in seven steps.

This is an ancient puzzle. The oldest known example was found in ''Propositiones ad Acuendos Juvenes'', which dates to the late ninth century.

A more complicated version, but which operates on much the same principle, involves a barrier (usually a bridge), four people who all move at different rates, and some item that is required in order to cross the barrier (most often a flashlight). The puzzle is to get all the people across within a specified amount of time, which seems to be too short. Probably the most well-known version of this is:
-->Four men want to cross a bridge. They all begin on the same side. It is night, and they have only one flashlight with them. At most two men can cross the bridge at a time, and any party who crosses, either one or two people, must have the flashlight with them.
-->The flashlight must be walked back and forth: it cannot be thrown, etc. Each man walks at a different speed. A pair must walk together at the speed of the slower man. Man 1 needs 1 minute to cross the bridge, man 2 needs 2 minutes, man 3 needs 5 minutes, and man 4 needs 10 minutes. For example, if man 1 and man 3 walk across together, they need 5 minutes.

-->The Question: How can all four men cross the bridge within 17 minutes?
-->The Answer: [[spoiler:Men 1 and 2 cross, 1 (or 2) returns, 3 and 4 cross, 2 (or 1) returns, 1 and 2 cross.]]

There's yet '''another''' variant called "Missionaries and Cannibals" where the poor missionaries get eaten if the number of cannibals are greater than theirs.
----
!!Examples:

[[foldercontrol]]

[[folder: Anime and Manga ]]

* The cannibals and missionaries version is mentioned in ''UminekoNoNakuKoroNi'', with wolves and sheep.

[[/folder]]

[[folder: Card Games ]]

* The first puzzle appears in ''PerplexCity'', with a professor, a senior fellow and a cocktail. The second shows up nearly verbatim.

[[/folder]]

[[folder: Literature ]]

* This puzzle is featured quite humorously in a Czech-language gamebook ''Norik'': You need to cross a river and you meet a farmer with a boat, a wolf, a goat and a basket of cabbage and need to help him get the three 'items' on the other side of river. When he returns back to get the goat, you must convince him to get you over the water first. Then, when he returns to finally get the goat, the wolf grows tired of not being able to eat the goat and eats the cabbage instead. Norik (your alter-ego) shouts at it and the wolf runs off, which also results in the rest of the cabbage being thrown into river. As you hear the farmer shout profanities at you, you decide to not wait for him and go on. Later, you arrive at a farmhouse, where you could sleep, but decide not to after it turns out to be that farmer's house, when he runs after you, pulling (and strangling) the goat after him.
* The PiersAnthony novel ''[[IncarnationsOfImmortality With a Tangled Skein]]'' has this near the ending, with the Missionaries/cannibals variant. The complication is that there are three women and three demons, and if the demons outnumber the women at any point, [[{{Squick}} the women will be raped]].
* Near the end of Creator/JohnVarley's ''Red Thunder'', Manny mentally compares the situation of saving several trapped people from the wreckage of a spaceship to this puzzle. As he arranges to get them out, he solves it in his head.

[[/folder]]

[[folder: Live-Action TV ]]

* In an episode of TheBBC's version of ''TheOffice'', Gareth and Tim are assigned to solve this puzzle as a problem-solving exercise. As always, Gareth complicates things by taking it literally...
-->'''Gareth:''' Get his wife to help.
-->'''Tim:''' He doesn't have a wife.
-->'''Gareth:''' All farmers have wives.
-->'''Tim:''' This one doesn't; he's gay.
-->'''Gareth:''' Well then, he shouldn't be allowed near animals, should he?
* Subverted in ''Beauty and the Geek''. The puzzle included a rowboat, a sack of grain and a toy chicken and fox. The solution was to take them all at once since toy animals don't eat each other.
* ''{{Mongrels}}'' references this in the first episode with Nelson the fox, his chicken "girlfriend" and a bag of grain they were eating. They solved it by knocking out the boat's owner and stealing it.

[[/folder]]

[[folder: MMORP Gs ]]

* ''{{Runescape}}'' has one of these, completing a similar task for Temple Knight Sir Sisyphus.
** The bridge type showed up in a recent quest.
* The free children's MMO ''{{Poptropica}}'' has a puzzle involving this.

[[/folder]]

[[folder: Newspaper Comics ]]

* Parodied in a ''ComicStrip/{{Dilbert}}'' strip featuring the question asked to an immoral job interviewee, whose proposed solution is to take out insurance on the chicken, eat it, then blame the fox.

[[/folder]]

[[folder: Video Games ]]

* A variant of this turned up in ''VideoGame/{{Uninvited}}'', where if you didn't choose correctly between a small bird, a housecat and a snake, then one of the remaining animals would eat the third, and then it would ''slaughter'' you (the solution was to [[spoiler:take the bird, since the snake is too full to move after it's eaten the cat]]).
* Naturally, various versions of this puzzle pops up in the ''ProfessorLayton'' series.
* ''VideoGame/ZorkZero'' has you collect a fox, a chicken and an earthworm, all to be taken across a swamp and used in "Borphbelly Stew".
* ''CrusaderOfCenty'' (known as ''Soleil'' in Europe and ''Ragnacenty'' in Japan) for the SegaGenesis[=/=]Mega Drive uses this puzzle, but with a chicken, a caterpillar, and a flower.
** The caterpillar then decides to join your party to see the world. And it's a talking flower.
* Appears near the end of the third ''BrokenSword'' game.
* This was apparently the entire concept of an in-universe video game on ''Series/BetweenTheLions'' [[spoiler:with the fox replaced with a cat for no known reason]]. Not much replay value there...
* In a subquest in ''VideoGame/FinalFantasyXII'', in order to make one of the cockatrice go back home, you must transport the cockatrice, a wolf and the boy across a river.
* An AdobeFlash game has a more complex variant [[http://jayisgames.com/archives/2006/06/raft_iq_puzzle.php involving a raft, eight people and a convoluted set of rules]]. [[TVTropesWillRuinYourLife Good luck!]]
* The obscure dating game ''Sprung'' on the NintendoDS had a variation to this on Brett's story. At one point Brett will be asked to go to Sanctuary with Becky, where he will bring his buds Lucas and Danny while she brings Alex and Erica. The catch, however, is that Becky wants a calmer night, so she doesn't want any funny business ([[FridgeLogic nevermind that Sanctuary is a raving night club where the nameless other people not mentioned in the game are probably doing just that]]). The puzzle comes where Brett meets everyone but Becky at the front of the club and he has to get all of them inside one by one. However, if Lucas and Alex or Danny and Erica are left alone and Brett comes back to them later, he will catch them making out, leading to Becky to see this, her announcing the night was ''ruined'' and you getting slapped with a game over. The puzzle is extended further because it's not only a matter of getting everyone inside, but also a matter of keeping everyone happy which means a lot of shuffling out people whom are already fine inside (such as dragging Danny out because he gets panicked over the sight of too many people, or dragging Lucas out for pep talk). Further rules are also added as time marches on, including how the aforementioned couples ''can'' later be left alone without problems after an event happens where Brett talks them down, or how new pairings are made that ''can't'' be left alone without you interfering with them (such as how, at one point, Danny and Lucas will fight if left alone).
* Appears as a series of wood-inlay pictures on a puzzle box in ''VideoGame/NancyDrew: The Last Train to Blue Moon Canyon''. It uses a dog, a cat and a bird, presumably because a bag of grain would be hard to identify in silhouette. Nancy deduces the animals' starting side ''for'' you, from no clues whatsoever!
* In ''PuzzleClubhouse'', a [[http://puzzleclubhouse.com/displaycontent?id=220 decorative fountain referencing the fox-chicken-grain puzzle]] won the popular vote, becoming a permanent part of Puzzle Clubhouse's landscaping.
* The first ''Midnight Mysteries'' uses the "jealous husbands" variant, involving two police officers, two sailors, two young boys, the player character, the boatman needed to transport the entire party across a river, and a boat that can carry a maximum number of three people, including the boatman. Aside from the boatman (not the player character, surprisingly) needing to be in the ferry at all times, the other rules are that the sailors must be under the watch of the officers, and the young boys must be accompanied by an adult at all times during the river crossing.

[[/folder]]

[[folder: Web Comics ]]

* Referenced in ''WebComic/{{xkcd}}'' [[http://xkcd.com/589/ here]].
** A [[http://xkcd.com/1134/ later strip]] proposed an alternative way to solve this puzzle.
---> 1. Take the goat across.
---> 2. Return alone.
---> 3. Take the cabbage across.
---> 4. Leave the wolf. [[FridgeLogic Why did you have a wolf?]]
* ''FullFrontalNerdity'' does it, with the [[http://nodwick.humor.gamespy.com/ffn/index.php?date=2009-04-15 Missionaries and Cannibals]] variant.

[[/folder]]

[[folder: Web Original ]]

* CleolindaJones describes ''Literature/{{Twilight}}'' thus:
-->Yeah, it's like, Bella wants to be a vampire but she doesn't want to be a vampire before she's had sex as a human, and Edward doesn't want her to be a vampire but he wants to get married, but Bella doesn't want to get married unless she can be a vampire, but Edward won't have sex with her until they get married, and then you put the fox and the grain in the boat and you leave the goose back on the riverbank.
* The Internet comedy duo [=BriTANicK=] used this as the starting point for one of their videos, wherein Brian asks Nick a number of brainteasers. Not that Brian cares about the answers; he's just obsessed with stealing Nick's Klondike bar, and the thought of Nick making out with his girlfriend.
* IT specialist site thedailywtf.com references the more complicated version with the bridge and four men [[http://thedailywtf.com/Articles/Classic-WTF-Job-Interview-20-Now-With-Riddles!.aspx here]] as the way to not do a job interview when looking for an IT specialist. Their prefered answer: leave the slow one behind!

[[/folder]]

[[folder: Western Animation ]]

* One episode of ''ClassOf3000'' had Sunny put his class through this task as training for an upcoming concert. Tamika lampshades it:
-->'''Tamika:''' Everybody knows that riddle!
-->'''Sonny:''' What riddle? (Pulls curtain open, revealing a chicken, a coyote and a sack of corn)
** Eddie and Philly Phil manage to get through it in fewer than seven steps due to Eddie bribing the coyote with a $100 bill to not eat the chicken.
--->'''Philly Phil:''' What's a coyote gonna do with a hundred dollars?
--->'''Eddie:''' [[WesternAnimation/LooneyTunes If cartoon memory serves me correctly, he'll spend it on Acme Rocket Skates.]]
* Showed up in the 20th season ''[[TheSimpsons Simpsons]]'' episode "Gone Maggie Gone". Homer is trying to get across a river with Maggie, Santa's Little Helper (who is trying to tear up Maggie's doll), and a jar of candy-coated rat poison.
--> '''Homer:''' [[LampshadeHanging Why did I bring the baby and the dog to the poison store??]]
** In the same episode, Cletus asks Homer for help with getting a fox, duck and corn across, but then "the puzzle done worked itself out" when both the corn and the duck are eaten.
* In SpaceGhostCoastToCoast, such a puzzle was used as a means of describing the concept of "branding" (no, NOT like branding with a hot iron). In typical Space Ghost fashion, the puzzle was... less-than-helpful in explaining the concept.
-->'''Space Ghost:''' Let's say you have a cow, a rowboat, and The Big Man.
-->'''Zorak:''' You mean, Clarence Clemmons?
-->'''Space Ghost:''' Of course. Now, the cow wants to transport Clarence across the river. But remember, the cow is on fire, and Clarence has no hands or bucket, so he has to untilize his hooks, ''[[MundaneMadeAwesome and the mighty power of his saxophone]]!''
** Note that no answer was given.
* In the ''{{Futurama}}'' episode "The Prisoner of Benda", the characters have to figure out how to return everything to normal after rampant body-swapping, the main complication being that no two people can swap with each other more than once. The solution actually proves a mathematical theorem developed by the episode's writer Ken Keeler, which states that you only need two extra people to swap everyone to their original bodies. The theorem is explained [[http://theinfosphere.org/Futurama_theorem here]].
* A variant appears in a training simulation the spies undergo in the ''TotallySpies'' TV movie.
----