X-Wing

Last updated

An X-Wing is built on one digit. Find two rows where that digit has exactly two candidate cells each, and where those cells sit in the same two columns. The four cells form a rectangle, and the digit can then be removed from every other cell of those two columns.

The same pattern works with rows and columns swapped: two columns whose only candidates for the digit lie in the same two rows clear that digit from the rest of those rows.

X-Wing: the highlighted cells (r6c5, r6c9, r8c5 and r8c9) form the pattern. It removes 5 from r1c5, 5 from r2c5, 5 from r3c5, 5 from r4c5, 5 from r9c5 and 5 from r9c9.

Another example, in words

Work with the digit 6. In row 2, the notes show 6 only in r2c3 and r2c8. In row 7, 6 again appears only in r7c3 and r7c8. The four corners are r2c3, r2c8, r7c3 and r7c8.

Row 2 needs a 6 and row 7 needs a 6. There are two ways to do it. Either r2c3 and r7c8 are both 6, or r2c8 and r7c3 are both 6. The two 6s cannot share a column, so they sit on opposite corners of the rectangle.

Now look at columns 3 and 8. In the first case, column 3 gets its 6 from r2c3 and column 8 from r7c8. In the second case, column 3 gets it from r7c3 and column 8 from r2c8. Either way, both columns have their 6 supplied by one of the four corner cells, and no other cell in column 3 or 8 can be 6.

So remove 6 from every candidate list in columns 3 and 8 outside rows 2 and 7. If r5c3 had 4, 6 and 9, it becomes 4 and 9.

How to spot it

Work digit by digit, not cell by cell. For one digit, look at each row and find rows with exactly two candidate cells for it. Compare the column positions. Two rows with the same two columns make an X-Wing. Then repeat the search with columns.

Keeping your attention on a single digit helps a great deal, because the pattern is a shape on the board and not a property of any one cell. If you cannot see one, the hint button names the technique and highlights the cells involved.

The four corners should be the only candidates for the digit in those two rows. If either row has a third candidate for the digit, the logic fails.

Common mistakes

The usual error is accepting a row with three candidates. Each of the two rows must have exactly two.

Another is eliminating in the wrong direction. If your pattern uses two rows, the elimination happens in the columns. If it uses two columns, it happens in the rows. The corners themselves never lose the digit.

A third is looking for the rectangle in only one orientation. Check both, because one might be there when the other is not.

When to use it

On hard puzzles, when the pair and triple techniques stop helping. An X-Wing is quick to check once you know to look for it, since it needs only one digit and a count of candidates per row, so try it early among the harder moves. The larger relative, the Swordfish, uses three rows and three columns in the same way.

X-Wing exampleSudoku board for the X-Wing technique. Pattern cells: r6c5, r6c9, r8c5, r8c9. Removes 5 from r1c5, 5 from r2c5, 5 from r3c5, 5 from r4c5, 5 from r9c5, 5 from r9c9.3724361913678298233259468324925413897693176288673555555
Pattern diagram: outlined cells form the X-Wing pattern, crossed digits are removed.