The XY-Wing, also called Y-Wing, is an advanced sudoku technique that uses three cells with exactly two candidates each. One cell, the pivot, holds the candidates X and Y. It is connected to two other cells, the pincers: one holds X and Z, the other holds Y and Z. One of the two pincers must be Z, so Z can be removed from every cell that sees both pincers.
Players usually learn the XY-Wing after the X-Wing, and in hard puzzles the XY-Wing often appears more frequently than the X-Wing. The X-Wing follows one digit through rows and columns. The XY-Wing is different: it combines three digits in three cells. This guide explains the rule, then shows it on a real position, cell by cell.
The XY-Wing rule
Two cells see each other when they are in the same row, the same column or the same box. An XY-Wing has three parts:
- The pivot: a cell with exactly two candidates, X and Y.
- The first pincer: a cell with exactly the candidates X and Z that sees the pivot.
- The second pincer: a cell with exactly the candidates Y and Z that also sees the pivot.
The pivot is X or Y. There is no third possibility. If the pivot is X, the first pincer cannot be X, so it is Z. If the pivot is Y, the second pincer cannot be Y, so it is Z.
So one of the two pincers is Z in every case. A cell that sees both pincers is in a row, column or box with that Z, so it cannot be Z itself. You do not learn which pincer is Z, and you do not need to know. The pincers do not have to see each other. Usually they do not.
The rule in one sentence
Pivot XY, pincers XZ and YZ: remove Z from every cell that sees both pincers.
A real example, step by step
In this position the easy moves are finished and there is no single left to place. Every empty cell shows its candidates, the digits that are still possible there.
- 5 clue
- 5 already solved
- 5 new digit
- 5 pattern candidate
- 5 candidate to remove
Find the pattern
Look at the cells with exactly two candidates. R4C1 holds 1 and 6. Take it as the pivot and look at the cells it sees:
- R4C4 holds 1 and 9. It is in row 4, the same row as the pivot. It shares the 1 with the pivot.
- R5C2 holds 6 and 9. It is in box 4, the same box as the pivot. It shares the 6 with the pivot.
Both pincers have 9 as their other candidate. So X is 1, Y is 6 and Z is 9. This is an XY-Wing.
Check both possibilities
- Option A: R4C1 is 1. Then R4C4 cannot be 1, so R4C4 is 9.
- Option B: R4C1 is 6. Then R5C2 cannot be 6, so R5C2 is 9.
In both options there is a 9 in R4C4 or in R5C2. Now find the cells that see both pincers. R4C2 and R4C3 are in row 4 with R4C4 and in box 4 with R5C2. R5C4, R5C5 and R5C6 are in box 5 with R4C4 and in row 5 with R5C2. All five cells have 9 as a candidate, so remove 9 from all five.
Use the result
An XY-Wing places no digit by itself, but its eliminations often open the next move. R5C5 had two candidates, 8 and 9. The 9 is gone, so 8 is the only candidate left. That is a naked single: place 8 in R5C5. R5C6 had the candidates 5 and 9, so R5C6 now has only the candidate 5 left.
How to search for an XY-Wing
You need complete pencil marks, because the pattern depends on the exact candidates of three cells. Then search in this order:
- Mark the cells with two candidates. Only these cells can be part of an XY-Wing. A hard puzzle often has ten to twenty of them.
- Try each one as the pivot. For a pivot with X and Y, look at the cells it sees. Search for one cell that has X with another digit, and one cell that has Y with another digit.
- Compare the other digits. If the other digit is the same in both cells, you have an XY-Wing, and that digit is Z.
- Find the cells that see both pincers. Remove Z from each of them that has Z as a candidate.
- Go back to the easy moves. Look for naked singles and hidden singles again.
The shape decides where you can remove candidates. If one pincer is in the row of the pivot, the other is in its column, and all three cells are in different boxes, only one cell sees both pincers: the fourth corner of the rectangle. If one pincer is in the box of the pivot, as in the example, up to five cells see both pincers.
Common mistakes
- A cell with three candidates. All three cells must have exactly two candidates. If the pivot has X, Y and Z, the pattern is an XYZ-Wing, and you can only remove Z from cells that see all three cells.
- Removing from cells that see only one pincer. A cell must see both pincers. A cell that sees one pincer and the pivot keeps its candidate.
- Choosing the wrong pivot. The pivot is the cell that sees both other cells, and it does not contain Z. If you take a pincer as the pivot, you remove the wrong digit.
- Pincers that do not share a digit. If the second candidates of the two pincers are different, there is no XY-Wing and nothing can be removed.
When to look for an XY-Wing, and what comes next
Easy and medium puzzles do not need an XY-Wing. Look for one when you are stuck in a hard puzzle: all pencil marks are written, and singles, pairs and pointing pairs give nothing more. A grid with many cells that have two candidates is a good sign.
Drill XY-Wing in the Dojo
Sudoku Royale's Dojo has a short lesson and a drill for this pattern: board after board where it is the next move. Your record is your fastest run of correct answers in a row, and you can see how it compares with other players. Open the XY-Wing drill on your iPhone, or read how the Dojo works.
Get Sudoku Royale: Free on iOSOther techniques at this level are the Swordfish, which uses one digit in three rows and three columns, and simple coloring, which follows one digit through a chain of cells. After the XY-Wing, the W-Wing connects two cells that have the same two candidates. An XY-Wing is also a short chain of three cells, and the XY-chain uses the same idea with more cells.
Frequently Asked Questions
What is an XY-Wing in sudoku?
An XY-Wing is a pattern of three cells with two candidates each: a pivot with X and Y, and two pincers that see the pivot, one with X and Z and one with Y and Z. One of the pincers must be Z, so Z can be removed from every cell that sees both pincers.
Is a Y-Wing the same as an XY-Wing?
Yes. Y-Wing and XY-Wing are two names for the same pattern.
Do the pincers of an XY-Wing have to see each other?
No. Only the pivot has to see each pincer. The eliminations are in the cells that see both pincers.
Which candidates does an XY-Wing remove?
It removes Z, the digit that both pincers share, from every cell that sees both pincers. The pivot and the pincers keep their candidates.
What is the difference between an XY-Wing and an XYZ-Wing?
In an XY-Wing the pivot has two candidates, X and Y. In an XYZ-Wing the pivot has three candidates, X, Y and Z, so the pivot itself may be Z. Then you can remove Z only from cells that see all three cells.