Swordfish Sudoku: Three Rows, Three Columns, One Digit
A swordfish sudoku pattern is the X-Wing stretched to three lines. Find three rows in which a single digit is confined to the same three columns — two or three possible cells per row — and that digit can be erased from those three columns in every other row on the grid.
The logic is identical to the X-Wing's, just one size up. Three rows each need one copy of the digit. Only three columns are available. Three digits, three columns, one each — so those columns are fully spoken for and nothing outside the three base rows can claim them.
What follows: the precise conditions, a fully worked candidate map with verified eliminations, the column-based version, the degenerate cases that are really something simpler, and how to find one without staring at a grid for twenty minutes.
The pattern, stated precisely
Three base rows, one digit, and every candidate cell in those rows falling inside the same three columns.
| Requirement | Detail |
|---|---|
| One digit | The entire pattern concerns a single number. Every other candidate in those cells is irrelevant. |
| Three base rows | Rows in which the digit is still unplaced. |
| Two or three cells per row | A row with four possible columns disqualifies itself. |
| Three cover columns | The union of all candidate positions across the three rows must be exactly three columns. |
| Elimination | The digit comes out of those three columns in all six other rows. |
The condition that catches people is the second one. A base row does not need three candidate cells. Two is completely fine and very common — it just has to sit inside the three-column set. Insisting on a perfect 3×3 grid of candidates means missing most of the swordfish that actually occur.
As with the X-Wing, rows and columns are interchangeable. Three columns confining a digit to the same three rows lets you clear those three rows instead.
Why it works
Three rows each place one copy of the digit, and only three columns can receive them — so the three copies fill those three columns exactly, one apiece.
Take digit 3 with base rows 1, 4 and 8 and cover columns 2, 5 and 9. The candidate positions are:
- Row 1: columns 2, 5, 9
- Row 4: columns 2, 9
- Row 8: columns 5, 9
Each row needs a 3. No two rows can use the same column, since a column holds only one 3. Work out every legal arrangement:
| Arrangement | Row 1's 3 | Row 4's 3 | Row 8's 3 |
|---|---|---|---|
| A | R1C9 | R4C2 | R8C5 |
| B | R1C5 | R4C2 | R8C9 |
| C | R1C2 | R4C9 | R8C5 |
Three arrangements, and that is all of them. In every single one, columns 2, 5 and 9 each receive their 3 from inside rows 1, 4 and 8. There is no arrangement that leaves any of those three columns still needing a 3 from elsewhere.
So the digit 3 can be erased from columns 2, 5 and 9 in rows 2, 3, 5, 6, 7 and 9.
Worked example with a full candidate map
Build the per-digit map first — the pattern is invisible in an ordinary candidate grid and obvious in a nine-line list.
Here is where the digit 3 can still go on a stalled grid. Rows 3 and 7 already have their 3 placed, at R3C8 and R7C7.
Before — every cell that can still be a 3:
| Row | Columns where 3 is possible | Count |
|---|---|---|
| R1 | C2, C5, C9 | 3 |
| R2 | C1, C4, C5 | 3 |
| R3 | placed at C8 | — |
| R4 | C2, C9 | 2 |
| R5 | C2, C4, C6 | 3 |
| R6 | C1, C3, C5, C6, C9 | 5 |
| R7 | placed at C7 | — |
| R8 | C5, C9 | 2 |
| R9 | C2, C3 | 2 |
Scan for rows whose columns all fall inside one set of three. Rows 1, 4 and 8 give {2,5,9}, {2,9} and {5,9} — union exactly {2, 5, 9}. That is the swordfish.
Row 2 spans columns 1, 4 and 5 — a different trio, and no other row matches it. Row 9's {2,3} includes column 3, which is outside the set, so it cannot join. Row 6 has five candidate cells and is disqualified outright.
Now clear columns 2, 5 and 9, skipping rows 1, 4 and 8.
| Cell | Result |
|---|---|
| R5C2 | 3 removed |
| R9C2 | 3 removed |
| R2C5 | 3 removed |
| R6C5 | 3 removed |
| R6C9 | 3 removed |
After — the same map:
| Row | Columns where 3 is possible |
|---|---|
| R1 | C2, C5, C9 |
| R2 | C1, C4 |
| R4 | C2, C9 |
| R5 | C4, C6 |
| R6 | C1, C3, C6 |
| R8 | C5, C9 |
| R9 | C3 ← only one home left |
R9C3 = 3. Row 9 had two homes for the 3, at C2 and C3; the swordfish took C2 away, and the placement follows immediately. That in turn removes the 3 from R6C3, leaving row 6 with C1 and C6.
Five candidates erased and one digit placed, from a single observation about where one number can live. That is a good swordfish. Many produce two or three eliminations and no placement at all, which is still enough to restart a stalled grid.
The column-based swordfish
Three columns confining the digit to the same three rows clears those three rows instead — same logic, rotated ninety degrees.
Digit 6:
- Column 1: 6 possible at R2, R5, R7
- Column 4: 6 possible at R2, R7
- Column 8: 6 possible at R5, R7
Union of rows: {2, 5, 7}. Three columns, three rows, exactly the same structure as before.
Each of those three columns needs a 6, and only rows 2, 5 and 7 can supply them. Three 6s, three rows, one each. So rows 2, 5 and 7 have their 6s locked inside columns 1, 4 and 8, and the digit can be erased from every other cell in those three rows — R2C2, R2C3, R2C5 and so on, wherever a 6 was still marked.
The three legal arrangements, for anyone who wants to check the reasoning rather than take it on trust:
| Arrangement | Column 1's 6 | Column 4's 6 | Column 8's 6 |
|---|---|---|---|
| A | R7 | R2 | R5 |
| B | R5 | R2 | R7 |
| C | R2 | R7 | R5 |
In all three, rows 2, 5 and 7 are used up.
The fish family
X-Wing, swordfish and jellyfish are one technique at three sizes, and the terminology carries straight across.
| Name | Base lines | Cover lines | Cells per base line | Realistically useful? |
|---|---|---|---|---|
| X-Wing | 2 | 2 | exactly 2 | Yes, common |
| Swordfish | 3 | 3 | 2 or 3 | Yes, occasional |
| Jellyfish | 4 | 4 | 2, 3 or 4 | Rare, usually redundant |
| Squirmbag / larger | 5+ | 5+ | up to N | Never needed on 9×9 |
The general rule: N lines confining a digit to the same N crossing lines clears the digit from those crossing lines everywhere else. Solvers call the constraining lines the base sets and the cleared lines the cover sets.
There is a mathematical reason the family stops being useful. On a 9×9 grid, any five-line fish on a digit has a complementary four-line fish on the other side, so anything a squirmbag finds a jellyfish would have found. In practice almost nobody hunts past swordfish.
Degenerate cases: when your swordfish is really an X-Wing
If two of the three base rows use exactly the same pair of columns, you have not found a swordfish — you have found an X-Wing with a spare row attached, and the X-Wing does more work.
Suppose rows 1, 4 and 8 give {2,9}, {2,9} and {2,5,9}. The union is still {2,5,9} and the swordfish is technically valid, but rows 1 and 4 alone form an X-Wing on columns 2 and 9. That X-Wing clears columns 2 and 9 in all seven other rows, including row 8, while the swordfish spares rows 1, 4 and 8 from the sweep. The smaller pattern is strictly stronger here.
Two similar collapses worth checking before you commit:
- A base row with only one candidate cell. That is a hidden single. Place it and rebuild the map; the swordfish will have dissolved.
- Three base rows all inside the same band. If rows 1, 2 and 3 confine a digit to three columns, those three columns must be in three different stacks — otherwise two of the three copies would land in one box. Worth a sanity check, though a correct candidate grid will not produce the illegal version.
None of this makes a swordfish wrong. It makes it redundant, and redundant patterns waste the twenty minutes you spent finding them.
A search routine that actually terminates
Do not go looking for a swordfish sudoku shape. Build the per-digit map, then read it off.
- Complete the candidate grid. Every unsolved cell, checked against row, column and box. This is non-negotiable for any fish.
- Pick one digit and list, row by row, the columns where it can still go. Nine lines. Skip rows where it is already placed.
- Cross out every row with four or more entries. They cannot be base rows. On a typical stalled grid this leaves three to five rows.
- Take the survivors three at a time and union their column sets. If the union has exactly three columns, that is a swordfish. With four survivors that is four combinations to check; with five it is ten. It finishes.
- Check for degeneracy. If two of the three rows have identical pairs, use the X-Wing instead.
- Erase from the three cover columns in the six other rows, then go back to singles.
- Repeat down the columns. Same list built the other way, then the next digit.
Two accelerators. Do the X-Wing check on the same map first — it costs nothing extra and it is a smaller, stronger pattern when present. And start with digits that already appear six or seven times on the grid, since heavily placed digits are the constrained ones.
Where swordfish sudoku sits in the ladder
Swordfish belongs above the X-Wing and below the wings, and it is genuinely optional — most expert grids that contain one also contain a shorter route.
| Order | Technique | Idea | Guide |
|---|---|---|---|
| 1 | Singles | One option left | How to play sudoku |
| 2 | Locked candidate | Digit trapped in an intersection | Locked candidate sudoku |
| 3 | Naked pairs | Two cells, two digits | Naked pairs sudoku |
| 4 | X-Wing | One digit, 2×2 | Sudoku X-Wing explained |
| 5 | Swordfish | One digit, 3×3 | This page |
| 6 | Y-Wing | Three bi-value cells | Y wing sudoku |
| 7 | Skyscraper | Two conjugate pairs, shared base | Skyscraper sudoku |
The next technique to learn is the Y-Wing. It is a change of gear rather than a step up in difficulty: instead of tracking one digit across many cells, you start comparing cells that have exactly two candidates each. Different habit, different eliminations, and it fires on grids where no fish exists. If the map-building here felt unfamiliar, the X-Wing page covers the same method at a size you can check by eye.
Our free puzzle maker produces unlimited classic 9×9 sudoku at easy, medium and hard, one to six per page with an answer key, every grid verified to have exactly one solution.
Frequently asked questions
What is a swordfish in sudoku?
A swordfish is a single-digit pattern spanning three rows and three columns. In each of three rows, the digit has only two or three remaining possible cells, and all of those cells fall inside the same three columns. Since each row must place one copy of the digit and only three columns can receive them, those three columns are fully committed — and the digit can be erased from them in every other row.
Does each row of a swordfish need three candidate cells?
No. Two is fine, and mixed patterns of two and three cells are the common case. The only requirement is that every candidate cell in each base row falls inside the shared three-column set. Looking for a tidy 3×3 arrangement of nine candidates is the fastest way to miss the swordfish that are actually on your grid.
What is the difference between a swordfish and an X-Wing?
Size. An X-Wing uses two rows and two columns with exactly two candidate cells per row; a swordfish uses three rows and three columns with two or three cells per row. The reasoning is the same in both cases: N rows needing one copy each, N columns available, so those columns are used up. The X-Wing is easier to spot and clears more lines, so always check for it first.
Is swordfish sudoku harder than an X-Wing?
Harder to find, not harder to understand. If you can follow the X-Wing proof you already understand the swordfish proof — it is the same argument with one more row. The difficulty is purely in the search: you are comparing sets of three rows rather than pairs, and the pattern is not something you can see at a glance in a candidate grid. Building a per-digit map turns it from a hunt into a lookup.
Can a swordfish be based on columns instead of rows?
Yes, and half of them are. Three columns in which the digit is confined to the same three rows lets you erase it from those three rows everywhere outside the three columns. Solvers who only scan one direction find roughly half the swordfish on any grid, so run the map both ways before deciding a puzzle has none.
Do I need swordfish to solve expert sudoku?
Occasionally, but less often than its reputation suggests. Most puzzles rated expert can be finished with locked candidates, subsets, X-Wings and the wing techniques. Swordfish tends to be the pattern that appears when a grid is stubborn in one particular digit, and there is often a wing or a chain available at the same moment. It is a useful tool rather than a mandatory one.
