PK
Puzzle PK
Brain Games & Logic Arena
How to Solve the 15 Sliding Puzzle - Step-by-Step Tutorial

How to Solve the 15 Sliding Puzzle - Step-by-Step Tutorial

Master the 15 Sliding Puzzle with our interactive step-by-step tutorial. Learn the reliable layer-by-layer solving method to conquer any sliding block configuration quickly and efficiently.

✍️Author: Puzzle PK Logic Research Team•📅Verified: Nov 2026 (Engine v3.2)•⏱️Read Time: ~6 mins•✓Original & Tested

Advanced Tutorial: Fast Solving Strategy

技巧一:首行归位法 (The First Row)

不要试图一次性看满全盘。正确的策略是:先拼好第一行(1,2,3,4),然后在接下来的游戏中再也不去动它。这里演示了如何将散乱的 1-4 组合归位。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

The Definitive Guide to Sliding Puzzle (15-Puzzle): Mathematical Principles & Speed Solving Masterclass

Welcome to the official, authoritative master guide to the Sliding Puzzle (also celebrated as the 15-Puzzle, Number Slide, or Mystic Square) on Puzzle PK. Beyond its reputation as a thrilling dexterity and logic challenge, the sliding puzzle represents one of the most elegant practical applications of discrete mathematics, permutation parity, and graph state spaces.

This guide provides an end-to-end curriculum ranging from the formal mathematical proof of puzzle solvability to the Layer-by-Layer reduction method, the Corner Pair Insertion technique, last-two-row cycle resolution, and multiplayer Speed PK duel dynamics.


Chapter 1: Historical Roots & Permutation Group Mathematics (The 1879 Parity Theorem)

1.1 The Chapman Invention and the Sam Loyd $1,000 Bounty Hoax

The sliding puzzle was created in 1874 by Noyes Palmer Chapman, a postmaster in Canastota, New York. In the late 19th century, renowned puzzle publicist Sam Loyd launched an international sensation by offering a $1,000 cash prize to anyone who could solve the puzzle starting with just the 14 and 15 tiles swapped, with the empty space at the bottom right.

Although tens of thousands claimed to be "just one move away," no one ever collected the prize. In 1879, American mathematicians mathematically established that starting from that scrambled configuration, the solution was physically and logically impossible.

1.2 Mathematical Formulation of Inversion Count

Consider the grid flattened row by row into a single 1D numerical sequence of length $M = N^2 - 1$ (ignoring the empty blank). The Inversion Count $\text{Inv}(A)$ of permutation $A$ is defined as: $$\text{Inv}(A) = \sum_{1 \le i < j \le M} \mathbb{I}(A_i > A_j)$$ In words, an inversion is any pair of tiles $(A_i, A_j)$ such that $i < j$ but $A_i > A_j$. In the fully resolved target configuration $[1, 2, 3, \dots, 15]$, $\text{Inv} = 0$.

1.3 The Johnson & Story Parity Invariance Theorem (1879)

William Woolsey Johnson and William E. Story published the definitive parity theorem in the American Journal of Mathematics (1879):

  1. Horizontal Blank Slide: Moving the empty slot left or right within the same row leaves the linear order of all numbers completely intact. Therefore, $\Delta \text{Inv} = 0$.
  2. Vertical Blank Slide: Moving the empty slot up or down causes the moved tile to jump across exactly $N - 1$ other numbers in the 1D sequence.
    • For Odd Grid Dimensions ($N$ is odd, e.g., 3×3, 5×5): $N - 1$ is always even. Jumping across an even number of elements alters the inversion count by an even integer ($\Delta \text{Inv} \in {-(N-1), \dots, +(N-1)}$). Hence, the parity of the inversion count is strictly conserved! $$\text{Solvable} \iff \text{Inv}(A) \equiv 0 \pmod 2$$
    • For Even Grid Dimensions ($N$ is even, e.g., 4×4, 6×6): $N - 1$ is always odd. Every vertical move flips the parity of $\text{Inv}(A)$. Let $R_{\text{blank}}$ be the row index of the empty slot counting upward from the bottom row (bottom row = 1): $$\text{Invariant} = \left( \text{Inv}(A) + R_{\text{blank}} \right) \pmod 2$$ $$\text{Solvable} \iff \text{Inv}(A) + R_{\text{blank}} \equiv 0 \pmod 2 \quad (\text{target at bottom-right})$$
  3. The Unsolvability Deduction: Swapping any two adjacent tiles changes $\text{Inv}(A)$ by exactly $\pm 1$ without moving the empty cell. This flips the parity state, transforming an otherwise solvable puzzle into an impossible dead end. Exactly 50% of all randomly assembled configurations are mathematically unsolvable.

