# Puzzles & Tricks: How to Solve the Fifteen Puzzle

## How to Solve the Fifteen Puzzle

In this video, we demonstrate how to solve the fifteen puzzle (also called a sliding puzzle). Just above, we have a working version of the puzzle that can be used to test the solution. The puzzle consists of fifteen tiles and a space on a four by four board, where tiles adjacent to the space may slide into it. The object of the puzzle is to get the sorted configuration back after the tiles are scrambled.

Our strategy for solving the fifteen puzzle consists of five parts:

- Solve the first row
- Solve the second row
- Finish the first column
- Finish the second column
- Order the remaining three tiles

Our procedure for putting tiles in place consists of two methods: one tile at a time and two tiles at a time. The procedure for moving a single tile into place fairly simple. Just move the tile into place creating an opening at the next square of the tiles path to its destination and moving the tile into the space. When we place two tiles at once, move one tile into the square next its final destination and then move the other square next to it. We use the double tile placement whenever we want to finish off the last to places in a row or column. So, for example, each of the rows consists to two single tile placements and a double tile placement, while each column is a double tile placement.

There is one potential problem with the double tile placement procedure (shown above). That is that when we place the first tile in the other tile’s spot, the other tile of the row or column may be in the other spot. If this happens, we need to move the other tile out and begin the process over again.

Once we have first two rows and the first two columns in place, we have three tiles and a space in the lower-right corner. A simple rotation or two will get these tiles in place.