Sudoku X Wing Technique with Examples

If nothing else, Sudoku solvers have imagination when they name techniques!

This idea is completely analogous, logically, to pairs, triplets, etc.  Forbidding matrices expose this analogy.

Here is the idea as an X wing:

  • Consider any one candidate
  • Consider any two distinct rows
  • Let the candidate be limited to no more than two cells in each of these two rows
  • Let this group of no more than 4 cells share exactly two columns
  • The candidate is forbidden from all the cells in those two columns outside of those 4 cells
Because of symmetry, one can exchange columns for rows in this rule.

X wing example


Xwing on 3's

Note the following:

  • All possible locations for 3's in row 9 are f9,h9.
  • All possible locations for 3's in row 5 are f5,h5.
  • Forbids 3 from f4,f8,h4,h6.
This step could be presented in a puzzle proof as follows:
  • xwing on 3's at fh59 forbids f48,h46=3.
It should be clear that, for example, f4=3 is impossible. If f4=3, then in order for rows 5,9 to have any threes, both h5=3 and h9=3. Since h5,h9 are both in column h, one concludes f4=3 is forbidden by the rules.

This idea extends easily:

  • Consider any one candidate
  • Consider any N distinct rows, N>0.
  • Let the candidate be limited to no more than N cells in each of these N rows
  • Let this group of no more than N^2 cells share exactly N columns
  • The candidate is forbidden from all the cells in those N columns outside of those N^2 cells
Because of symmetry, one can exchange columns for rows in this theorem.

With N=1, we have the trivial case of a Unique Possibility. With N=2, we have a standard X wing. With N=3, we have a swordfish. With N=4, we have a jellyfish. with N=5, the creative name squirmbag is used. To prove this technique, I prefer to use induction.

This technique merely crosses the possible locations of a candidate in N rows with N columns. It is analogous to an Ntuple, which crosses the possible locations within a large container of N candidates with N cells.

Got all that? Now you are ready for the Swordfish Technique

16
Indicate which comments you would like to be able to see
ang  From india
Thanks for presenting the techniques in easy to understand format and language
jyrki  From Finland
Thanks for explaining this! I think I have used the Xwing rule sometimes, just didn't know what the community calls it. The generalization is nice. Wish I could spot these easily on actual puzzles :)

A simpler but similar rule makes an appearance on 16x16 sudokus very frequently. Say, I know that hexit 'X' on column a is in the cell a1. Consider the four 4x4 blocks on columns a thru d. Assume that I can deduce that 'X' must lie on either column b or c in two of those boxes. It immediately follows that the 'X' on the remaining box is on column d. Of course, in retrospect,
the same fact follows rather more easily by simply
attempting to answer the question: 'where's 'X' on
column d?'. For some reason, I always do this kind of a deduction the harder way. Woe is me :(

Summary: nothing deep in my comment.
Pam  From SW Ontario
Thanks for a good Christmas present. I will enjoy working on this after the holidays when everything and everyone is quiet.
Susan  From New York
Steve, thanks so much for explaining this. I used an xwing by myself, no help, for the first time today! I am looking forward to getting better at these tough puzzles. Thank you, thank you, thank you.
Steve  From Ohio    Supporting Member
Check out my page
Feel free to ask any questions that you may have about a technique, even if it is not the one being discussed. I will generally check for questions periodically.
ang  From india
after solving tough sudoku 22 dec,the position obtained is(figures betwen commas are possibilities)-pl advise how to proceed further without guessig or hit/trial:
8,17,3,56,169,59,67,2,4
5,47,9,2,46,8,3,67,1
1 4,2,6,7,14,3,5,89,89
13469,14569,7,1346,8,249,246,456,356
3469,8,245,346,69,2479,2467,1,356
1346,146,24,1346,5,247,9, 4678,368
7,45,8,9,3,6,1,45,2
69,69,45,45,2,1,8,3,7
2,3,1, 8,7,45,46,4569,569
ang  From india
can i treat the 7's at b8,h8 &f4,h4 as X-wing?
Steve  From Ohio    Supporting Member
Check out my page
Hi ang!
I will later look at the exact puzzle position that you have listed. But, for now I can tell you:
7's at b8,h8 and f4,h4 will never form an X wing.

