🧩 Strategy & Techniques

Y-Wing Sudoku (XY-Wing): How to Find and Use It

Learn the Y-Wing (XY-Wing) Sudoku technique: a pivot and two pincers, why it removes a digit, how to spot it step by step, common mistakes and the XYZ-Wing.

537619598686348317266284195879?
In this article
  1. What is a Y-Wing in Sudoku?
  2. Why it works: one of the pincers must be Z
  3. A real example, step by step
  4. How to spot a Y-Wing
  5. Common mistakes
  6. The XYZ-Wing, briefly
  7. How to practise Y-Wings

If you have already met the X-Wing, the Y-Wing is the next big step. It is just as common in expert puzzles, but it works in a completely different way. An X-Wing follows one digit across two lines. A Y-Wing follows three small cells, each with only two options, and shows that they push a third digit out of a cell somewhere else on the board.

This guide explains the parts of the pattern, why the logic holds, a routine for spotting it, the mistakes that catch almost everyone, and a quick look at its bigger cousin, the XYZ-Wing. The diagrams are a real expert position, taken from the same solver that writes the hints on Sudoku.my.

What is a Y-Wing in Sudoku?

A Y-Wing is built entirely from bivalue cells: empty cells with exactly two candidates left in your pencil marks. You need three of them, linked like this:

  • The pivot holds two digits, which we call X and Y. It sits in the middle of the pattern and “sees” the other two cells (it shares a row, a column or a box with each of them).
  • Pincer one sees the pivot and holds X and a third digit, Z.
  • Pincer two also sees the pivot and holds Y and the same third digit, Z.

So between them the three cells use only three digits, and every cell has two of them. The pivot is the only cell without Z. The pincers are the only cells that share Z. The cells you clean up are the ones that see both pincers at once.

Why two names?

You will see this technique called both Y-Wing and XY-Wing. They are the same thing. SudokuWiki, one of the best-known strategy sites, uses “Y-Wing” and says the shape looks like an X-Wing with three corners instead of four. The HoDoKu solver documentation uses “XY-Wing”. The pincers are sometimes called wings, and the pivot is sometimes called the hinge. On Sudoku.my, the hint for this move is labelled XY-Wing.

Like every advanced technique, the Y-Wing lives in the candidates, so you need complete and up-to-date pencil marks. A missing candidate can make a three-option cell look like a bivalue cell, and then the pattern you “found” is not real.

Why it works: one of the pincers must be Z

The pivot has only two options, so there are only two stories to follow.

  • The pivot is X. Pincer one sees the pivot, so it can’t be X as well. Its only other option is Z.
  • The pivot is Y. Pincer two sees the pivot, so it can’t be Y. Its only other option is Z.

In both stories, at least one pincer is Z. You don’t know which one yet, and you don’t need to. Any cell that sees both pincers would clash with a Z in either of them, so that cell can never be Z. That is the whole technique: two cases, same result, so the result must be true.

A real example, step by step

Here is an expert position with full pencil marks. All the easier techniques have run out. Look for bivalue cells (cells with just two small digits) and try to find three of them that use only three digits between them:

An expert position with every candidate shown. Can you find a pivot with two candidates whose two pincers share a third digit?

Now the three cells of the pattern:

The pivot at row 5, column 3 holds 3 or 4. It sees row 5, column 9 (3 or 5) along row 5, and row 8, column 3 (4 or 5) down column 3. The pincers share the digit 5.

Let’s check it against the definition:

  1. Pivot: row 5, column 3, with candidates 3 and 4. So X = 3 and Y = 4.
  2. Pincer one: row 5, column 9, with 3 and 5. It is in the same row as the pivot and holds X plus a third digit, so Z = 5.
  3. Pincer two: row 8, column 3, with 4 and 5. It is in the same column as the pivot and holds Y and Z.
  4. Follow both cases: if the pivot is 3, the cell at row 5, column 9 must be 5. If the pivot is 4, the cell at row 8, column 3 must be 5. One of the pincers is a 5 either way.
  5. Find cells that see both pincers: row 8, column 9 is in column 9 with the first pincer and in row 8 with the second. It still has 5 as a candidate, so the 5 goes.
