GridPencil

Six Puzzles in This Notebook That Are Older Than the Computer

A riddle from the court of Charlemagne, a square from ancient China, a chess problem from 1848. Some of our puzzles have had very long lives.

It is easy to assume that anything you play in a browser was invented for one. Several of the puzzles on GridPencil were being solved, argued about and occasionally cursed long before there was electricity to run them. Here are six, in order of age.

The magic square: more than two thousand years

The three by three magic square, in which every row, column and diagonal adds up to fifteen, is known in China as the Lo Shu. Legend says the pattern was first seen on the shell of a turtle that came out of a river. Whatever its true origin, it is one of the oldest number puzzles we have a record of.

It also has a very modern feature: you can reach the answer by pure reasoning. The centre must be 5, the corners must be even, and opposite squares must add up to ten. Our Magic Square page walks through why.

The river crossing: about 1,200 years

A farmer, a wolf, a goat and a cabbage have been trying to get across a river since at least the time of Charlemagne. The riddle appears in a Latin collection called "Problems to Sharpen the Young", usually credited to the scholar Alcuin of York, who ran the emperor's court school around the year 800.

The same collection holds other crossing problems. Versions of the puzzle have since turned up all over the world with different passengers. The logic never changes: someone has to come back. Try it before you look up the answer.

The knight's tour: more than a thousand years

Can a chess knight visit every square of the board exactly once? The question was being studied in the ninth century, both in the Arabic chess tradition and in Sanskrit poetry, where the syllables of a verse were arranged to follow a knight's path.

Leonhard Euler wrote the first serious mathematical study of it in 1759. In 1823 a German writer named H. C. von Warnsdorff published the rule of thumb that still works best by hand: always move to the square with the fewest ways out. Our Knight's Tour uses a five by five board, which is small enough to finish and quite large enough to get stuck on.

Peg solitaire: over 300 years

Peg solitaire was fashionable at the French court in the 1690s. An engraving from 1697 shows a princess with the board beside her. In 1710 the philosopher Leibniz wrote that he enjoyed the game, and liked to play it in reverse, starting with one peg and filling the board.

Nobody knows who invented it. Stories about a prisoner in the Bastille are almost certainly made up. The cross-shaped board of thirty-three holes that we use for Peg Solitaire is the English pattern, and it remains the standard.

Eight queens: 1848

This one has a date and a name. The chess composer Max Bezzel posed the problem in a German chess magazine in 1848: place eight queens on a chessboard so that none attacks another. Two years later the first complete solutions were published, and the great mathematician Gauss took an interest.

There are ninety-two solutions, or twelve if you treat rotations and mirror images as the same. Much later, the puzzle became a standard exercise for student programmers. Solving Eight Queens by hand, you do what their programs do: place a queen, find the trouble, step back one.

The Tower of Hanoi: 1883

The youngest of the six was invented by a French mathematician, Édouard Lucas, and sold as a toy in 1883. He published it under a made-up name and wrapped it in a story about priests moving sixty-four golden discs in a temple, with the world due to end when they finish.

There is no hurry. At one move a second, sixty-four discs would take more than five hundred billion years. Our Tower of Hanoi stops at six discs and sixty-three moves.

Why they last

Look at what the six have in common. Each can be explained in a sentence or two. Each has a definite answer. None needs anything more than a board and a few counters, or a pencil.

That is also why they make such good HTML5 games. A puzzle that survived for centuries on wood and paper does not need much from a screen. It only needs to be drawn clearly and to keep count for you. The thinking is the same as it ever was.