SudokuWiki
SudokuWiki.org
Strategies for Popular Number Puzzles

X-Wing Strategy

This strategy is looking at single numbers in rows and columns. It should be easier to spot in a game as we can concentrate on just one number at a time.

X-Wing example 1
X-Wing example 1 : Load Example or : From the Start
The picture on the right shows a classic X-Wing, this example being based on the number seven. The X is formed from the diagonal correspondence of cells marked A, B, C and D. What's special about them?

Well, A and B are a locked pair of 7s. So are C and D. They are locked because they are the only 7's in rows B and F. We know therefore that if A turns out to be a 7 then B cannot be a 7, and vice versa. Likewise if C turns out to be a 7 then D cannot be, and vice versa.

What is interesting is the 7s present elsewhere in the fourth and eighth columns. These have been highlighted with green boxes.
Think about the example this way. A, B, C and D form a rectangle. If A turns out to be a 7 then it rules out a 7 at C as well as B. Because A and CD are 'locked' then D must be a 7 if A is. Or vice versa. So a 7 MUST be present at AD or BC. If this is the case then any other 7s along the edge of our rectangle are redundant. We can remove the 7s marked in the green squares.

The rule is
When there are
  • only two possible cells for a value in each of two different rows,
  • and these candidates lie also in the same columns,
  • then all other candidates for this value in the columns can be eliminated.

The reverse is also true for 2 columns with 2 common rows. Since this strategy works in the other direction as well, we will look at an example next.

X-Wing example 2
X-Wing example 2 : Load Example or : From the Start
In this second example I've chosen a Sudoku puzzle where an enormous number of candidates can be removed using two X-Wings. The first is a '2-Wing'. The yellow high lighted cells show the X-Wing formation. Note that the orientation is in the columns this time, as opposed to rows as above. Looking at columns we can see that candidate 2 only occurs twice - in the yellow cells. Which ever way the 2s could be placed (E5/J8 or E8/J5) six other 2s in the rows can be removed - the green highlighted cells.
X-Wing example 3
X-Wing example 3 : Load Example

A few steps later the second X-Wing is found on candidate 3 in the same rows. Whichever way round the 3 can be placed in those rows (E2/J8 or E8/J2) there can be no other 3 in rows E and J except in those yellow cells.

Generalising X-Wing

X-Wing is not restricted to rows and columns. We can also extend the idea to boxes as well.
If we generalise the rule above we get:

When there are
  • only 2 candidates for a value, in each of 2 different units of the same kind,

  • and these candidates lie also on 2 other units of the same kind,

then all other candidates for that value can be eliminated from the latter two units.


Now we have 6 combinations:

  1. Starting from 2 rows and eliminating in 2 columns
  2. Starting from 2 columns and eliminating in 2 rows
  3. Starting from 2 boxes and eliminating in 2 rows
  4. Starting from 2 boxes and eliminating in 2 columns
  5. Starting from 2 rows and eliminating in 2 boxes
  6. Starting from 2 columns and eliminating in 2 boxes



Here is an example of combination 5. Starting from 2 rows and eliminating in 2 boxes, in this case the last two boxes in the Sudoku. The rows are 7 and 8 and they each have two 7s. Our x-Wing is now a trapezoid but the logic is the same. We can be certain that 7 can be eliminated in the red circled cells.

X-Wing Example

But HOLD UP one moment. There is a simpler strategy that does the same job!

X-Wing Example

A and B above are a pointing pair. This removes the same 7s in the same place. Combination 6 is also the complement of a pointing pair. Combinations 3 and 4 are also complements of the Line/Box Reduction. Our generalisation of X-Wing to boxes hasn't profited us at all. We learn that

X-Wings containing boxes are the inverse of the Intersection Removal strategies


X-Wing Exemplars

These puzzles require the X-Wing strategy at some point but are otherwise trivial.
They make good practice puzzles. The next strategy in this 'family' is Sword-Fish

Go back to Intersection RemovalContinue to Singles Chains


Comments

Talk Subject Comments
Comments here pertain to corrections to the text, not the subject itself

... by: Nicko

Monday 12-Jul-2021
Please replace "vis versa" with "vice versa"

https://en.wikipedia.org/wiki/Vice_Versa
https://dictionary.cambridge.org/dictionary/english/vice-versa
https://en.wiktionary.org/wiki/vis_versa

Andrew Stuart writes:
Thanks! - [Del]
Add to this Thread

... by: astromac

Tuesday 13-Jun-2017
comment to jm:

I can't see A;B;X;Y;Z either, and I have an iMac with Safari as browser.

But I think it's clear which the squares are (xyz - three red-ringed in lower right, and ab - lower left, green ringed)
Andrew Stuart writes:
Correct. - [Del]
Add to this Thread

... by: jm

Friday 11-Nov-2016
This is my very first page of my 1st attempt to learn how to solve Sodoku. I plan to approach it methodically. Is it my browser or am I missing something above? Your text:

"We can be certain that 7 can be eliminated at X, Y and Z...
...X-Wing Example: A and B above are a pointing pair."

On my screen, I cannot see an X, Y, Z, A, or B.
I use Firefox in Android. Is this a problem with my browser?
Andrew Stuart writes:
Fixed now - [Del]
Add to this Thread

... by: bern

Friday 5-Feb-2016
Labels X, Y, Z & A, B in the last example are not clearly shown, the former being the 3 7s circled in red, the latter being 2 7s circled in green. Easily interpreted but the labels are extraneous, noise of a sort.
Andrew Stuart writes:
True! I think they were on a previous diagram. Changed the text and the second diagram - [Del]
Add to this Thread

... by: sollaw

Wednesday 9-Jan-2013
The initial x-wing solutio'n refers us to columns 2 and 6; in fact it should be column 4 and 8. This error was noted by Rich in his Dec. 8, 1213 note, and remains uncorrected.
Andrew Stuart writes:
Fixed - [Del]
Add to this Thread

... by: Warren Hudson

Tuesday 25-Dec-2012
In the X wing strategy last sentence before the second example, there are the words, "we'll looks"...

I hate tipos, msspelings, grimattical eros and such, but I still loves your website.

And A Merry Christmas to you.
Andrew Stuart writes:
Fixed. Thank you - [Del]
Add to this Thread

... by: rich

Saturday 8-Dec-2012
X-wing strategy, 3rd paragraph. Should say fourth and eighth columns, not second and sixth, I think. Great writeups.
Andrew Stuart writes:
Fixed. ty - [Del]
Add to this Thread

... by: Ian Davidson

Saturday 17-Nov-2012
Wow, fantastic analysis, what a great job you have done, I like it a lot.

Just a nit picking point, nothing to do with solving the problem.
In paragraph 2 : "A and B are a locked pair of 7's. So is C and D"
Both verbs should be plural, " A and B are..... so are C and D".
Also, no apostrophe after the figure 7 !






Andrew Stuart writes:
Fixed thanks - [Del]
Add to this Thread

... by: Kim Sidey

Saturday 8-Aug-2009
Andrew,

The margin of the left column in the first figure contains numbers. You likely meant to use alphanumerics (A-I).

Great web page. You've helped me tremendously!

-Kim
Andrew Stuart writes:
Yes, thats an old snap shot. needs to be redone - [Del]
Add to this Thread
Article created on 10-April-2008. Views: 1358201
This page was last modified on 27-December-2014.
All text is copyright and for personal use only but may be reproduced with the permission of the author.
Copyright Andrew Stuart @ Syndicated Puzzles, Privacy, 2007-2024
Playwire