Sudoku technique 10 of 12

XY-Wing

A two-candidate pivot and two pincers force a shared digit into one pincer, clearing it where they cross.

What is an XY-Wing?

An XY-Wing, also called a Y-Wing, uses three cells that each have exactly two candidates. The middle one, the pivot, holds two digits; call them X and Y. It sees two other cells, the pincers: one holds X and Z, the other Y and Z, where Z is a third digit the pincers share. Whatever the pivot turns out to be, one of the pincers must be Z. So any cell that sees both pincers cannot be Z.

Sees means shares a row, column or box. The pincers do not need to see each other, and usually they do not.

How to spot an XY-Wing

Start from cells with two candidates. For each one, look at the two-candidate cells it sees and ask whether two of them each share one digit with it, a different one each, and share a third digit with each other. When you find such a trio, look at the cells that see both pincers. Those are the only cells that can lose Z.

The pattern is easiest to read when one pincer is in the pivot’s box and the other in one of its lines, because the cells that see both are then few. In our Expert puzzles it is the technique most often needed after the subsets.

A worked example

2 5 7 1 8 6 9 3 4 1 9 7 5 8 2 8 2 5 7 6 1 5 4 6 9 3 7 4 9 7 6 5 7 2 1 8 5 4 3 9 6 1 8 5 6 4 9 2 7 3 3 7 4 2 1 8 6 5 9 6 9 6 9 2 5 7 3 4 1 8
XY-Wing. The pivot r5c1 holds only 4 and 9. It sees the pincers r4c2 (4 and 6) and r9c1 (6 and 9). If the pivot is 4, r4c2 must be 6; if it is 9, r9c1 must be 6. Either way one pincer is 6, so a cell that sees both pincers cannot be 6: 6 is removed from r9c2. That leaves r9c2 with a single candidate, so it is 9.

Position from an Expert puzzle dealt by our Sudoku generator, pencilled in from the digits alone. Our game's own solver stops at naked pairs, so this step is beyond it; we checked that no simpler technique in this guide moves this position forward.

Cells are named by row and column: r4c1 is row 4, column 1. Rows count from the top, columns from the left, and boxes are numbered 1 to 9 reading like a book, so box 1 is top-left and box 9 is bottom-right.

This position is from an Expert puzzle our game dealt, with every candidate pencilled in from the digits on the board; the diagram shows candidates only in the pattern and the cell it clears. Nothing simpler moves it forward: no single, no pointing or claiming, no naked or hidden pair or triple, and no X-Wing.

The pivot is r5c1, which holds only 4 and 9. It sees r4c2 (4 and 6) in its box and r9c1 (6 and 9) in its column. Those are the pincers, and the digit they share is 6. If the pivot is 4, r4c2 cannot be 4 and must be 6. If the pivot is 9, r9c1 cannot be 9 and must be 6. One of the pincers is 6 either way.

Now find a cell that sees both. r9c2 shares row 9 with r9c1 and column 2 with r4c2, so it cannot be 6. It held only 6 and 9, so r9c2 is 9.

Why it works

The pivot must be 4 or 9, and each choice forces a 6 into one pincer. There is no third option, so at least one pincer is 6. A 6 at r9c2 would clash with whichever pincer it is, since r9c2 shares a row with one and a column with the other.

Which difficulty levels need it

Expert only. Our game's own solver stops at naked pairs, and any puzzle it cannot finish with those is rated Expert, so no Easy, Medium or Hard puzzle needs an XY-Wing.

We measured 3,000 Expert puzzles our generator dealt. A solver that always tries the simplest technique first made a move with an XY-Wing in 1,284 of them. For 442 (14.7%), the XY-Wing was the hardest technique the puzzle needed: everything simpler stalls, and adding it finishes the grid. Of the 719 puzzles that the twelve techniques in this guide finish on their own, 411 cannot be finished without it. The rest of our Expert puzzles need techniques this guide does not cover yet, almost all of them chains.

Related: XYZ-Wing .

Try it in a real grid

Free Sudoku in your browser, with pencil marks, hints and a daily puzzle.

Play Sudoku →

All Sudoku techniques · Sudoku rules

Install GameDavinci

You never have to — every game plays in the browser, free, with no download. Installing just adds a home-screen icon, full screen, and offline play for games you've already opened.