Puzzle PK Guarantee: Every single board generated on our platform is created via a legitimate reversible random-walk scramble from the goal state. Every single game is guaranteed 100% solvable.


Chapter 2: The Systematic Layer-by-Layer Strategy

2.1 The Principle of Dimensional Reduction

Novices frequently attempt to move tiles to their target positions as soon as they spot them nearby. This greedy approach inevitably leads to deadlock when later placements dismantle earlier successes.

Master solvers rely on Layer-by-Layer Reduction:

  1. Solve Row 1 completely, then permanently lock it.
  2. Solve Column 1 completely, permanently locking it. (This reduces a 4×4 problem into a 3×3 problem).
  3. Solve Row 2 and Column 2 (reducing the board to 2×2 or 2×3).
  4. Solve the remaining terminal cyclic group.

2.2 Constructing the First Row (4×4 Example)

Target: Establish the top row as $[1, 2, 3, 4]$.

  • Tiles 1 through $N-2$ (Tiles 1 and 2): With the entire bottom area available as workspace, navigate tile 1 directly to $(1, 1)$, then tile 2 directly to $(1, 2)$.
  • The Corner Blockade: Placing tile 3 into $(1, 3)$ prematurely leaves no entry trajectory for tile 4 into $(1, 4)$ without kicking tile 3 back out.

2.3 The Master Maneuver: Corner Pair Insertion ("L-Tandem Method")

To position the final two tiles of a row ($3$ and $4$) without disrupting placed tiles:

  1. Setup Formation:
    • Park tile 3 at $(2, 4)$ (the cell directly below the top-right corner).
    • Park tile 4 directly below tile 3 at $(3, 4)$ or to its left at $(2, 3)$.
  2. Rotational Sweep:
    • Guide the empty space into the top-right corner $(1, 4)$.
    • Slide tile 3 upward into $(1, 3)$.
    • Rotate the empty space around the corner, pulling tile 4 immediately behind tile 3 into $(1, 4)$.
  3. Locking: Row 1 is now permanently secured and must never be altered again.

Chapter 3: Left-Column Reduction & Recursive Shrinking

3.1 Resolving Column 1

With Row 1 locked, the active working frame is reduced to $3 \times 4$.

  • Move tile 5 directly into position $(2, 1)$.
  • Apply the vertical mirror of the Corner Pair Insertion technique for tiles 9 and 13:
    • Park tile 9 at $(4, 2)$ (adjacent to the bottom-left corner).
    • Position tile 13 behind it.
    • Cycle the blank tile through $(4, 1)$ to snap tile 9 and tile 13 into their vertical slots $(3, 1)$ and $(4, 1)$.

3.2 Recursive Reduction Flow

At this stage, Row 1 and Column 1 are complete. The unsolved board is now an unconstrained 3×3 puzzle. Repeating the exact same sequence for Row 2 (tiles 6, 7, 8) and Column 2 (tiles 10, 14) shrinks the challenge down to the final 2×3 or 2×2 zone.


Chapter 4: Terminal Resolution: Last Two Rows & Cyclic Permutations

4.1 Why the Last Two Rows Cannot Be Solved Independently

