Sudoku Programmers Forum Index

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log inLog in          Games  Calendar

Log in to check your private messagesLog in to check your private messages   

Rare new technique: XYZ-wing

 
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Solving sudoku
View previous topic :: View next topic  
Author Message
Lummox JR

Joined: 07 Sep 2005
Posts: 202
:

Items
PostPosted: Thu Sep 22, 2005 5:29 am    Post subject: Rare new technique: XYZ-wing Reply with quote

Today I implemented XY-wing in my solver. I was pondering it and realized that there's actually a special case where XY-wing would not apply, but the same principle can make some of the same eliminations.

This case is quite rare. It will occur when you have cells with candidates XZ, XYZ, and YZ; they must have no others. XZ and XYZ must appear in the same box, and XYZ and YZ must share a column or row. When this occurs, Z can be eliminated from two cells in the XZ/XYZ box.
Code:
 *  XYZ  *   | .   YZ  .
 .   .   .   | .   .   .
XZ   .   .   | .   .   .

The logic is similar to XY-wing: If the XYZ cell is an X or Y, one of the other two will be a Z, which means that the two cells represented by asterisks can't be Z. If the XYZ cell is Z, those two asterisked cells still can't be Z. So even though this doesn't fit the classic XY-wing pattern, you can still make eliminations. Note why the same-box constraint is necessary here: There has to be some set of cells that shares a common house with each of the three cells in the pattern.

I haven't yet found a puzzle to use this on, but it's bound to come up eventually.
Back to top
View user's profile Send private message
Ruud
Site Admin
Joined: 17 Sep 2005
Posts: 708
:
Location: Netherlands

Items
PostPosted: Thu Sep 22, 2005 6:32 pm    Post subject: Reply with quote

I made a sample puzzle for the XYZ-Wing (it contains one in box 1)
with X=1, Y=2, Z=3

Code:
...|..7|...
.46|..1|..9
...|89.|.2.
---+---+---
.5.|.4.|6..
2..|.59|...
.8.|...|24.
---+---+---
5..|.6.|...
7.2|...|...
...|..2|.7.

However, it can also be solved without using the XYZ-wing. This is because you need a lot of clues to construct it.

I wonder if it is possible to create an XYZ-wing with lesser clues, cutting of other solving techniques.

Anyway, the theory is correct. You cannot fill cells (1,1) or (1,3) with 3.
Back to top
View user's profile Send private message Visit poster's website
Lummox JR

Joined: 07 Sep 2005
Posts: 202
:

Items
PostPosted: Thu Sep 22, 2005 7:39 pm    Post subject: Reply with quote

Most of the cases I've found where even XY-wing is available, another technique will do just as well. One puzzle I've tested a lot of my algorithms on cracks wide open if you use remote pairs, but otherwise you can do either coloring or fishy cycles and then follow up with an XY.

I suspect that finding a puzzle for this is quite rare. Most of this territory seems to be. I noticed remote pairs, XY-wing, XYZ-wing, and the uniqueness test (which are all constructed similarly) seem to have that trait in common. They don't typically appear in most puzzles, but when they do they can be a huge help.
Back to top
View user's profile Send private message
Lummox JR

Joined: 07 Sep 2005
Posts: 202
:

Items
PostPosted: Fri Sep 23, 2005 2:21 am    Post subject: Reply with quote

Well foo, I just found out this technique isn't new after all. Someone else already discovered it and gave it the same name. And it turns out his technique is a lot more robust: It is allowable for the XYZ and XZ cells to share a row or column. Observe:
Code:
 *  XYZ  *   | .   YZ  .
 .   .   .   | .   .   .
 .  XZ   .   | .   .   .

No matter what the value in the XYZ cell, those other two cells can't be Z.

Well, this is a good thing. It extends the value of the technique well past where I thought it was. I just thought I'd discovered something new there, and it turns out I'm well over a month behind on it.
Back to top
View user's profile Send private message
Lummox JR

Joined: 07 Sep 2005
Posts: 202
:

Items
PostPosted: Fri Sep 23, 2005 9:29 pm    Post subject: Reply with quote

Well, this one may not be my discovery, but at least I got in a nice solver algorithm for it. My solver was not only able to solve this technique, but identify a puzzle with one. Here's a puzzle that near the end stalls on other techniques (except obviously forcing chains).
Code:
. . 9|. . 6|. . .
. . 4|7 . .|. . .
6 . .|3 . 4|. . .
-----------------
. . .|. . .|1 . 3
. 9 .|. . .|4 . 5
. 2 8|. 4 .|. . .
-----------------
. 1 .|6 . .|8 . .
. . .|2 . 3|. . .
. 5 3|. . .|9 . .
Back to top
View user's profile Send private message
Bob Hanson

Joined: 05 Oct 2005
Posts: 187
:
Location: St. Olaf College

Items
PostPosted: Mon Oct 24, 2005 3:53 pm    Post subject: Reply with quote

This is an interesting find. In the parlance of Medusa chains, you have:

a) two strong chains (XZ and YZ)
b) multiple weak corners connecting these chains (* and XYZ) via Z.
c) one weak corner that can "force" the others to be NOT Z when it is NOT Z.

As you point out, this is because when the weak corner XYZ cell is NOT Z, then it must be either X or Y, which forces one or the other chains to NOT be X or Y. Thus, one of the chains MUST be Z.

