How Parity Exposes Impossible Moves in Seemingly Simple Puzzles

Introduction

A puzzle can look as though it has many possible moves and still contain a hidden impossibility. Parity—the distinction between even and odd—often reveals it. By tracking whether a move changes a count from even to odd, or preserves a particular relationship, we can prove that some arrangements cannot be reached at all. This simple idea is especially useful in sliding-tile puzzles and other problems built from repeated swaps.

What parity means in a puzzle

Parity describes whether a whole number is even or odd. Two numbers have the same parity if both are even or both are odd. A quantity has a parity invariant when its even-or-odd status stays unchanged through every legal move.

This is useful because a puzzle may have a huge number of possible arrangements. Instead of examining every sequence of moves, we can look for a property that all reachable arrangements must share. If the target arrangement has the wrong parity, no amount of searching will produce a solution.

The method does not usually tell us exactly how to solve a puzzle. It answers a different question: is a proposed goal possible under the stated rules? That distinction matters. A parity test can rule out a solution decisively, while a matching parity may only show that the test has not ruled it out.

Why swaps are closely tied to even and odd

Consider a row of numbered objects. A swap exchanges the positions of two objects. The order of the row can be described by its inversions: pairs of objects that appear in the opposite order from a chosen target order.

For example, in the sequence 1, 3, 2, the pair 3 and 2 is reversed relative to the order 1, 2, 3. There is one inversion. In 2, 1, 3, there is also one inversion. The number of inversions can be even or odd, and its parity is a useful way to describe the arrangement.

Swapping any two objects reverses the parity of the permutation: an even arrangement becomes odd, or an odd one becomes even. A permutation is simply an ordering of a set of objects. The parity of a permutation does not depend on how we count its inversions; different ways of comparing the same arrangement produce the same even-or-odd classification.

This gives a compact way to reason about sequences of moves. Two swaps restore the original parity, while an odd number of swaps reverses it. In puzzles, however, the blank space or board position may also matter. The useful invariant often combines the parity of the object arrangement with another feature, such as the location of the blank.

The sliding-tile puzzle: a classic impossibility test

In the familiar 15-puzzle, fifteen numbered tiles and one blank occupy a four-by-four grid. A legal move slides a tile next to the blank into the empty space. The aim is to arrange the numbered tiles in order, with the blank in a designated corner.

A common question is whether every shuffled arrangement can be solved. It cannot. The move rules divide the arrangements into two groups: one group can reach the standard goal, while the other cannot. The division can be identified by combining two parity measurements.

Count inversions in the tile sequence

First, read the numbered tiles from left to right, top to bottom, skipping the blank. Count each pair that is out of order. In the goal arrangement, the sequence is 1, 2, 3, and so on, so its inversion count is zero.

For a small illustration, the sequence 1, 3, 2 has one inversion because 3 comes before 2. The sequence 3, 1, 2 has two: 3 comes before 1 and before 2. The first count is odd; the second is even.

Track the blank’s row

On a board with an even number of columns, also count the blank’s row from the bottom, starting with row 1. On a four-by-four board, the bottom row is row 1 and the top row is row 4.

For the standard goal, the blank is in the bottom row, so its row-from-bottom number is odd. The solvability test is that the inversion count and the blank’s row-from-bottom number have opposite parity: one is even and the other odd. Equivalently, their sum is odd. This convention assumes the usual goal order and the blank in the bottom-right corner.

Why does the test work? A horizontal slide moves a tile past no other numbered tile in the reading sequence, so the inversion parity does not change; the blank stays on the same row, too. A vertical slide moves a tile across one row of the grid. In a four-column board, that tile passes three numbered positions in the sequence, changing inversion parity. At the same time, the blank moves up or down one row, changing the row-from-bottom parity. Both parities flip, so their combined relationship is preserved.

Since each legal move preserves this relationship, an arrangement that starts with the wrong relationship can never reach the goal. This is not a matter of being difficult or requiring a clever trick. It is ruled out by the structure of the move rules.

A tiny example: why one swap can be impossible

Imagine a completed sliding-tile board, then exchange two numbered tiles while leaving the blank where it is. The exchange changes the parity of the tile ordering, but it does not change the blank’s row. The combined parity condition therefore switches. The new arrangement fails the test for reaching the original goal.

