Abdication
A solitaire game is played on a 3 × 3 board, representing the Capital of a Banana Republic with a 3 × 2 green palace. The king starts on the space I. Five guards, labelled A through E occupy the remaining spaces in the palace. The space O is initially vacant, and the remaining spaces on the board are occupied by two peasants, P and Q.
The King has had enough of it, and plans to quit in the following way.
In each move, if a person is next to an empty space on the board, along a row or a column, then he or she may move into the empty space. The abdication is complete when the King is in space O, with the space I vacant and each guard having returned to his or her starting space. The peasants may switch their positions. Show how this can be done in eighteen moves.
The King has had enough of it, and plans to quit in the following way.
In each move, if a person is next to an empty space on the board, along a row or a column, then he or she may move into the empty space. The abdication is complete when the King is in space O, with the space I vacant and each guard having returned to his or her starting space. The peasants may switch their positions. Show how this can be done in eighteen moves.
From A. Filipiak's One Hundred Puzzles.