The 3×3 8 puzzle has only 181,440 reachable positions (How many arrangements are there?). With a number that small, a computer can find the minimum number of moves for every single position.
How we checked
- Each tile you move counts as one move (the same way the app “Slide Puzzle” counts “Moves”).
- Starting from the solved board, we expanded to the positions reachable in 1 move, then 2 moves, and so on, until every position was reached (breadth-first search). The number of moves it takes to reach a position from the solved board is that position’s minimum.
Distribution of the minimum number of moves
| Fewest moves | Positions |
|---|---|
| 0–9 | 420 |
| 10 | 286 |
| 11 | 396 |
| 12 | 748 |
| 13 | 1,024 |
| 14 | 1,893 |
| 15 | 2,512 |
| 16 | 4,485 |
| 17 | 5,638 |
| 18 | 9,529 |
| 19 | 10,878 |
| 20 | 16,993 |
| 21 | 17,110 |
| 22 | 23,952 |
| 23 | 20,224 |
| 24 | 24,047 |
| 25 | 15,578 |
| 26 | 14,560 |
| 27 | 6,274 |
| 28 | 3,910 |
| 29 | 760 |
| 30 | 221 |
| 31 | 2 |
- Every position is solved in 31 moves or fewer.
- The most common is 24 moves (24,047 positions).
- The average is about 22.0 moves, and the position right in the middle (the median) is 22 moves.
The reason positions with an even number of moves tend to outnumber their odd neighbors has to do with where the empty space is. With every move, the empty space alternates between the dark and light squares of a checkerboard pattern. So positions with the empty space at the bottom right, in the four corners, or in the center (5 squares) can only be solved in an even number of moves, and positions with it in the other 4 squares only in an odd number. There are 100,800 positions solved in an even number of moves and 80,640 solved in an odd number.
The farthest positions (31 moves)
Of the 181,440 positions, only 2 take 31 moves.
By the way, the board with the tiles in reverse order from 8 to 1 (empty space at the bottom right) is solved in 30 moves.
If a multi-tile slide counts as one
Sometimes sliding several tiles at once, in the same row or column as the empty space, is counted as a single move. Checking the same way with this counting:
- Every position is solved in 24 slides or fewer, and only one position needs 24.
- The average is about 16.55 slides.
The app’s ★1 puzzles
We checked 500 ★1 (3×3) puzzles made the same way the app makes them. Their minimums ranged from 12 to 30 moves, with an average of 22.5 moves.
On a 3×3, the app’s “Hint” works from a table of the minimum moves for every position, just like this article. So following the hints on ★1 solved all 500 puzzles in exactly the minimum number of moves (How to use hints).
On a 4×4, it is not possible to check every position this way. Even so, we know that the farthest positions take 80 moves (The fewest moves for the 15 puzzle).