Y-Wing on 5. Whatever the pivot becomes, one pincer is 5. Row 8, column 9 sees both pincers, so 5 is removed from it, leaving 4 or 9.

Look at what this unlocks. Row 8 has three empty cells: column 1 (4 or 9), column 3 (4 or 5) and column 9, which now holds only 4 or 9. The 5 in row 8 can only go in column 3, a hidden single. That is typical of a Y-Wing: it removes one candidate, and a simple move appears right after.

The explanation in the game says the same thing in shorter words: “XY-Wing: these three cells force a 5 out of the cells that see both ends.” The “ends” are the pincers.

How to spot a Y-Wing

Y-Wings are much easier to find with a routine than by staring. Make sure your notes are complete, then:

  1. List the bivalue cells. Scan the board for cells with exactly two candidates. In a typical expert position there are plenty; the example above has more than twenty.
  2. Pick one as a possible pivot, say {3,4}.
  3. Look at the bivalue cells it can see: same row, same column or same box. You want one that contains the pivot’s first digit (3) but not its second, and one that contains the second (4) but not the first.
  4. Check that they share their other digit. If one is {3,5} and the other {4,5}, you have a Y-Wing on 5. If one is {3,5} and the other {4,7}, you don’t.
  5. Find the cells that see both pincers and check whether any of them still has Z. If none does, the pattern is real but useless right now. Try the next pivot.

Where to look for eliminations

The shape of the pattern tells you where the targets are:

Where a Y-Wing can remove Z
How the pincers see the pivotCells that see both pincers
One by row, one by column (an L shape, as in the example)Usually a single cell: the fourth corner of the rectangle
One by box, one by row or columnUp to a few cells, in the pincer’s box along the other pincer’s line, and in the other pincer’s box along the first pincer’s line
Both in the same line or box as each otherEvery other cell in that shared line or box, and sometimes more

On Sudoku.my, selecting a cell highlights its row, column and box, which makes it easy to see which bivalue cells a pivot can reach. On desktop you can toggle notes with the N key.

Common mistakes

The example position is full of near misses, which makes it a good place to learn what is not a Y-Wing.

1. Using a cell with three candidates

Every cell in the pattern must have exactly two candidates. In the example, row 5, column 7 sees the pivot along row 5 and holds 4 and 5, so it looks like a second pincer. But it also holds 3, and with a third option the “it must be Z” step fails: if the pivot is 4, that cell could simply be the 3. (The cousin that allows one three-candidate cell is the XYZ-Wing, below, and it plays by stricter rules.)

2. Removing Z from a cell that sees only one pincer

Row 7, column 9 holds 4 and 5. It shares column 9 with the first pincer, but it does not share a row, column or box with the second pincer at row 8, column 3. If the 5 ends up in the second pincer, nothing stops row 7, column 9 from being a 5 too. Only cells that see both pincers lose Z.

3. Pincers that don’t share the third digit

The two pincers must have the same Z. A pivot {3,4} with neighbours {3,5} and {4,9} is not a Y-Wing: follow the two cases and you get “5 here” or “9 there”, which proves nothing about either digit.

4. Pincers that don’t see the pivot

Each pincer must share a row, column or box with the pivot. That link is what forces the pincer to Z when the pivot takes the shared digit. Two cells that merely look close on the board, but sit in different rows, columns and boxes from the pivot, don’t count. (The pincers don’t need to see each other.)

5. Removing the wrong digit

A Y-Wing only ever removes Z, the digit the two pincers share. It never removes X or Y, and it never touches the three cells of the pattern.

6. Working from stale notes

If you placed a number and forgot to clear it from the notes nearby, a bivalue cell can look like it has three options (you miss the Y-Wing), or a three-option cell can look bivalue because you never wrote the third digit (you make a wrong elimination). Sudoku.my clears notes automatically when you place a number; you can check that it is on in Settings.

