How to Solve Latin Square Puzzles: Two Moves and a Worked Grid

This article was written with AI and may contain mistakes. Found one? Tell us.

By Riddle10 Editorial Published 9 min read

To solve a Latin square puzzle, note which symbols each empty cell could still hold, then fill any cell that has only one option left, or place any symbol that has only one possible cell left in its row or column. Repeat those two scans, because every new entry removes options elsewhere, until the whole grid is full.

That is the full method. This guide explains the rules, the two scanning moves, why a block of different symbols can be refilled only one way, a complete worked example on a four by four grid and a five by five practice puzzle with its answer.

What is a Latin square puzzle?

A Latin square is a square grid filled with a set of symbols so that no symbol repeats in any row or any column. A paper published on 1 March 2013 gives the formal version: with a set of n symbols, a Latin square of order n is an n by n array in which each symbol turns up once in every row and once in every column [1].

The puzzle version hands you a grid with some cells already filled. These filled cells are the givens. Your job is to complete the rest so that the finished grid obeys the rule everywhere.

In this guide the symbols are the digits from one up to the size of the grid. Letters, colours or shapes work just as well, because the rule never uses arithmetic. A digit here is only a name, so a grid of colours is the same puzzle in different clothes.

How does it compare with other grid puzzles?

Some grid puzzles are a Latin square with one extra layer of clues on top. Learning the plain version first makes them easier, because the row and column rule still applies in every one.

PuzzleRule about rows and columnsExtra clues
Plain Latin square puzzleEach symbol once per row and columnOnly the givens
Latin square plus signsThe sameGreater-than and less-than signs between cells
Latin square plus cagesThe sameOutlined cages with a target and an operation
Latin square plus edge numbersThe sameEdge numbers saying how many heights are visible
Latin square plus boxesThe sameEach outlined box also holds every symbol once

In every row of that table, the moves in this guide still apply. The extra clues simply give you more ways to remove options.

What are the two basic moves?

The two basic moves are both scans. They ask the same question from opposite directions.

Move one: the only candidate. Pick one empty cell. Cross out every symbol already sitting in its row and in its column. If just one symbol survives, it belongs in that cell.

Move two: the only place. Pick one row, or one column, and one symbol it still lacks. Check each empty cell in that line and ask whether the symbol could go there, or whether its column, or row, already holds it. If only one cell can take the symbol, write it in.

MoveQuestion you askWorks best when
Only candidateWhich symbols can this cell still hold?A row and a column through one cell are both nearly full
Only placeWhere can this symbol still go in this line?One symbol already appears in most of the other lines

Use both. A grid that seems stuck under one move can open at once under the other.

How do you keep track of the options?

On a four by four grid you can hold the options in your head. On five by five and larger, write them down. Put the possible symbols in small figures in a corner of each empty cell. These are called pencil marks.

Three habits keep the notes reliable:

  1. Write the notes for every empty cell before you start placing symbols, so that nothing is skipped.
  2. Each time you place a symbol, erase it from the notes in the same row and the same column straight away.
  3. Never write a symbol in full size unless one of the two moves forces it. A guess written as a fact spreads errors through the whole grid.

Why does a block of different symbols matter?

The givens are what turn an empty grid into a puzzle, so it helps to see how a few filled cells can lock in the rest. In puzzle terms, you can think of a defining set as a collection of givens that leaves only one way to finish the grid.

The idea also matters to mathematicians. A paper published on 1 March 2013 traced the original motivation for its work to defining sets in Latin squares [1].

The same paper notes a neat consequence: if some rows and some columns of a Latin square meet in a block where no symbol repeats, then the square with that block erased can be refilled in only one way [1].

You can try this on the finished grid from the worked example below. In rows 1 and 2, columns B and C hold 4, 3, 1 and 2, all different. Blank those four cells and, as our own computer check confirms, the rest of the grid puts them back exactly as they were:

ABCD
11··2
24··3
32341
43214

Now blank rows 1 and 2 in columns A and B instead. That block holds 1, 4, 4 and 1, which repeats. We checked by computer that this blanked grid can be finished in two different ways. In this grid the repeat lets the two symbols trade places, and that trade is a second answer.

Why do so many grids look alike?

Swap two rows of a Latin square, swap two columns, or rename the symbols, and you get another Latin square. The 2013 paper calls squares that can be turned into each other by these changes members of the same isotopy class [1]. It recalls that the eight by eight squares fall into 1,676,267 isotopy classes [1].

