Y wings


Coordinates are settled onto the grid,
now what, pray tell, are we to forbid?
'tis not easy quite for sure to say,
but with these wings we might flight them away.

Welcome! If this is your first visit to my blog, you may wish to read some of the other blog pages first. Links are to the right, along with publish date. The blog has been progressing through techniques relative to approximate difficulty.

Most places with tips, techniques, tricks about how to solve sudoku puzzles include not only what this blog has tackled up to this point, but also Y wings.

Nevertheless, in my opinion, most techniques are presented but narrowly. This page will not only introduce Y wings, also called xy wings, but also generalize the concept. Including Y wing style in your bag of solving tricks will help in tackling truly difficult puzzles. Furthermore, such inclusion will beg further generalization that will help to logically solve just about every sudoku puzzle.


Y wing as a triple


triple as ywing

Note the naked triple illustrated above forbids 1,2,3 from all the blue cells. This is not normally thought of as a Y wing, but rather as a triple.


Y wing example


First Ywing Example

In this example we have moved things around a bit. This is a standard Y wing configuration. Here, candidate 1 is forbidden from all the blue cells. Consider:

  • The vertex of the Y wing, cell h1, is limited to one of {2,3} Consider both of these possibilities:
    • h1=2 forbids e1=2, thus e1=1
    • h1=3 forbids i3=3, thus i3=1
  • Thus, at least one of the endpoints {e1,i3} of the Y wing must be 1
  • Conclude: Whether h1=2 or h1=3: d3,e3,f3,g1,i1 are not 1

In a proof, one might write this step as:

  • ywing at e1=12, h1=23, i3=13 forbids def3,gi1=1 OR
  • e1=1 == e1=2 -- h1=2 == h1=3 --i3=3 == i3=1 forbids def3,gi1=1
A previous blog page, Coloring, explains some of the forbidding chain lingo above.

The typical Ywing is formed by 3 cells limited to two values each. The endpoints of the Y determine what is excluded. The vertex of the Y must see the two endpoints. In every case, all the cells seen by these endpoints are the target for the exclusions.

Another Y wing example


Second Y wing example

The example above is precisely the same as the previous one, except but one cell is the target for potential eliminations. The cells seen by the Y wing endpoints,{e1,h4}, are only {e4,h1}. Since the vertex h1 of the Y wing is already empty of 1's, 1 can be excluded only from the cell e4.

Extensions of the Y wing idea


The following forbidding matrix exposes the logic of a typical Y wing:


cell x = r cell x = s  
  cell y = s cell y = t
cell z = r   cell z = t

To understand this forbidding matrix, consider:

  • The empty cells are FALSE
  • The entries in the filled cells are boolean variables - thus true or false
  • r,s,t are individual candidates - integers
  • Each row is a strong set. Meaning: There is at least one true item in each row
  • Each column, except the first column, is a weak set. Meaning: There is at most one true item in each of these last two columns
  • Therefor, the matrix contains at least three truths
  • Also, The last two columns contain no more than two truths
  • Finally, the first column must contain at least one truth
Clearly, all cells seen by both cell x and cell z cannot contain r.

A Y wing considers strength in cells to deduce strength in candidate location. This is a tad specific for my taste. Most techniques, tips, tricks about how to solve sudoku puzzles stop before they generalize ideas.

To extend the idea of a Y wing simply remove the restrictions. Instead, consider strength in any container - cell, box, column, row - to deduce strength in any container.

Y wing style is then any consideration of three strong sets that proves an elimination.

If you are paying attention, the restriction here of three is also artificial.

The following list examines all the previous techniques covered in this blog, relative to what they are looking at and what deductions they allow:

