Back to Works
2026 JavaScript SVG Puzzle

River Crossing Puzzle

A father, a mother, two sons, two daughters, a servant and a dog. Get all eight of them safely to the far bank in a boat that seats two — bearing in mind that some of them really should not be left alone together.

Rules

  1. RULE 01

    The father kills a daughter if the mother is not there. Never leave the father with either daughter on a bank without the mother.

  2. RULE 02

    The mother kills a son if the father is not there. Never leave the mother with either son on a bank without the father.

  3. RULE 03

    The dog kills the whole family if the servant is not there. Never leave the dog with any family member without the servant. The dog and the servant alone are fine.

  4. RULE 04

    The boat seats two. Only the father, the mother and the servant can row it, and one of them must be aboard on every trip — going across and coming back.

How to play

On the shortest solution

The puzzle can be solved in 17 crossings, and that is the theoretical minimum — a breadth-first search over the whole state space confirms no solution of 16 or fewer exists. There are only 512 states in total (28 = 256 arrangements of the eight characters, times two positions for the boat), and the search walks the legal ones exhaustively.

Implementation notes

Origins

This is a classic river-crossing puzzle, known variously as the "jealous husbands" problem or, in Japanese, 猛獣家族の川渡り. It extends the familiar wolf, goat and cabbage riddle: eight characters instead of three, and only some of them can row, which is what makes it genuinely hard.