[403.—THE SPANISH DUNGEON.—solution]
This can best be solved by working backwards—that is to say, you must first catch your square, and then work back to the original position. We must first construct those squares which are found to require the least amount of readjustment of the numbers. Many of these we know cannot possibly be reached. When we have before us the most favourable possible arrangements, it then becomes a question of careful analysis to discover which position can be reached in the fewest moves. I am afraid, however, it is only after considerable study and experience that the solver is able to get such a grasp of the various "areas of disturbance" and methods of circulation that his judgment is of much value to him.
The second diagram is a most favourable magic square position. It will be seen that prisoners 4, 8, 13, and 14 are left in their original cells. This position may be reached in as few as thirty-seven moves. Here are the moves: 15, 14, 10, 6, 7, 3, 2, 7, 6, 11, 3, 2, 7, 6, 11, 10, 14, 3, 2, 11, 10, 9, 5, 1, 6, 10, 9, 5, 1, 6, 10, 9, 5, 2, 12, 15, 3. This short solution will probably surprise many readers who may not find a way under from sixty to a hundred moves. The clever prisoner was No. 6, who in the original illustration will be seen with his arms extended calling out the moves. He and No. 10 did most of the work, each changing his cell five times. No. 12, the man with the crooked leg, was lame, and therefore fortunately had only to pass from his cell into the next one when his time came round.
[404.—THE SIBERIAN DUNGEONS.—solution]
In attempting to solve this puzzle it is clearly necessary to seek such magic squares as seem the most favourable for our purpose, and then carefully examine and try them for "fewest moves." Of course it at once occurs to us that if we can adopt a square in which a certain number of men need not leave their original cells, we may save moves on the one hand, but we may obstruct our movements on the other. For example, a magic square may be formed with the 6, 7, 13, and 16 unmoved; but in such case it is obvious that a solution is impossible, since cells 14 and 15 can neither be left nor entered without breaking the condition of no two men ever being in the same cell together.
The following solution in fourteen moves was found by Mr. G. Wotherspoon: 8-17, 16-21, 6-16, 14-8, 5-18, 4-14, 3-24, 11-20, 10-19, 2-23, 13-22, 12-6, 1-5, 9-13. As this solution is in what I consider the theoretical minimum number of moves, I am confident that it cannot be improved upon, and on this point Mr. Wotherspoon is of the same opinion.