Ready to play?

Play Sudoku!

Swordfish Sudoku Technique

ToughClassic + KillerStep 22 of 373 min read

The Swordfish is the three-line version of the X-Wing. Take one digit, find three rows in which it is confined to the same three columns, and that digit can be removed from those three columns everywhere else in the grid.

What the pattern is

Work with a single digit at a time. Pick three rows — the base lines — where the digit has at most three candidate cells each. If every one of those candidates falls inside the same three columns, you have a Swordfish, and those three columns are the cover lines.

The reasoning is pure counting. Three rows each need one copy of the digit, all three copies live in three columns, and a column holds one copy at most. So the three columns are fully booked by the three rows. No other cell in those columns can take the digit.

Everything works the same way with rows and columns swapped: three columns confined to three rows eliminate the digit from those rows.

X-WingSwordfish
Base lines23
Cover lines23
Candidates per base lineExactly 22 or 3
Pattern cells46 to 9
Typical eliminations1 to 42 to 8

The relaxed count is what makes a Swordfish hard to see: a base line may show two candidates or three, and the pattern is usually ragged rather than a neat rectangle.

When to look for it

  • One digit is already placed six or seven times, so only a few rows still need it.
  • Two rows share a pair of columns but no third row completes an X-Wing.
  • Singles, subsets and pointing rules are all exhausted and you would rather not start a chain.

How to apply it, step by step

  1. Pick a digit and write down, for every row, the columns where it is still possible.
  2. Ignore any row with four or more columns — it cannot be a base line.
  3. Look for three rows whose columns, combined, come to exactly three columns.
  4. Mark those three columns as covers.
  5. Remove the digit from every cell of those columns that lies outside the three base rows.
  6. Repeat with columns as the base lines.

A worked example

Only the digit 3 matters. For each row, these are the columns where 3 is still possible.

Example
r1   c1 c4 c6
r2   c1 c4          <- base
r3   c7 c9
r4   c2 c7
r5   c4 c7          <- base
r6   c1 c8 c9
r7   c1 c3
r8   c1 c4 c7       <- base
r9   c4 c5 c8

Rows 2, 5 and 8 hold their 3s in columns 1, 4 and 7 only — two candidates, two candidates and three candidates, three columns in total. Those three rows own columns 1, 4 and 7.

So 3 comes off r1c1, r1c4, r3c7, r4c7, r6c1, r7c1 and r9c4. Look at the fallout: r1 is now forced to c6, r3 to c9, r4 to c2 and r7 to c3. One pattern, four placements.

Common mistakes

  • Demanding three candidates in every base row. Two is fine, and mixed rows are the common case.
  • Counting four columns. If the three base rows touch four different columns the logic collapses.
  • Eliminating inside the base rows. The pattern cells themselves keep the digit.
  • Confusing a Swordfish with three pointing pairs. Pointing works inside one box; a Swordfish spans the whole grid.
  • Missing the column-based version. Always run the search both ways round.

Where you meet it

Swordfish patterns start to matter on hard classic Sudoku, alongside the wings. They are much rarer than X-Wings, so treat the search as a last sweep before you move on to colouring and chains — and if three lines are not enough, the same counting argument at four lines is a Jellyfish.