The XYZ-Wing, briefly

The XYZ-Wing is the Y-Wing’s slightly harder cousin. The pincers are the same, {X,Z} and {Y,Z}, but the pivot has three candidates: X, Y and Z.

The logic gains a third case. If the pivot is X, pincer one is Z. If the pivot is Y, pincer two is Z. And if the pivot is Z, then the pivot itself is Z. So one of the three cells is Z, and the digit can only be removed from cells that see all three: the pivot and both pincers. That is a much smaller target, usually one or two cells in the pivot’s box.

Y-Wing vs XYZ-Wing
Y-Wing (XY-Wing)XYZ-Wing
PivotTwo candidates {X,Y}Three candidates {X,Y,Z}
Pincers{X,Z} and {Y,Z}{X,Z} and {Y,Z}
Z is certainly inOne of the two pincersOne of the three cells
Remove Z fromCells that see both pincersCells that see the pivot and both pincers
Needed on Sudoku.mySome Expert puzzlesNever

Why “never”? Every puzzle on Sudoku.my is checked by a solver that only uses a fixed list of techniques, up to X-Wing, XY-Wing and Swordfish at Expert. A puzzle is only kept if that solver can finish it, so you will never be forced to find an XYZ-Wing here. It can still be a shortcut, though, and it is worth knowing for puzzles from other sources.

How to practise Y-Wings

  • Play Expert puzzles. On Sudoku.my, Easy needs only singles, Medium adds locked candidates, Hard adds pairs and triples, and Expert may need X-Wing, XY-Wing or Swordfish. Below Expert, the pattern won’t be needed.
  • Use hints as a teacher. You get three hints per puzzle, and each one names the technique and highlights the cells. When a hint says “XY-Wing”, find the pivot, name X, Y and Z, and check the eliminations yourself.
  • Do a bivalue sweep. When you’re stuck, go round the board and look only at two-candidate cells. Treat each one as a pivot for a few seconds. With practice this takes a minute or two.
  • Check X-Wings first. On Sudoku.my the solver tries the X-Wing before the XY-Wing, and both before the Swordfish. Searching in the same order means you match what a hint would show.
  • Never guess. Every puzzle here has exactly one solution and can be solved by logic alone. If you’re stuck, there is a pattern to find, and Miko the cat is in no hurry.

The daily challenge rotates difficulty through the week, gentle on Monday and Expert on Sunday, so Sunday’s puzzle is the one where a Y-Wing may appear. You can see the week and your streak on the calendar.

Frequently asked questions

What is a Y-Wing in Sudoku?

A pattern of three cells with two candidates each: a pivot with X and Y, and two pincers it can see, with X and Z and with Y and Z. One pincer must be Z, so Z can be removed from any 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 technique. The pincers are also called wings, and the pivot is sometimes called the hinge.

Do the pincers of a Y-Wing need to see each other?

No. Each pincer must see the pivot, but the pincers usually sit in different rows, columns and boxes. The digits are removed only from cells that see both pincers.

What is the difference between a Y-Wing and an XYZ-Wing?

In an XYZ-Wing the pivot has three candidates, X, Y and Z, instead of two. One of the three cells must then be Z, so Z can only be removed from cells that see the pivot and both pincers.

Is a Y-Wing related to the X-Wing?

Only by name and by the two-case logic. An X-Wing follows one digit across two lines; a Y-Wing uses three two-candidate cells and removes a third digit.

Which Sudoku puzzles need a Y-Wing?

Mostly expert-level puzzles. On Sudoku.my, Easy to Hard puzzles never need it, while Expert puzzles may need X-Wing, XY-Wing or Swordfish.

Sources

  1. Y-Wing Strategy SudokuWiki.org
  2. Wings (XY-Wing, XYZ-Wing, W-Wing) HoDoKu

#Y-Wing#XY-Wing#Techniques#Advanced