How many different boards can you make by rearranging the tiles of a sliding puzzle? Here we count the positions you can reach by sliding (in other words, the ones that can be solved).
How to count
A 3×3 board holds nine things: 8 tiles and the empty space. There are 9 choices for the top-left square, 8 left for the next square, and so on, so the number of arrangements is
9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 362,880
But in a sliding puzzle, exactly half of these can be reached by sliding (Unsolvable positions and parity). So dividing by 2 gives 181,440, the number of reachable positions on a 3×3.
The numbers by board size
Counting the same way gives the following (“reachable positions” includes the solved board).
| Board | Reachable positions | Digits |
|---|---|---|
| 2×2 | 12 | 2 |
| 3×3 | 181,440 | 6 |
| 4×4 | 10,461,394,944,000 | 14 |
| 5×5 | about 7.8×10²⁴ | 25 |
| 6×6 | about 1.9×10⁴¹ | 42 |
| 7×7 | about 3.0×10⁶² | 63 |
The 4×4 15 puzzle has about 10.5 trillion. A 7×7 (★5 in the app “Slide Puzzle”) reaches 63 digits.
Checking them all
- 3×3: with 181,440 positions, an ordinary computer can check them all in under a second. If you expand from the solved board one move at a time, you find that every position can be solved in 31 moves or fewer (The fewest moves for the 8 puzzle).
- 4×4: even checking a million positions per second, it would take about 121 days in total. Even so, using many computers, it has been confirmed that every position can be solved in 80 moves or fewer (The fewest moves for the 15 puzzle).
- 5×5 and bigger boards: the numbers are too large to check them all.
You will almost never see the same puzzle twice
The app “Slide Puzzle” mixes the tiles to make a new puzzle every time you play (How solvable puzzles are made). Even a 4×4 has about 10 trillion possibilities, so you will almost never run into the same puzzle twice.
That is why the fun of sliding puzzles is not memorizing answers, but learning a method that solves any board (How to solve the 15 puzzle).