For a solver, the useful point is that renaming or shuffling does not change the logic. A puzzle with letters is no harder than the same puzzle with digits. If you swap two whole rows of a puzzle, givens included, its difficulty stays exactly the same.

How can a Latin square be drawn as a network?

There is a second way to picture the grid. Draw one point for each row and one point for each column. Every cell is then a link joining its row point to its column point, and every row point is linked to every column point.

Now treat each symbol as a colour for a link. Filling the grid becomes colouring the links so that no two links meeting at the same point share a colour. A paper published on 12 May 2006 points out that such a colouring of this complete two-sided network is exactly a Latin square [2].

This picture explains why the only-place move works. Each row point must end up with one link of every colour, so when a colour can reach only one column point from a given row point, that link is forced.

How does the method solve a four by four puzzle?

Here is an original puzzle. Fill the grid with the digits 1 to 4 so that each digit appears once in every row and once in every column. Columns are lettered A to D and rows are numbered 1 to 4, so B1 is the top cell of column B.

ABCD
1·43·
2··2·
3···1
43···

There are only five givens. We checked by computer, trying every four by four Latin square, that this puzzle has exactly one solution. Try it before reading on.

Step 1: D1. Row 1 already holds 4 and 3. Column D holds 1. The only digit left for D1 is 2.

Step 2: C3. Row 3 holds 1. Column C holds 3 and 2. That leaves 4 for C3.

Step 3: C4. Column C now holds 3, 2 and 4, so C4 is 1. You can also see this as an only-place move: the digit 1 has nowhere else to go in column C.

Step 4: D4. Row 4 holds 3 and 1. Column D holds 2 and 1. The only option is 4.

Step 5: A1. Row 1 now holds 4, 3 and 2, so A1 is 1.

Step 6: A2. Column A holds 1 and 3, and row 2 holds 2. That leaves 4.

Step 7: D2. Column D holds 2, 1 and 4, so D2 is 3.

Step 8: B2. Row 2 holds 4, 2 and 3, so B2 is 1.

Step 9: the last three cells. Column A holds 1, 4 and 3, so A3 is 2. Row 3 then holds 2, 4 and 1, so B3 is 3. Finally row 4 holds 3, 1 and 4, so B4 is 2.

ABCD
11432
24123
32341
43214

Check the result. Read each row and each column once: every line holds 1, 2, 3 and 4 with no repeat. Always finish with this pass. It takes a few seconds and catches a digit written in the wrong cell.

What are the most common mistakes?

  • Checking only the row. A cell must be clear in its row and its column. Forgetting one of the two leads to wrong entries.
  • Stale notes. If you place a symbol and forget to erase it from nearby notes, a later only-candidate move will point to the wrong answer.
  • Guessing too early. A fair puzzle never needs a guess. If you feel the need, scan every row and column once more for an only-place move.
  • Ignoring the columns for the only-place move. The move works on columns just as well as on rows, and some grids open only that way.

What should you do when you get stuck?

  • Pick the symbol that already appears most often and look for its last missing places.
  • Find the row or column with the fewest empty cells and list the missing symbols there.
  • Look for two cells in one line that share the same two options. Those two symbols are used up in that line, so remove them from every other cell in it.
  • If a mistake has crept in, go back to the givens and redo the grid rather than patching it, because one wrong symbol hides others.

Can you solve this five by five practice puzzle?

Fill the grid with the digits 1 to 5, each once in every row and once in every column. There are eight givens, and we checked by computer that the puzzle has exactly one solution.

ABCDE
1··251
2·5···
3··4··
4··1··
543···

Hints. Start in row 1, which lacks only 3 and 4. Column A already holds 4, so A1 is 3 and B1 is 4. In column C, the cell C2 can only be 3, and C5 can only be 5. In row 5, the digit 1 has just one possible cell, D5. Keep alternating the two moves from there.

Answer:

ABCDE
134251
215324
321435
452143
543512

When you are ready for another kind of matching puzzle, try this short riddle. Three people each have one of three fruits, and each fruit goes to exactly one person, so the same one-each-way rule is at work on a very small scale.

References

  1. Abel, R. J. R., Cavenagh, N. J., & Kuhl, J. (2013, March 1). Induced Subarrays of Latin Squares Without Repeated Symbols. The Electronic Journal of Combinatorics, 20(1), P44. DOI 10.37236/2372
  2. Cutler, J., & Öhman, L.-D. (2006, May 12). Latin Squares with Forbidden Entries. The Electronic Journal of Combinatorics, 13(1), R47. DOI 10.37236/1073

latin squares logic puzzles grid puzzles step by step solving methods deduction

More reading