Unique Possibilities
Finds singular strengths in any container
Locked Candidates
Looks at strength in location of one type of candidate in one large container (row, column, box) to deduce strength of that candidate in location
Naked Pairs, Triples, Quads,...
Looks at strength of N candidates in N cells to deduce strength of those N candidates in N locations within a large container(s)
Hidden Pairs, Triples, Quads,...
Looks at strength of N candidates in N locations within a large container(s) to deduce strength of those N candidates in N cells
Xwings, Swordfish, Jellyfish, Squirmbags
Looks at strength of one type of candidate in N rows(location) to deduce strength of that candidate in N columns(location) OR vice versa
Unique Rectangles
Looks at potential symmetrical overlapping strength of candidates in location to deduce strength of any type
Coloring
Looks at strength of one type of candidate in location to deduce strength of that candidate in location
Y wings
Looks at strength of 3 cells containing exactly 2 candidates each. Considers 3 types of candidates. Deduces strength of one of those candidates in location
Y wing style
Looks at 3 native strengths of any type to deduce strength(s) of any type
Forbidding Chains
Looks at any number of strengths of any type to deduce strength(s) of any type
The last two items listed above, Y wing style and forbidding chains, have not yet been fully examined in this blog. Their power stems from their generalization. Techniques with fewer restrictions may be harder to use, but certainly are more powerful.

Stay tuned, as the next blog will examine the power of Y wing styles. The following tough puzzles can be solved using Y wings plus perhaps techniques covered in previous blog pages. If you get stuck, there should be cryptic proof(s) on the puzzle page.

Find information about me, Steve, at the first page of this blog and My Page at sudoku.com.au.




25 Comments
Indicate which comments you would like to be able to see

May the year 2{James Bond} be filled with joy, prosperity, and love for each and every being!


to 2007!

 |  |
Haven't had time to sit and concentrate on this, as yet. Thanks, you have made it sound much easier than I anticipated.

Happy New Year
 |  |
Okay, Steve, I've printed one of the tough puzzles you suggested; now I'll see if I can find the Y wing. Thanks for the blog! It's helpful.
 |  |

Thanks for your solutions I am still a little further back with the swordfish etc but it is helpful
 |  |
Wow! Happy New Year.
 |  |
Please confirm the last but one comment about the forbidding matrix:
'Also, The last two columns contain no more than two truths'
 |  |
Hi pChu!
I probably should have explained a bit better:

At any rate, when I wrote: in a typical Y wing, the vertex must 'see' the endpoints,
it means that cell y, the vertex here, shares a container with cellx and that it shares a container, perhaps a different one, with cell More...
 |  |
Dear Steve,
Thank you for your response. Yes, I can see that each of the last two columns can't have more than one truth. The 4th comment already clearly stated that. But that is why I asked, because it seems to say otherwise. Moreover, there are only 2 non-empty cells each in those columns!
 |  |
Happy New Year all

Steve, is there a simple way to put it so that I can figure out the endpoints and the vertex of a Y wing/ Sometimes I see what looks like it in a puzzle but it takes me a while to figure out which numbers to exclude where. I usually do the 'working out' like in your example, but I am sure there is a shorthand way to see what to exclude.
Thanks
 |  |
Hi pChu!

I am sorry that I was not clear enough in my explanation.

The idea of the forbidding matrix is to expose the logic behind the technique.

All the entries, except the empty cells, in the matrix are boolean variables that are either true or false.

The blank More...
 |  |
Hi Soozn!
Not sure there is an easier way than:
The vertex must 'see' the endpoints. The containers it sees them through will generally be at least two of {box,column, row} (unless it really was a triple as in first example)

I found Y wings very hard at first. It takes practice. More...
 |  |
I have edited the blog page to reflect some of my discussion with pChu.
Please, if you find something I have written unclear, let me know.
I am quite happy to fix my errors, omissions.
 |  |
One futher note:
Suppose something were to happen on the puzzle grid so that one of the two rightmost columns had no truths in it. Then the other rightmost column would have one truth, and the first left column would have two truths. In this case, we would still forbid exactly the same things, as we need only at least one truth in the first column.
 |  |