In order to have a true X wing (as opposed to a finned X wing) - one must have alignment in both rows and columns. Therefor, since you have three columns involved, it cannot form an X wing.

I did submit a proof for the puzzle of 12/22/06 on that puzzle page. When I submit a proof, I do not include steps that I found but did not need to advance the puzzle. Thus, you may have performed some steps I did not mention. Nevertheless, if you were to follow the exact steps listed, the puzzle will solve.

Thanks so much for the question!
Steve  From Ohio    Supporting Member
Check out my page
Hi ang!
I have now looked at the puzzle condition that you posted. The proof I presented on that date works from the situation you described. Here are the relevant proof portions:

6b) b3=4 == b3=5 -- bc2=5 == d2=5 -- d9=5 == d9=6 -- e8=6 == e8=4 forbids b8=4 UP 51
7) Pair 24 at cf4 forbids bd4=4 UP 54
8a) Pair 45 at bh6 forbids dfg6=4,i6=5
8b) fc on 4's: g5 == g1 -- f1== f4 forbids d4=4 UP 81
Steve  From Ohio    Supporting Member
Check out my page
Now, to explain what the terminology means:
Eventually, the blog will detail the ideas above with precision. On a temporary basis, consider the following:
6b) b3=45; 5's in row 2 are limited to bc2,d2; d9=56; e8=46. If b3=4, then b8<>4. If b3<>4, then b3=5 => bc2<>5 => d2=5 => d9<>5 => d9=6 => e8<>6 => e8=4 => b8<>4. Thus, whether b3=4 or not, b8 cannot be 4.
If you got this far, steps 7 and 8a are no problem.
8b) This is really a coloring step - that will be treated in a soon to occur blog page. For now, consider:
4's in column g are limited to g5,g1 and 4's in column f are limited to f1,f4.
Thus, if g5=4 then d4<>4, but if g5<>4 => g1=4 => f1<>4 => f4=4 => d4<>4 still.

=> means implies.
<> means does not equal.

Hopefully this is helpful.

fi  From NT
Hi Steve,

Thanks for you blog. I've puzzled away trying to work things out myself... I do like that challenge.

gb's explanations assisted me to understand the board positions and a FC but I guess I've never fully understood an Xwing or Swordfish... (still have to put in some time on this) though I think I've used them inconsistantly.

good to get the terminology
=> means implies.
<> means does not equal.

Have you got a sign for therefore?
We had the 3 dots at school but there's nothing of that on my keyboard :. ?? :- ? :~

When ever I have written a solution (to some of the easier puzzles), they tend to be long winded for not understanding the terminology and some of the simpler steps.

It might help those new to the game to have the terminology easily available on the tough site. - ie the board positions and the symbols used.

merry Christmas and thanks for the blog.... and your reliable puzzle solutions.

Steve  From Ohio    Supporting Member
Check out my page
Hi Fi!
Great to hear from you! I remember well some of the solutions that you posted.

Eventually, I will get around to explaining the more efficient and in most ways, better - language of forbidding chains. For better or worse, I have modified gb's usage of this language to one that is a bit more general.

The coded language used here has always been both an efficiency, and an obfuscation. It is my hope that the blog will eventually become a clearing house for deciphering the code.
JoshB  From USA
Hi Steve,

Did I miss a definition for squirmbags?
ang  From india
Hi Steve,
Thank you so much for the detailed explanation.I will keenly look forward to further posts on the blog page.
Meanwhile,wishing you a merry christmas and a happy 2007 !
Steve  From Ohio    Supporting Member
Check out my page
Thanks Josh!
I did omit the definition for that wonderful named entity. I have modified the page to correct that mistake.
oceans990  From San Francisco
Check out my page
Can someone please tell me why D1 and D2 cannot be '5's' in the example above?
22/Jan/12 9:33 AM
Please Log in to post a comment.

Not a member? Joining is quick and free. As a member you get heaps of benefits.

Join Now Login