Sudoku XY-Wing Explained
A Sudoku XY-Wing pattern occurs in many of the more difficult Sudoku puzzles. Your ability to identify and solve this pattern will often break the logjam and lead you to the solution of a challenging Sudoku game.
In this article, I use two of my hand crafted very difficult puzzles that have a known XY-Wing pattern. If you would like to try to solve the first puzzle, download and print out this PDF Sudoku very hard puzzle #13 and follow along. I’ll wait. Back? Great. Let’s get started.
Sudoku XY-Wing Pattern
You will need to partially solve the puzzle to reach the picture shown. You will need to solve naked singles, hidden singles, a naked pair, and two locked candidates first.
If these terms are not familiar, read my article Sudoku Tips for an illustrative guide.
If you have trouble getting to this position, follow the steps I have outlined in my article Sudoku Directions.
The XY-Wing pattern is made up of three cells that form a “Y” (with a little stretch of the imagination).
Imagine two branches and a stem that form the letter “Y”. There are two branch cells, and one stem cell.
Each cell contains just two numbers. One candidate of the stem cell will be a shared candidate with the adjoining branch cell. This results with a total of three unique candidates for the three cells in the form XY, YZ, and XZ.
To illustrate this, the three cells contain the candidates XY (stem cell), YZ (branch cell), and XZ (branch cell).
In the example shown above, the corner stem cell XY (R1C1) (highlighted in grey) has the pair (2,3). One of the branch cells YZ (R1C8) has the candidates (3,7). The last branch cell XZ (R5C1) has the candidates (2,7).
You can safely remove the “Z” candidate from the cell(s) that share a relationship with the branch cells.
In the example shown the “Z” candidate, a 7, can be removed from the cell (R5,C8) circled in red.
Here is the logic and proof:
If R1C1 is a “2” then R5C1 is a “7”, therefore you can remove the 7 from cell R5C8
If R1C1 is a “3” then R1C8 is a “7” therefore you can remove the 7 from cell R5C8.
Following the “if-than-else” logic proves you can safely remove the “7” from cell R5C8.
Removing the 7 from the cell (R5,C8) circled in red leaves us with two cells with the naked pair (1,8). Since no other cell in the same region can possibly have a 1 or a 8, then cell (R4,C7) which has the candidates (1,7,8) must be a 7.
You have just broken the logjam. You will be able to solve the puzzle quickly now by looking for naked singles.
Congratulations on solving a very difficult Sudoku puzzle using Sudoku XY-Wing. For more difficult puzzles see my collection of printable free Sudoku puzzles. They come in five levels of difficulty.
Sudoku XY-Wing (Example #2)
At the left is a variation of the XY-Wing pattern that occurs in my experience more often than the first example described above. It is also harder to spot.
In this example, the stem cell XY is (R1C1) which contains the candidates (8,9). The left branch cell YZ is cell (R2C3) and holds the candidates (2,9). The right branch cell XZ is cell (R4C1) and contains the candidates (2,8)
The branch cell YZ (R2,C3) is not in either row 1’s or row 4’s corner as you might expect. Yet it will influence the corner cell (R4,C3). Since branch cell (R2,C3) and cell (R4,C1) both share a 2, the Z, the 2 can be safely removed from consideration for the corner cell (R4,C3).
Remove the two and the puzzle can be quickly solved.
If you would like to try to solve this puzzle, download and print out this PDF Sudoku very hard puzzle #3.