This explains a well-known feature of the 15-puzzle: swapping just two tiles in a solved board creates an unsolvable arrangement. The board still looks almost finished, and every tile is present, but legal slides cannot repair that single swap. A sequence of moves would have to preserve the invariant at every step, and the start and goal disagree on it.

The same reasoning applies to a three-by-three sliding puzzle, though the convenient formula differs because the board width is odd. In that case, the inversion parity of the numbered tiles is preserved by legal moves. The standard goal has an even inversion count, so an arrangement with an odd count cannot reach it.

Parity on a checkerboard

Another way to see the role of parity is to color a grid like a chessboard, with neighboring squares having opposite colors. Every move of a piece that travels one square horizontally or vertically changes the color of its location. After an even number of such moves, it is back on its starting color; after an odd number, it is on the opposite color.

This can expose impossible timing or destination conditions. Suppose a puzzle requires a piece to reach a square of the same color after an odd number of single-square moves. That cannot happen, because each move flips the color. The obstacle is not the piece’s skill or route choice; the required move count and destination conflict with the color alternation.

For a knight on a standard chessboard, each legal move also changes square color: the knight travels two squares in one direction and one in the other, landing on the opposite color. Therefore, a route from a square to another square must have even length if the two squares have the same color, and odd length if their colors differ. This condition does not guarantee that a route exists, but it can rule out routes of the wrong length immediately.

How to find a parity invariant

When facing a move puzzle, start by identifying what changes in one legal move. Does a move swap two objects? Shift a token one square? Change the position of a blank? Small local changes often suggest a quantity to track.

Next, look for an even-or-odd feature. Useful candidates include the number of inversions, the color of a square, the parity of a row or column, or the number of objects in a selected region. Ask whether a legal move preserves that feature or flips it in a predictable way.

If one feature flips on every move, it may not be invariant by itself. Try combining it with another feature that flips at the same time. In the even-width sliding puzzle, inversion parity and blank-row parity both change on a vertical move, while neither changes on a horizontal move. Their combined relationship stays fixed.

Finally, compare the starting position with the goal. If the invariant has different values in those two arrangements, the goal is impossible under the given rules. If the values agree, the test has not found an obstruction, but another constraint may still prevent a solution.

What parity proves—and what it does not

A parity argument is powerful because it can eliminate an entire class of possible move sequences at once. It does not need to know whether a solution would take ten moves or ten thousand. If every legal move preserves an invariant, no sequence can connect states with different invariant values.

But parity is not a universal solver. Two states can share the same parity and still be separated by other constraints, especially in puzzles with unusual boards, blocked squares, restricted moves, or extra rules. A parity match is therefore a necessary check in many settings, not automatically a complete proof of reachability.

For the standard rectangular sliding-tile puzzle, the familiar parity condition captures the central reachability obstruction. In other puzzles, one should establish carefully that the proposed invariant applies to the exact board and rules being used. Changing the permitted moves can change which states are reachable.

It is also important to distinguish an impossible position from a merely hard one. A puzzle may have a valid solution that is difficult to discover. Parity identifies a stronger claim: no legal solution exists. That conclusion follows from the move rules, not from a failed attempt to solve the puzzle.

Why this small idea matters

Parity is one of the simplest tools in discrete mathematics, but it introduces a broader style of problem-solving: track a feature that cannot change. Similar reasoning appears in proofs about arrangements, paths, and transformations. The details differ, but the central question is often the same: what must remain true after every allowed step?

For puzzle solvers, the practical benefit is efficiency. Before exploring a maze of moves, a quick parity check may reveal that the requested destination is unreachable. For learners, it also demonstrates how a simple property—only two possibilities, even or odd—can describe a restriction hidden inside a complicated-looking system.

Conclusion

Parity exposes impossible moves by tracking whether a puzzle’s key feature is even or odd and asking how legal moves affect it. In sliding-tile puzzles, combining tile-order parity with the blank’s position separates reachable arrangements from impossible ones. A matching parity does not solve every puzzle, but a mismatch can prove that no legal sequence reaches the goal.