In the terminal $2 \times 3$ subgrid, you no longer have extra rows below to serve as neutral buffer zones. Attempting to place tiles into Row 3 without considering Row 4 will inevitably trap tiles. The final 6 cells must be manipulated as a continuous, unified orbital track.

4.2 The 3-Cycle Conveyor Belt

In group theory, all even permutations can be generated by compositions of 3-cycles.

  • Moving the empty slot in a closed rectangular loop $(1 \to 2 \to 3 \to 4 \to 1)$ produces a cyclic shift of the tiles encountered along the perimeter.
  • By rotating the cycle until the relative order of the remaining numbers matches the target sequence, the entire bottom-right quadrant resolves harmoniously in one sweeping motion.

4.3 Diagnosing the "Last Two Swapped" Optical Illusion

Players often complain: "Everything is solved, but 14 and 15 are reversed! Is the game bugged?"

  • Truth: As proven in Chapter 1, this board is 100% solvable.
  • Root Cause: The permutation phase of the bottom two rows is misaligned by a cycle offset.
  • Solution:
    1. Do not obsessively wiggle the two swapped tiles.
    2. Backtrack 3 to 4 moves into the $2 \times 3$ area.
    3. Cycle tiles 11, 12, 13, 14, 15 through the wider loop to correct their relative entry phases.
    4. The puzzle will resolve cleanly with zero parity conflicts.

Chapter 5: Scalability to Large Grids (5×5, 6×6, 10×10) & Speedcubing Mechanics

5.1 Universal Inductive Scalability

Because the Layer-by-Layer reduction method reduces an $N \times N$ grid to $(N-1) \times (N-1)$ inductively, the algorithm works identically whether you are tackling standard 15-Puzzle, 24-Puzzle (5×5), or 35-Puzzle (6×6).

5.2 Professional Speed Techniques

  1. Multi-Tile Pushing (Line Slides):
    • Novice players click tiles one by one.
    • On Puzzle PK, clicking any tile in the same row or column as the empty slot will slide the entire intervening line of tiles in a single frame. This slashes physical input overhead by more than 60%.
  2. Ghost Blank Tracking:
    • Do not chase tiles with your eyes; trace the trajectory of the empty slot.
    • Direct the empty space to orbit around target tiles, pulling them into place with minimal displacement.
  3. APM & Move Economy:
    • Maintain a steady rhythm of 4–6 actions per second rather than sporadic bursts of erratic moves that introduce errors.

Chapter 6: Real-Time Multiplayer Speed PK Duel Tactics

6.1 Identical Scramble Seed Fairness

In Puzzle PK's competitive rooms, all participants receive the exact same scrambled board seed. There is zero RNG bias: both competitors face identical initial inversion counts, identical tile distributions, and identical theoretical optimal move counts.

6.2 Match Cadence & Psychological Composure

  • The 3-Second Opening Preview: Use the countdown to spot tiles 1, 2, 3, and 4. Pre-visualize the first 5 moves before the board unlocks.
  • The HUD Pressure Dynamic: The top combat HUD updates opponent tile progress in real time. Do not panic if an opponent surges ahead early; the final two rows introduce heavy move variances where clean technique frequently enables dramatic comeback victories.

Chapter 7: Frequently Asked Questions & Troubleshooting (FAQ)

Q1: How do the keyboard shortcuts work?

The keyboard controls are mapped with intuitive physics:

  • Press W or ↑: Slides the tile below the blank space upward into it.
  • Press S or ↓: Slides the tile above the blank space downward into it.
  • Press A or ←: Slides the tile to the right of the blank space leftward into it.
  • Press D or →: Slides the tile to the left of the blank space rightward into it.

Q2: What are the benchmark completion times for a 4×4 puzzle?

  • Casual Solver: 100–150 moves, 1.5–3 minutes.
  • Intermediate Player: 70–90 moves, 40–60 seconds.
  • Competitive Master: 45–65 moves, 15–25 seconds.
  • World Record Class: ~40 moves, under 10 seconds.
📱

Add to Home Screen for Quick Access

Enjoy native fullscreen & offline instant play