Problem: Eight Jolly Gaol Birds

The illustration shows the plan of a prison of nine cells all communicating with one another by doorways. The eight prisoners have their numbers on their backs, and any one of them is allowed to exercise himself in whichever cell may happen to be vacant, subject to the rule that at no time shall two prisoners be in the same cell. The merry monarch in whose dominions the prison was situated offered them special comforts one Christmas Eve if, without breaking that rule, they could so place themselves that their numbers should form a magic square.

Now, prisoner No. $7$ happened to know a good deal about magic squares, so he worked out a scheme and naturally selected the method that was most expeditious—that is, one involving the fewest possible moves from cell to cell. But one man was a surly, obstinate fellow (quite unfit for the society of his jovial companions), and he refused to move out of his cell or take any part in the proceedings. But No. $7$ was quite equal to the emergency and found that he could still do what was required in the fewest possible moves without troubling the brute to leave his cell. The puzzle is to show how he did it and, incidentally, to discover which prisoner was so stupidly obstinate. Can you find the fellow?

Solutions: 1

Thank you to the contributors under CC BY-SA 4.0!



Project Gutenberg

  1. Dudeney, H. E.: "Amusements in Mathematics", The Authors' Club, 1917

This eBook is for the use of anyone anywhere in the United States and most other parts of the world at no cost and with almost no restrictions whatsoever. You may copy it, give it away or re-use it under the terms of the Project Gutenberg License included with this edition or online at If you are not located in the United States, you'll have to check the laws of the country where you are located before using this ebook.