Letter-swap puzzles and the maths of the fewest swaps
In a letter-swap puzzle nothing is missing. Every letter the answers need is already on the board, just in the wrong places, and you fix them by swapping two tiles at a time. That changes the question from “what is the word?” to “where does each letter go?”, and once you know where every letter goes, there is an exact way to count the fewest swaps it will take.
The method comes from the mathematics of permutations, but it needs no algebra. You follow letters around the board until you get back to where you started, and count how many loops you found.
Following a letter to its home
Take a single five-letter answer, PLANT, and suppose the board shows LAPTN. Number the positions 1 to 5 and ask, for each tile, which position it belongs in.
- The L in position 1 belongs in position 2.
- The A in position 2 belongs in position 3.
- The P in position 3 belongs in position 1.
- The T in position 4 belongs in position 5.
- The N in position 5 belongs in position 4.
Now follow the arrows. Start at position 1: its letter goes to 2, the letter there goes to 3, and the letter there goes back to 1. That is a loop of three positions, which mathematicians call a cycle. Positions 4 and 5 form a second cycle, of length two, because their letters simply want to trade places. Every position belongs to exactly one cycle. A letter that is already in the right place counts as a cycle of length one.
The formula: n minus the cycles
The fewest swaps needed is the number of positions minus the number of cycles. Here there are five positions and two cycles, so the answer is three swaps. You can check it by hand. Swap positions 4 and 5 to get LAPNT. Swap positions 1 and 3 to get PALNT. Swap positions 2 and 3 to get PLANT. Three swaps, and no sequence of two can do it.
The reason the formula works is that a single swap can change the number of cycles by exactly one. If the two tiles you swap are in the same cycle, that cycle splits into two. If they are in different cycles, those two cycles merge into one. A solved board has every letter in place, which means every position is its own cycle, so it has as many cycles as positions. Starting from two cycles and gaining at most one per swap, you need at least three swaps to reach five, and the method above shows three is enough.
This also tells you what a wasted swap looks like. Any swap between two different cycles loses a cycle, so it costs you two extra moves: one for itself and one to undo the damage. On a board where swaps are limited, that is the mistake to avoid.
Using it on a real board
In practice you rarely need to write the cycles down. Two habits get you most of the way. First, look for pairs: two tiles that are each sitting in the other’s place. Swapping them puts both in the right spot at once, which is the best a single swap can ever do. Second, when no pair is available, make sure every swap puts at least one tile in its final position. A swap that does that is always splitting a cycle, never merging two, so it can never be a wasted move.
Repeated letters make the count harder. If an answer has two Es, either E tile could go in either E position, and the choice changes the cycles. The fewest swaps then comes from the assignment that produces the most cycles, and a good first step is to look for an E that can complete a pair with some other misplaced letter. In a grid where words cross, the same letter can also be needed by two answers at once, so it is worth solving the words before counting any swaps.
Solve first, then count
The formula only works once you know the answers, because it needs to know where every letter belongs. So the order of work matters. Read the board, use the letters already in place to work out each answer, and only then plan the swaps. Moving tiles while you are still guessing at the words is the most common way to spend more swaps than the board needs.


