X-Wing and Swordfish

When singles and pairs run out on a hard board, these two elimination patterns are what break it open. Both work by spotting a candidate trapped in a grid of rows and columns.

The X-Wing

Pick a single candidate — say the number 4. Look for two rows in which 4 can go in only two cells each, and in both rows those cells sit in the same two columns. That forms a rectangle. Whichever way the 4s end up placed in that rectangle, they will occupy both of those columns — so 4 can be removed as a candidate from every other cell in those two columns. You have not placed a number, but you have eliminated candidates that were blocking progress, and those eliminations usually create new singles.

The pattern works identically if you start from two columns that confine the candidate to the same two rows; then you eliminate along the rows instead.

The Swordfish

A Swordfish is the same idea stretched to three rows and three columns. Find three rows where a candidate appears only within the same three columns (each row using two or three of them). The candidate is then locked into those three columns, so it can be struck from every other cell in them. Swordfish are rarer and harder to see than X-Wings, but on a genuinely hard board they are often the only move available.

How to hunt for them

Both patterns are invisible without a complete candidate map, so pencil the whole grid first. Then take one number at a time and ask where it can still go in each row and column. Looking for a candidate that keeps landing in the same two or three lines is exactly what surfaces an X-Wing or a Swordfish. It is slow, deliberate work — and the payoff is a cascade of new placements.

Why the rectangle actually works

The X-Wing can feel like magic until you see the logic underneath, and then it never leaves you. In the two rows of the pattern, your chosen candidate can only sit in two cells each, and those cells line up into two columns. Whichever way the puzzle eventually resolves, one row must take the candidate in the left column and the other in the right, or vice versa — there is no third option. Either way, both columns end up containing that candidate somewhere in the rectangle. Since a column can hold each number only once, the candidate is now impossible anywhere else in those two columns, and you strike it out with complete confidence. You have proved a fact about cells you have not even filled yet.

Telling a real pattern from a near miss

Beginners often think they have found an X-Wing when they have not, so it pays to be strict. The candidate must appear in exactly two cells in each of the two rows — no more — and those cells must share the same two columns. If one row has three possible cells for the candidate, the rectangle is broken and the elimination is invalid. The same discipline applies to the Swordfish across three rows and three columns: each row may use two or three of the columns, but the candidate must be confined to those three columns and nowhere else. When in doubt, do not eliminate; a false X-Wing will wreck an otherwise sound grid.

Where to look first

Rather than scanning at random, target the numbers that are already well placed. A digit that appears six or seven times on the board has its remaining candidates squeezed into just a few cells, which is exactly the condition an X-Wing needs. Run through those near-complete numbers one at a time, checking their row and column candidate counts, and the pattern tends to reveal itself far faster than a blind search of all nine digits.

These techniques earn their keep on Expert Sudoku. If you are not there yet, build the habit of full pencil marks on Medium first, or keep it classic at Sudoku AZ.