Copyright Elpida Tzafestas, 2006-2009

This page in Hellenic



The NxN puzzle shows the numbers (tiles) from 1 to NxN-1 in random positions. One of the NxN positions is left blank. By sliding adjacent tiles into the blank position, the user should bring the tiles to a configuration where the first (top) row will be occupied by the tiles numbered 1 to N, the second by the tiles numbered N+1 to 2N etc. In the last (bottom) row the tiles numbered x(-1) to xN-1 should be placed together with the blank in the rightmost position. The only possibility of the user is to swap the blank with one of the at most four tiles that surround it. Note that not all initial random configurations are solvable (the unsolvable configurations are parity-equivalent and correspond to the so-called "Loyd's puzzle "). The following applet implements the general case of a NxMpuzzle ( rows, columns) with two blanks in random positions (the target positions of the blanks are marked in green).

The correctly placed tiles are marked in blue, while the blanks are marked in red.
The user's options are:

Known bug
The system may be stuck after restarting of the puzzle with shift-click.

Last updated 4 May 2009.
mail (brensham@softlab.ece.ntua.gr)