There are eight ways of forming the magic square--all merely different
aspects of one fundamental arrangement. Thus, if you give our first
square a quarter turn you will get the second square; and as the four
sides may be in turn brought to the top, there are four aspects. These
four in turn reflected in a mirror produce the remaining four aspects.
Now, of these eight arrangements only four can possibly be reached under
the conditions, and only two of these four can be reached in the fewest
possible moves, which is nineteen. These two arrangements are shown.
Move the men in the following order: 5, 3, 2, 5, 7, 6, 4, 1, 5, 7, 6, 4,
1, 6, 4, 8, 3, 2, 7, and you get the first square. Move them thus: 4, 1,
2, 4, 1, 6, 7, 1, 5, 8, 1, 5, 6, 7, 5, 6, 4, 2, 7, and you have the
arrangement in the second square. In the first case every man has moved,
but in the second case the man numbered 3 has never left his cell.
Therefore No. 3 must be the obstinate prisoner, and the second square
must be the required arrangement.
[Illustration:
+---+---+---+ +---+---+---+
| | | | | | | |
| 5 7 | | 7 4 3 |
| | | | | | | |
+- -+- -+- -+ +- -+- -+- -+
| | | | | | | |
| 6 4 2 | | 4 8 |
| | | | | | | |
+- -+- -+- -+ +- -+- -+- -+
| | | | | | | |
| 1 8 3 | | 5 6 1 |
| | | | | | | |
+---+---+---+ +---+---+---+
]