PlayNook

Math & Logic · Logic Puzzle

Play River Crossing — Alcuin's Puzzles

Four puzzles, three of them from the oldest surviving puzzle book. Getting everyone across is easy; doing it in the fewest crossings is the actual question.

Four puzzles about getting everyone to the far bank. Three of them are the oldest we have: problems 17, 18 and 19 of the Propositiones ad Acuendos JuvenesProblems to Sharpen the Young — attributed to Alcuin of York, who died in 804. The fourth, missionaries and cannibals, is the modern descendant of the same idea.

Getting everyone across is not the hard part. Doing it in the fewest crossings is, and knowing when you have stopped doing it is harder still.

  • 7 Wolf, goat and cabbage — crossings, and exactly two solutions
  • 11 Missionaries and cannibals — crossings, 8,100 shortest routes
  • 11 Brothers and sisters — same length, only 486 routes
  • 9 Man, woman, two children — crossings, eight ways to do it

How do you solve the wolf, goat and cabbage puzzle?

Seven crossings, and there are exactly two ways to do it. A farmer with a wolf, a goat and a cabbage, a boat that holds him and one other thing, and two rules: the wolf eats the goat, the goat eats the cabbage, and neither happens while the farmer is watching.

You will also see it called the wolf, sheep and cabbage puzzle. Same puzzle, same seven crossings — Alcuin's Latin says capra, a goat, and the sheep came in with later English retellings.

  1. Take the goat across — it is the only one that cannot be left with either of the others.
  2. Come back empty — the wolf and the cabbage are perfectly safe together.
  3. Take the wolf across — or the cabbage; this is the only real choice in the whole puzzle.
  4. Bring the goat back — the step everybody refuses, and the one the puzzle is built on.
  5. Take the cabbage across — leaving the goat alone on the near bank.
  6. Come back empty — the wolf and the cabbage are together again, which is fine.
  7. Fetch the goat — and all four are across in seven crossings.

Why do you have to take the goat back?

The goat is the only one of the three that conflicts with both of the others. So it goes over first, alone with nothing to eat. Whatever you carry second has to be left with something on the far bank — and it cannot be left with the goat.

So the goat comes back with you. That single reversal is what people are missing when they decide the puzzle is impossible.

Why are there only two solutions?

The complete state graph of the wolf, goat and cabbage puzzle: ten boxes showing which of the farmer, wolf, goat and cabbage are on each bank, connected by crossings, with two symmetric routes running from start to finish in seven steps.
The entire puzzle in one picture. Thirty-two arrangements exist, twenty are legal, and only these ten can be reached at all.

Because there is almost nothing to decide. The picture above is every position the puzzle can reach, and it gives the answer directly: no choice at all for the first two crossings, and none for the last two.

The only decision in the entire puzzle is at step three, where the route splits — and the two branches are mirror images, so it does not even matter which you take.

How do you solve missionaries and cannibals?

Eleven crossings, and unlike the wolf and goat there are 8,100 ways to do it. You do not need to find the one right route; you need to avoid a fairly small number of wrong ones.

Three missionaries, three cannibals, a boat for two, and one rule: on neither bank may the cannibals outnumber the missionaries — unless there are no missionaries there at all, in which case nobody is at risk.

What is the jealous husbands problem?

It is Alcuin's problem 17, and it is usually retold wrongly.

The familiar version is three couples, with no wife left in the company of another man unless her husband is there. Alcuin wrote brothers and sisters: three men each travelling with his sister, and no woman may be with a man unless her brother is present. Same mathematics, a different century's anxieties.

Which is harder, the missionaries or the siblings?

Four river puzzles compared: legal and reachable positions shown as bars, the minimum number of crossings, and the number of shortest routes — 2, 486, 8,100 and 8.
Same boat, same six people, the same eleven crossings — and the missionaries have seventeen times as many shortest routes.

Alcuin's, by a distance — even though both need eleven crossings with the same boat and the same six people.

His rule cares about which brother is present. The missionary rule only counts heads. So 44 of the 128 arrangements are legal in his version against 68 in the modern one, and there are 486 shortest routes against 8,100.

Is the man, woman and two children puzzle really a puzzle?

Problem 19, and the odd one out. Nothing here eats anything and nobody is jealous. A man and a woman each weigh as much as a full cart; their two children weigh half that each; and the boat carries one cartload.

So the two children can cross together, or one adult can cross alone. That is the entire constraint, and it takes nine crossings.

It is worth playing precisely because it feels so unlike the other three. There is nothing to be careful about — only something to be efficient about, which makes it the most modern-sounding of them by about twelve hundred years.

How many crossings does each puzzle need?

BoatFewest crossingsLegal positionsShortest routes
Wolf, goat, cabbage1 passenger7202
Brothers and sisters2 people1144486
Missionaries and cannibals2 people11688,100
Man, woman, two children1 cartload9328

Every one of those minima is proven rather than observed. The distance from each reachable position to the goal was computed in advance, for all four puzzles — which is what makes the light on the board trustworthy.

How do you play these on this page?

  1. Tap the figures — they step into the boat. Somebody who can row has to be among them.
  2. Send the boat across — the button stays disabled if the load will not float.
  3. Watch the light — green means every crossing so far is on a shortest route; amber means you have taken a detour, and says how many crossings you now need.

Each sibling pair shares a colour, because that pairing is the rule of Alcuin's puzzle and no icon can carry it. Best move is genuinely the best move rather than a plausible one, for the same reason the light is honest: every reachable position's distance to the goal is known before you start.

Who invented river crossing puzzles?

Nobody knows, and Alcuin is the earliest name attached to them. The Propositiones is a collection of fifty-three problems and the earliest surviving book of what we would now call recreational mathematics. Some of them are arithmetic, some are jokes, and three are about a river.

