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   

Why isn't this an XY-wing?

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

Joined: 11 Aug 2005
Posts: 12
:
Location: London, UK

Items
PostPosted: Wed Sep 28, 2005 4:16 pm    Post subject: Why isn't this an XY-wing? Reply with quote

Can someone explain why r7c1, r7c5 and r8c2 don't form an XY-wing allowing me to remove 2 from r8c3?

As far as I can tell, it seems to meet the definition given by Nick70 here.

i.e. (candidates in brackets)

r7c1 = a (xy)
r7c5 = b (yz)
r8c2 = c (xz)

Where x=7, y=8 and z=2.

Given that a and b share y (8), b and c share x (7), this means that x (2) should be able to be eliminated..., but it can't!.


Code:
 
.ss file

 *-----------*
 |...|...|198|
 |.1.|..7|...|
 |..3|...|25.|
 |---+---+---|
 |29.|.4.|6..|
 |...|9.6|...|
 |..8|.3.|.79|
 |---+---+---|
 |.45|...|9..|
 |...|6..|.4.|
 |631|...|...|
 *-----------*

I297
I384
I375
I451
I466
I363
I428
E40002
E67002
E68012
E71022
E12003
I514
I355
I407
I267
I198
E67009
E68019
I802
I798
I441
I343
I432
I166
I153
I174
I611
I713
I626
I026
I226
I671
E05005
E59002
Back to top
View user's profile Send private message Visit poster's website
Lummox JR

Joined: 07 Sep 2005
Posts: 202
:

Items
PostPosted: Wed Sep 28, 2005 7:13 pm    Post subject: Reply with quote

This isn't an XY-wing because the cell (3,8) does not lie on the intersection between the XZ cell in (2,8) and the YZ in (5,7). The only cells that share a house (block/column/row) with both XZ and YZ are (1-3,7) and (4-6,8). Of those, all are already set except (1,7) which is the XY cell, and (6,8) which has candidates 58--neither of which is Z.

The way XY-wing works is by saying that whichever candidate goes in the XY cell, it will cause either the XZ cell or the YZ cell to be Z, and so any cells which share a house with both XZ and YZ can have Z eliminated. (3,8) does not share anything with YZ, so if the XY cell is 8, thus making the YZ cell 2, that doesn't eliminate 2 from (3,8).

There is, however, an XY-wing with cells (5,7)=28, (6,8)=58, and (6,6)=25. Using (6,8) as the XY cell, you can see that no matter which candidate it has, either (5,7) or (6,6) will be a 2. Either one of those would eliminate 2 from (6,7), which has candidates 238. Since one of them must be true, (6,7)=38.

There's also another XY-wing with (5,1)=25, (5,7)=28, and (6,8)=58. Here (5,7) is the XY cell, and it causes either (5,1) or (6,8) to be 5. The cells where they intersect are (6,1-3) and (5,7-9). This eliminates 5 from (6,1) leaving 234 as candidates, and from (5,9) leaving only a naked 9.

After those two XY-wings, the puzzle breaks wide open.
Back to top
View user's profile Send private message
cf

Joined: 11 Aug 2005
Posts: 12
:
Location: London, UK

Items
PostPosted: Thu Sep 29, 2005 8:53 am    Post subject: Reply with quote

Great! Thanks. Smile

Can you offer any suggestions as to how to spot XY-Wings in the wild? In the example above I already knew that I was looking for XY-Wings, just not where they were, which makes the task (theoretically) a lot easier.
Back to top
View user's profile Send private message Visit poster's website
Ruud
Site Admin
Joined: 17 Sep 2005
Posts: 708
:
Location: Netherlands

Items
PostPosted: Thu Sep 29, 2005 11:22 pm    Post subject: Reply with quote

This is how me and my solver do it:

1. Check any cells with only 2 candidates.
2. Scan the row, column and box of that cell for other cells (peers) with only 2 candidates, one of them being either of the first cell's candidates.
(If the cell has the same candidates as the first cell, you have found a naked pair)
3. Designate the matching value X, the other value of the first cell Y, and the other value of the second cell Z.
4. Now look through the remaining peers of the first cell for a cell that only supports candidates Y and Z.
5. When all 3 cells are in the same house (row, column or box, you have found a naked triple (XYZ) and you can eliminate those candidates from the remaining cells in that house, otherwise, handle it as an XY-Wing.
6. Find the shared peers for the XZ and YZ cells. Eliminate Z from the candidates when present.

It's a lot of work, but with a bonus of 3 techniques in one scan.

There is an alternative solving your puzzle. When you only handle the second X-Wing mentioned by Lummox JR, there is an X-Wing in columns 1 and 5 (rows 1 and 2) for value 5, breaking the puzzle.
Back to top
View user's profile Send private message 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