hmmm talking about the forbidding matrix, still, with my last comment. Will try hit submit slower in the future.

 |  |
Dear Steve,

A glitch in my mind forbade me in understanding the explanation. Sorry for making all the trouble. The explanation now comes out crystal clear. Thank you for your effort.

Happy new year.
 |  |
Happy New Year Steve, I'm working on the tough puzzle for 11/3 and eliminating numbers like a madwoman and although I don't usually see why it works, I can check and see that it does work. However I get to this point in the bottom three/left six rows:

3147 4714
2219 19 More...
 |  |
I see that the formatting didn't get through. The general question is that the y-wing doesn't seem work all the time. It seems that the vertex should be both of the two cells that complete a rectangle with the end-points. If one of the endpoints is in that cell, it can be eliminated. By that More...
 |  |
Hi Kate!
Not sure that I really understand your question:
But....
There can never by a Y wing formed by the cells b1,d2,d3 - since b1 does not 'see' d2 nor d3 meaning b1 does not share a container with d2 or d3.

Done properly, a Y wing always 'works'. It cannot fail:
More...
 |  |
Thanks, Steve. I understand that the cells that can be eliminated have to be in the same row, column or block as the two endpoints. My error was not realizing that the vertex also has to share a row, column or block with each of the endpoints.
 |  |
Hi Steve! I find your '5-bullet' analysis of the Y-wing example a little too heavy. The following argument seems to be a little more transparent.

The cell h1 (the VERTEX of the Y-wing) has two candidates 2 and 3; setting h1=2 forces e1=1, while setting h1=3 forces i3=1. In either case, one More...
 |  |
Excellent point andrei!

Thank-you for your suggestion.

I do tend to 'push' my explanations in one direction, when often a better approach is to use a center point of strength.

I may edit the presentation to reflect your idea.

 |  |
thanks steve! i just learned y wing from your example. very simple to understand from your illustration. thanks again
 |  |
hi im jessie and i am only thirteen and i have only just discovered how to actually play sudoku and if i could i would do it every second for the rest of my life.It is hard sometimes but it really gets your brain working!!!! luv ya all jess
 |  |
QUESTO SI PALLIACI !
 |  |
If you want to try out something new in sudoku, try shendoku, using the sudoku rules but playing two people, one against the other, like battleshipps. They have a free version to download at http://www.shendoku.com/sample.pdf . Anything else they are bringing out or they are working on you can find More...
24/Sep/07 7:53 AM
 |  |
Please Log in to post a comment.

Not a member? Joining is quick and free.
As a member you get heaps of benefits.
Click Here to join.
You can also try the Chatroom (No one chatting right now - why not start something? )
Check out the Sudoku Blog     Subscribe
Members Get Goodies!
Become a member and get heaps of stuff, including: stand-alone sudoku game, online solving tools, save your times, smilies and more!
Previous Entries

07/Jan/07 Ywing Styles
06/Jan/07 Definitions
31/Dec/06 Y wings
27/Dec/06 Coloring
11/Dec/06 Beginner Tips
Check out all the Daily Horoscopes
Welcome our latest Members
bellsamaze from lenexa
Pinehill from Ny
Nancy from California
Member's Birthdays Today
win from Myanmar, Dottie R from Cleveland, OH suburb
Friends currently online
Want to see when your friends are online? Become a member for free.

Network Sites

Melbourne Bars Find the Hidden Bars of Melbourne
Free Crossword Puzzles Play online or print them out. 2 new crosswords daily.
Jigsaw Puzzles Play online jigsaw puzzles for free, with new pictures everyday
Sliding Puzzle Play online with your own photos
Flickr Sudoku Play sudoku with pictures from Flickr
Kakuro Play Kakuro online!
Wordoku Free Wordoku puzzles everyday.
Purely Facts Test your General Knowledge.
Pumpkin Carving Pattern Free halloween pumpkin carving patterns.