Usually, weak corners in the NOT state can't influence the state of the associated chains, but here we can. Super!

I've added this as checkWeakCorners() in my Sudoku Assistant

http://www.stolaf.edu/people/hansonr/sudoku

To see it, you have to enable "Full" Medusa -- because I've added it as a weak field check.

This does advance the solution of two of top95s. Here's an example:

http://www.stolaf.edu/people/hansonr/sudoku?,-3,-2tt-5,-8,-5,,-3t-9t-9,-6,-4,-2,-8,-5,-3,-7,-1t,-4t,-3,-9t,-6t,-5tt-1t,,-4,-2t,-6,-7,,-8tt-4,-5t,-9,-5t,,-6

or

.32 ... ..5
85. 3.. 9..
964 285 371
... 4.. .39
... 6.. .5.
... .1. ...
42. ..6 7.8
... ..4 5..
.95 ... .6.

but it doesn't provide the key to solve them.

To see the action, first try to SOLVE this puzzle only to the "strong+weak" level, then click "full" and STEP once. You will see that a 1 in row 8, column 1, can be eliminated because Chains 1 and 12 interact in this way. Z=1, X=7, Y=4. The "XYZ" cell is row 9, column 1.

A screen dump is at

http://www.stolaf.edu/people/hansonr/sudoku/xyz-wing.jpg
_________________
Bob Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr
Back to top
View user's profile Send private message Send e-mail Visit poster's website
noeldillabough

Joined: 12 Oct 2005
Posts: 16
:

Items
PostPosted: Mon Oct 24, 2005 9:22 pm    Post subject: Reply with quote

I was in the process of adding uniqueness testing to my solver using this example:

Code:

.69|143|8..
..7|9..|..4
4..|7..|.9.
---+---+---
9..|857|361
7..|216|945
615|394|..8
---+---+---
.7.|589|4..
8..|671|5..
...|432|.8.


which becomes

Code:

.69|143|8..
..7|9..|..4
4..|7..|.9.
---+---+---
9..|857|361
7..|216|945
615|394|..8
---+---+---
.7.|589|41.
8..|671|5..
...|432|.8.


after the forced move. Now supposedly there is an XYZ-Wing, however I haven't spotted it yet (I haven't really looked but I'll get to that soon enough).

Anyway I've noticed after looking it up that there are a few forms of XYZ-Wing out there, are they always in the

Code:

XZ <--> XYZ <--> YZ

pattern?
Back to top
View user's profile Send private message
Ruud
Site Admin
Joined: 17 Sep 2005
Posts: 708
:
Location: Netherlands

Items
PostPosted: Mon Oct 24, 2005 9:42 pm    Post subject: Reply with quote

This is the definition MadOverlord gave on the players forum:

Quote:
When a cell with candidates XYZ has 2 buddies (peers) with candidates XZ and YZ, Z can be removed as a candidate from any cell that has all 3 of these cells as a buddy.

This definition pretty much covers it, but you should be aware that when the XYZ, XZ and YZ are all in the same house, they also form a naked triple, so your solver would already have wiped the Z candidate from any cell affected by this technique.

As far as I can see, the only possible configuration is XYZ sharing a box with XZ and sharing a row or column with YZ.

Ruud
Back to top
View user's profile Send private message Visit poster's website
Bob Hanson

Joined: 05 Oct 2005
Posts: 187
:
Location: St. Olaf College

Items
PostPosted: Mon Oct 24, 2005 10:09 pm    Post subject: Reply with quote

Maybe, but I don't see it.

http://www.stolaf.edu/people/hansonr/sudoku/index.htm?,-6,-9,-1,-4,-3,-8,,7t-7,-9t,,-4,-4t-7t,-9,,-9t-8,-5,-7,-3,-6,-1,-7t-2,-1,-6,-9,-4,-5,-6,-1,-5,-3,-9,-4,2,7,-8,,-7,,-5,-8,-9,-4,1,,-8t-6,-7,-1,-5tt-4,-3,-2,7,-8

solves this without need for XYZ-wing analysis. It's finding weak corners that it can eliminate because they are connected to weakly-linked strong chains. Chain 1 in this case is huge. (Check the 3D.)

Here's what I read:

9 weak links
97 weak corners
r8c2 ISN'T 3: weak 0/0 corner between linked 1/1 strong chains 1 and 3
r7c3 ISN'T 2: weak 1/0 corner between linked 0/1 strong chains 1 and 4
r8c9 ISN'T 3: weak 1/0 corner between linked 0/1 strong chains 1 and 6
r8c3 ISN'T 3: weak 0/0 corner between linked 1/1 strong chains 3 and 4

These are just corners that can't be the stated candidates no matter what parity their associated strong chains have.

A bit like a XYZ-wing, but really a different idea -- the chains themselves are directly eliminating the corner's possibility. This is basically like "puzzle x-2", third cycle, at
http://www.research.att.com/~gsf/sudoku/, although the chains here are combinations of X-like and Y-like strong edges.

The XYZ-wing thing is the situation of a weak corner NOT being the connecting candidate value forcing the chain itself to also require elimination of that value. I saw just those two examples in top95.
_________________
Bob Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Solving sudoku All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Sudoku Programmers topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group

Igloo Theme Version 1.0 :: Created By: Andrew Charron