Swordfish
A Swordfish is an X-Wing stretched to three rows and three columns. If, in three rows, a digit's possible cells all lie within the same three columns, then those three rows use that digit in those three columns, and it can be removed from every other cell in those columns. Rows and columns can swap roles.
On this site Swordfish first appears in Expert puzzles.
From two lines to three
An X-Wing needs two rows with exactly two spots each. A Swordfish loosens both requirements. Each of the three rows may have two or three candidate cells for the digit, they do not have to be the same cells, and nothing is required of any row individually. All that matters is that, taken together, the candidates of the three rows fall within just three columns. Three rows each need the digit once, and only three columns are available, so each of those columns gets exactly one copy from these rows.
The diagram above is a real position from this site's Expert pool, drawn by the technique engine. The caption reads: in rows 4, 7 and 9, the digit 1 can only go in columns 3, 5 and 9, so those three rows must use 1 in those three columns, and 1 can be removed from the rest of columns 3, 5 and 9. Notation is row first, then column, counted from the top left.
How to recognise one
- Choose a digit with a short candidate list in every row, which usually means a digit already placed five or six times.
- List, for each row, the columns where the digit can still go. Keep only rows with two or three columns.
- Look for three rows whose combined list of columns has exactly three distinct columns.
- Remove the digit from all other rows in those three columns.
- Check the transposed version: three columns whose rows fall within three rows.
Step three is harder than it sounds, because the rows can have different column sets. For example, one row may use columns 3 and 5, another 5 and 9, and the third 3 and 9; the union is still three columns. A common memory aid is to draw the three rows and put a mark where the digit is allowed. If all the marks fit in three columns, you have the fish.
Why it works
Each of the three rows must contain the digit, so there are three placements to make, one per row. They must go in different columns, since a column holds each digit once, and all three have to come from the three columns identified. That uses one placement per column and leaves no room for the digit elsewhere in those columns. The argument does not depend on which row takes which column, so it remains valid however the three placements work out.
Common mistakes
- Counting four columns. If the three rows together touch four columns, there is no Swordfish. Count the union carefully.
- Removing from the rows of the pattern. The three rows keep their candidates. The eliminations are in the other rows of the three columns.
- Demanding exact matches. Rows do not need identical column sets; the union of the three is what counts.
- Using rows with four or more candidates. A row with the digit in four columns cannot be confined to three columns.
- Mixing orientation. A fish is either rows-to-columns or columns-to-rows. Do not combine them.
Where the site's grading needs it
Swordfish is a fourth-tier technique, in the tier with XY-Wing and simple coloring. In the committed frequency data over 1,000 stored classic puzzles per tier, a Swordfish was used in 0 puzzles at Easy, Medium and Hard, and in 43 Expert and 33 Evil puzzles. It is the least common technique in the table. Each puzzle is solved cheapest technique first and a technique counts if used at least once, so a Swordfish only appears when nothing cheaper applies. See how difficulty is graded and the frequency guide.
How rare is rare
The figures say that 43 of 1,000 Expert puzzles in this sample needed a Swordfish under cheapest-first solving. That is a statement about this sample and this solver's ordering, not about Sudoku in general. A human who prefers colouring over fish, or who finds a different chain, may never meet a Swordfish at all. The point of knowing it is that, when the usual tools fail, the pattern is a complete and mechanical way forward.
Jellyfish and beyond
Four rows confined to four columns give a Jellyfish, which works the same way. The engine on this site does not implement it, and puzzles that need one are not graded by this site's method. Fish larger than a Swordfish are of more interest to puzzle theorists than to solvers: the complementary set of rows and columns is usually a smaller fish that is easier to find.
In the variants
As with X-Wing, the pattern needs ordinary rows and columns. It applies to the classic board and to constrained variants such as diagonal and hyper, where the extra groups can thin the candidate lists enough to expose a fish earlier.
Check your understanding
- Three rows have the digit confined to columns {2,6}, {6,8} and {2,8}. What does that give?
- If the three rows touch columns {2,6}, {6,8} and {1,8}, is there a Swordfish?
- Where do the eliminations land?
The answers: a Swordfish on columns 2, 6 and 8, so the digit leaves all other rows in those columns; no, since the union has four columns; and in cells of those three columns that are outside the three rows.
A worked example
Read the diagram the way the engine does. For the digit 1, row 4 allows it only in some of columns 3, 5 and 9, row 7 only in some of them, and row 9 only in some of them. No row allows the 1 in any other column. Each row still needs its 1, so across the three rows there are three 1s to place, and all three have to land in columns 3, 5 and 9, one per column. That uses up the 1 in each of those three columns. Every other empty cell in columns 3, 5 and 9, in rows other than 4, 7 and 9, can drop its 1.
Notice what the technique does not tell you: which row takes which column. It only tells you where the 1s cannot be. As with an X-Wing, the payoff is usually a chain reaction, because removing a digit from a handful of cells across three columns often leaves another cell with a single candidate.
A drawing trick
If you are unsure whether three rows form a fish, draw a small 3-by-9 table in your head or on paper: one row for each candidate row, with a mark in each column where the digit is allowed. If the marked columns, taken together, number exactly three, the pattern is complete. If a fourth column has a mark, the rows can escape the three columns and the fish does not hold. Doing this once or twice by hand makes the pattern much easier to recognise on the board.
Practice
Try an Expert puzzle on the main board. If the usual techniques stall, pick the digit with the fewest candidates and list the columns row by row. The level-two hint names the technique when a Swordfish is the cheapest step available.
Previous: X-Wing. Next: XY-Wing. Back to the technique list.