Whether Alcuin wrote them or gathered them from older sources is not settled — he was Charlemagne's schoolmaster, and a collector as much as an author. What is certain is that people have been refusing to take the goat back for at least twelve hundred years.

If you like this one

Towers of Hanoi is the other puzzle here where the minimum number of moves is a fact rather than a target, and Nim hides a rule that decides the game before it starts. The rest are in math and logic.

Frequently asked questions

+ How do you solve the wolf, goat and cabbage puzzle?

Take the goat over first, come back empty, then take either the wolf or the cabbage. Bring the goat back with you, drop it, take the other one over, come back empty, and finally fetch the goat. Seven crossings. There are exactly two solutions and they are mirror images of each other — the only choice you ever make is whether the wolf or the cabbage travels second.

+ Is it the wolf, goat and cabbage or the wolf, sheep and cabbage?

Both names are in use and the puzzle is identical either way — seven crossings, two solutions. Alcuin's Latin has capra, a goat, so goat is the older word for it; sheep turns up in later English retellings. Nothing about the rules or the answer changes, and neither animal can be left alone with the cabbage.

+ Why do you have to bring the goat back?

Because the goat is the only item that conflicts with both of the others. Whatever you take across second must be left alone with something, and the goat cannot be that something. Bringing it back is not a wasted trip, it is the whole trick, and it is the step people refuse to try because it feels like going backwards.

+ How many crossings does each puzzle need?

Seven for the wolf, goat and cabbage. Eleven for the three brothers and their sisters, and eleven again for the missionaries and cannibals. Nine for the man, woman and two children. Every one of those is the proven minimum — we worked out the distance to the goal for every reachable position, so the game can tell you the moment a move has cost you a crossing.

+ Who invented these puzzles?

They are in the Propositiones ad Acuendos Juvenes — Problems to Sharpen the Young — attributed to Alcuin of York, who died in 804. It is the oldest surviving collection of recreational mathematics, and the three river problems are numbers 17, 18 and 19 in it. Whether Alcuin wrote them or collected them is not settled, but they are certainly no younger than his lifetime.

+ Is the second puzzle the jealous husbands problem?

Almost, but not as Alcuin wrote it. His version is three men each travelling with his sister, and the rule is that no woman may be left in the company of a man unless her brother is present. The jealous husbands framing is a later retelling, and the mathematics is identical either way: eleven crossings with a two-person boat.

+ How many solutions are there?

Two for the wolf and goat, if you never repeat a position. Seventy-two for the family with the two children. And 19,602 for the brothers and sisters, of which 486 are as short as possible — though many of those are the same plan with the pairs relabelled, since the three families are interchangeable.

+ How do you solve missionaries and cannibals?

Eleven crossings, and there are 8,100 different ways to do it in eleven — so unlike the wolf and goat, you do not need the one right route. The move people miss is the same in spirit: at some point two have to come back, not one. If you only ever return a single person you will run out of legal positions around the sixth crossing.

+ Which is harder, the missionaries or Alcuin's brothers and sisters?

Alcuin's, and by a lot, even though both need eleven crossings with the same boat and the same six people. His rule cares about which brother is present, the missionary rule only counts heads — so 44 of the 128 positions are legal in his version against 68 in the modern one, and there are 486 shortest routes against 8,100. Nearly seventeen times the room for error.

+ What does the light mean?

Green means every crossing you have made so far is on some shortest route. Amber means you have taken a detour and the number beside it is how many crossings you now need. Red means the position is not legal at all. It is not an estimate — the distance from every reachable position to the goal was computed in advance, so the light is always right.

+ Is the family puzzle really a puzzle?

It has no forbidden combinations at all — the only constraint is that the boat carries the weight of one adult, so the two children can cross together but an adult must cross alone. It is a logistics problem rather than a taboo problem, and it is the one that most resembles a modern optimisation question. Nine crossings, eight ways to do it in nine.

More games like this

Towers of Hanoi — screenshot of the browser gameMath & Logic
Recursion1 Player

Towers of Hanoi

The puzzle where the answer is known before you start: 2ⁿ−1 moves, never fewer. The question is whether you can find them — and the counter says the instant you cannot.

  • Three to ten discs, with the target 2ⁿ−1 always in view
  • A counter that tells you the moment you leave the shortest path
  • Watch it solve itself, slowly, and see the recursion
Play Towers of Hanoi
Nim — screenshot of the browser gameMath & Logic
Binary1-2 Players

Nim

Take as many marks as you like from one row. Whoever takes the last one wins — or loses, if you agree that first. One line of binary decides every position, and the table on this page shows it live.

  • Play a friend online with a table code, or the computer
  • The nim-sum table runs live beside the board
  • Normal and misère rules, with the ending that catches everyone
Play Nim
15 Puzzle — screenshot of the browser gameMath & Logic
Parity1 Player

15 Puzzle

Slide the numbers into order. The catch nobody tells you: half of all possible scrambles cannot be solved at all, and you cannot see which by looking. This one tells you, and shows the arithmetic.

  • A live solvability check — with the inversion count that proves it
  • A button that deals a deliberately impossible scramble
  • 3×3, 4×4 and 5×5, with an optimal solver on the smaller boards
Play 15 Puzzle
Peg Solitaire — screenshot of the browser gameMath & Logic
Solitaire Puzzle1-2 Players

Peg Solitaire

Thirty-three holes, one rule and exactly thirty-one jumps — never more, never fewer. What varies is only whether you strand yourself before the end.

  • Undo as far back as you like — this is a puzzle, not a test
  • Always exactly 31 jumps, and we show why that is not a coincidence
  • A colouring rules out 28 of the 33 possible endings before you move
Play Peg Solitaire