# The Swordfish technique

The Swordfish takes the idea behind the X-Wing and stretches it over three rows and three columns. It is harder to see, because the pattern rarely looks like a neat shape, but the logic is just as solid and the eliminations can be just as big.

## What a Swordfish is

Pick one digit. A Swordfish appears when **three rows** each have that digit in only two or three cells, and all of those cells fall within the **same three columns**. You can then remove the digit from every other cell in those three columns.

In the diagram below, 7 can only go in columns 2, 4 and 9 in rows 1, 5 and 8. Row 1 has it in two of those columns, row 5 in all three, row 8 in two. That is enough: the rows don't need to use every column.

_Diagram: Every cell where 7 is still possible. In rows 1, 5 and 8 (shaded), the 7s all sit in columns 2, 4 and 9._

## Why the logic works

Rows 1, 5 and 8 each need a 7, so the three rows hold three 7s between them. All three must land in columns 2, 4 or 9, and no column can take two of them. Three 7s in three columns means **one in each column**.

So column 2 gets its 7 from one of these rows, and so do columns 4 and 9. Any other 7 in those columns is impossible. Inside the pattern there are only three ways to place the 7s (r1c2, r5c4, r8c9, or r1c2, r5c9, r8c4, or r1c9, r5c2, r8c4), and every one of them uses each column exactly once. You don't need to know which one is right.

## A worked example

Back to the grid. Column 2 also has a 7 in r6c2, column 4 has one in r3c4, and column 9 has one in r7c9. The Swordfish removes all three.

_Diagram: Columns 2, 4 and 9 (shaded) take their 7s from rows 1, 5 and 8, so r6c2, r3c4 and r7c9 lose their 7._

As with every fish, the direction flips: the pattern is found in rows, the eliminations happen in columns. It also works the other way round. Three columns whose candidates fall in the same three rows clear the digit from the rest of those rows.

## How to spot a Swordfish

1. Choose one digit and check that your [pencil marks](https://drop.top/apps/sudoku/pencil-marks/) for it are complete.
2. List the rows where the digit has only two or three candidates. Rows with four or more can't be part of a Swordfish.
3. Look for three of those rows whose candidates, taken together, cover just three columns.
4. Check those columns for other candidates of the digit. If there are none, the Swordfish is real but gives you nothing.
5. Repeat the search with columns, looking for three columns that cover just three rows.

The hardest version to see has exactly two candidates per row: columns 2 and 9 in one row, 2 and 4 in the next, 4 and 9 in the third. No two rows match, so it doesn't look like a pattern at all. Writing the column numbers beside each row on scrap paper makes it jump out.

## Common mistakes

- **A fourth column.** If one of the three rows has the digit in a column outside the three, there is no Swordfish.
- **Mixing directions.** Find the pattern in rows and eliminate in columns, or the reverse. Never remove candidates from the three pattern rows themselves.
- **Expecting a perfect shape.** A Swordfish doesn't need nine cells, or even three per row. Two or three candidates per row is normal.
- **Missing an X-Wing inside.** If two of your three rows already form an [X-Wing](https://drop.top/apps/sudoku/x-wing/), use that first: it is simpler and may be all you need.

## Bigger fish: the Jellyfish

The same idea works with four rows and four columns, a pattern called the **Jellyfish**. Four rows that each have the digit in two to four cells, all inside the same four columns, clear the digit from the rest of those columns. Jellyfish are rare and slow to find, so most solvers only look for them in the hardest puzzles, after [Skyscrapers](https://drop.top/apps/sudoku/skyscraper/) and [Simple Coloring](https://drop.top/apps/sudoku/simple-coloring/).

## Questions

### What is the difference between an X-Wing and a Swordfish?

An X-Wing uses two rows and two columns; a Swordfish uses three of each. The logic is identical, only the size changes.

### Does every row of a Swordfish need three candidates?

No. Each row needs two or three candidates, and all of them must fall in the same three columns. Many Swordfish have just two per row.

### What is a Jellyfish in sudoku?

The four-row, four-column version of the same pattern. It works the same way but is much rarer.

### Are there fish bigger than a Jellyfish?

In theory, but you never need them. A five-row fish always comes with a smaller fish of four rows or fewer for the same digit, which gives the same eliminations.
