The "eight puzzle" is a reduced 3x3 version of the 4x4 "fifteen puzzle", which is a very simple game which involves sliding 15 numbered tiles around 16 places, with one free space always being available with each move. The Wikipedia article contains a better explanation.
In my last assignment I was given a problem which was to show whether it would be possible through a series of arrangements to go from the first configuration of the puzzle to the second where the empty space is denoted by $\square$:
$\begin{array}{ccc} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & \square \end{array} \rightarrow \begin{array}{ccc} 3 & 2 & 1 \\ 4 & 5 & 6 \\ 7 & 8 & \square \end{array}$
As far as I understand, the correct approach would be to view this problem as the permutation
$\begin{pmatrix} 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \\ 3 & 2 & 1 & 4 & 5 & 6 & 7 & 8 \end{pmatrix}$
Which is an odd permutation. In order for the empty space to return to its original space, it must move the same amount of times downwards as upwards, and leftwards as rightwards so it must move an even number of times. Since the permutation is odd, this configuration is impossible.
The next question is harder, and I don't know how to apply the logic I used in the first part to this problem. How can I determine whether the puzzle can go to this configuration through a series of arrangements?
$\begin{array}{ccc} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & \square \end{array} \rightarrow \begin{array}{ccc} 1 & \square & 2 \\ 3 & 4 & 5 \\ 6 & 7 & 8 \end{array}$
This seems to just be the identity permutation, and I don't know how to work out what the parity of the permutation must be in order to make this configuration possible.