sudoku · 7 min read
Sudoku Technique: The Swordfish
Master the grid through the absolute placement of non-repeating digits.
The Swordfish is the natural older sibling of the X-Wing. Where X-Wing locks down a single digit across two rows and two columns, Swordfish does the same trick across three rows and three columns.
It's harder to spot, but the underlying logic is identical, and when you find one, the eliminations cascade beautifully.
The Swordfish Rule
And just like X-Wing, the rule works in the dual direction too: if three columns each have X candidates restricted to the same three rows, eliminate X from the rest of those three rows.
Example
Consider this candidate landscape for digit 4 across a partially solved Sudoku. The cells with a small 4 are where digit 4 can still go:
Look at the three highlighted rows:
- Row 1: 4 candidates in cols 2 and 5
- Row 4: 4 candidates in cols 2 and 8
- Row 6: 4 candidates in cols 5 and 8
Take the union of all those columns: {2, 5, 8} — exactly three columns. That's the Swordfish.
Why does it work?
Each of the three rows must contain a 4 somewhere. Each row's candidates lie inside cols {2, 5, 8}. So the three 4s placed in rows 1, 4, 6 will land somewhere inside the 3×3 region of those three rows × three columns — but with one 4 per row, and constrained to not duplicate within a column either.
It's a classic counting argument: three 4s, three rows, three columns — each row contributes one 4 to a different column. So cols 2, 5, and 8 each receive exactly one 4 from these three rows. Any other cell in those columns (in rows ≠ 1, 4, 6) cannot also hold a 4 — that would put two 4s in the same column.
X-Wing vs. Swordfish — the same logic, scaled up
The two techniques are points on the same continuum:
- X-Wing: 2 rows × 2 cols (4 cells)
- Swordfish: 3 rows × 3 cols (up to 9 cells, often 6)
- Jellyfish: 4 rows × 4 cols (rare in standard puzzles)
Each step up adds a row and a column, but the principle is the same: N rows in which the digit's candidates fit into N columns force N digits into those N columns, eliminating the digit from the rest of those columns.
Subtle point: not every row needs N candidates
Beginners often assume a Swordfish requires each row to have 4 (or the target digit) in all three of the relevant columns. That's not the case. Each of the three rows can have just 2 of the 3 columns as candidates — what matters is the union across the three rows.
In our example, no single row had 4 in all three of cols {2, 5, 8}. Each had only 2. The Swordfish still applies.
How to spot a Swordfish in practice
- Pick a digit and identify rows where it has 2 or 3 candidates. Other rows with more candidates are uninformative for this technique.
- Take any three such rows. Compute the union of columns that hold the digit in those three rows.
- If the union has size exactly 3, you've found a Swordfish.
- Apply eliminations to every other cell in those three columns.
- Try the dual — three columns with candidates in the same three rows.