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   

12, 1X, 1Y, XY Pattern

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

Joined: 24 Jun 2005
Posts: 2
:

Items
PostPosted: Fri Jun 24, 2005 11:34 am    Post subject: 12, 1X, 1Y, XY Pattern Reply with quote

Doing one of the Telegraph puzzles the other day I noticed the following pattern of possible values for a set of 4 squares which formed an x-wing like arrangement.

Top Left: could be 1 or 2
Top Right: could be 1 or X
Bottom Left: Could be 1 or Y
Bottom Right: Could be X or Y

From this we can conclude that the Top Left must be a 2.

Does this fall under an X-Wing classification?
_________________
Mat
Back to top
View user's profile Send private message
coconut

Joined: 13 May 2005
Posts: 12
:
Location: Oxford

Items
PostPosted: Fri Jun 24, 2005 3:04 pm    Post subject: Reply with quote

Perhaps, this new pattern should be called the xy-wings.

Coconut
Back to top
View user's profile Send private message
Animator

Joined: 26 Apr 2005
Posts: 18
:

Items
PostPosted: Sun Jun 26, 2005 12:53 pm    Post subject: Reply with quote

Can you post the entire grid?
Back to top
View user's profile Send private message
coconut

Joined: 13 May 2005
Posts: 12
:
Location: Oxford

Items
PostPosted: Sun Jun 26, 2005 2:11 pm    Post subject: Reply with quote

What is the number, date and the level of this Telegraph puzzle?
Back to top
View user's profile Send private message
MatNewman

Joined: 24 Jun 2005
Posts: 2
:

Items
PostPosted: Mon Jun 27, 2005 10:20 am    Post subject: Reply with quote

Sadly I don't have the entire grid (I did the puzzle on a plane). It was from 13th or 14th June.
_________________
Mat
Back to top
View user's profile Send private message
MadOverlord

Joined: 01 Jun 2005
Posts: 80
:
Location: Wilmington, NC, USA

Items
PostPosted: Mon Jul 11, 2005 1:53 am    Post subject: Reply with quote

I ran all the Telegraph puzzles around those dates through the Sudoku Susser to see if I could get the pattern, but since so much depends on the order in which you solve squares, that doesn't say much.

However, since none of those puzzles needed more than basic techniques to solve, this observation is likely a subset of existing techniques.

In order to determine that for sure, we need an exemplar puzzle that has everything solved except the squares in question and any other squares that must be unsolved for the puzzle to be valid (ie: in the top row, if you have a square 12 and a square 1X you also need at least a square X2 to form a locket triplet. Ditto on the other row and 2 columns.
Back to top
View user's profile Send private message Visit poster's website AIM Address
Nick70

Joined: 08 Jun 2005
Posts: 160
:

Items
PostPosted: Mon Jul 11, 2005 7:02 am    Post subject: Reply with quote

MadOverlord wrote:
However, since none of those puzzles needed more than basic techniques to solve, this observation is likely a subset of existing techniques.


Well it's of course a subset of double forcing chains.
But it's a nice one - I was going to study it after the Turbot Fish.

Here is an example problem that can be solved using this technique.

Code:
..6.8.1.5
.316.....
2........
.....5...
..7.1.9..
...4.....
........8
.....742.
8.5.9.6..
Back to top
View user's profile Send private message
MadOverlord

Joined: 01 Jun 2005
Posts: 80
:
Location: Wilmington, NC, USA

Items
PostPosted: Mon Jul 11, 2005 10:40 am    Post subject: Reply with quote

It would be very helpful if you showed us the puzzle in the state it reached just before you applied the technique, and identified the cells involved. I stepped through the solution of the above and didn't see the pattern (again, because the order of operations is crucial).

Best,R
Back to top
View user's profile Send private message Visit poster's website AIM Address
Nick70

Joined: 08 Jun 2005
Posts: 160
:

Items
PostPosted: Mon Jul 11, 2005 10:58 am    Post subject: Reply with quote

MadOverlord wrote:
It would be very helpful if you showed us the puzzle in the state it reached just before you applied the technique, and identified the cells involved. I stepped through the solution of the above and didn't see the pattern (again, because the order of operations is crucial).


That's strange. It means that you have used some other advanced technique (like forcing chains), because there shouldn't be any simpler way to get past this position:

Code:
4     7     6      | 9     8     2      | 1     3     5     
5     3     1      | 6     7     4      | 28    89    29   
2     89    89     | 5     3     1      | 7     46    46   
-------------------+--------------------+-------------------
9     128   4      | 7     26    5      | 238   168   1236 
6     25    7      | 3     1     8      | 9     45    24   
3     1258  28     | 4     26    9      | 258   15678 1267 
-------------------+--------------------+-------------------
7     29    239    | 1     4     6      | 35    59    8     
1     6     39     | 8     5     7      | 4     2     39   
8     4     5      | 2     9     3      | 6     17    17   


The pattern is in cells (5,2) (5,8) (7,2) (7,8). (5,8) is forced to be 4.
Back to top
View user's profile Send private message
MadOverlord

Joined: 01 Jun 2005
Posts: 80
:
Location: Wilmington, NC, USA

Items
PostPosted: Mon Jul 11, 2005 11:49 am    Post subject: Reply with quote

You are correct that advanced techniques (in this case, Bowman Bingo) are required to solve the puzzle without using your technique. I should have made that more clear.

As such, it may be a useful special-case heuristic to add to the arsenal because it's easy for humans to recognize.

Also note that it's possible to have this configuration where 1 or 2 of the edges are blocks.

For convenience, I've listed the puzzle without the possiblities (this makes it easier to import into my susser app). Here's the solution log using Bowman Bingo. Note that it finds the same reduction that you did.

Code:

+-------+-------+-------+
| 4 7 6 | 9 8 2 | 1 3 5 |
| 5 3 1 | 6 7 4 | . . . |
| 2 . . | 5 3 1 | 7 . . |
+-------+-------+-------+
| 9 . 4 | 7 . 5 | . . . |
| 6 . 7 | 3 1 8 | 9 . . |
| 3 . . | 4 . 9 | . . . |
+-------+-------+-------+
| 7 . . | 1 4 6 | . . 8 |
| 1 6 . | 8 5 7 | 4 2 . |
| 8 4 5 | 2 9 3 | 6 . . |
+-------+-------+-------+

Deduction pass 1; 52 squares solved; 29 remaining.

* 2 squares in row 3 form a simple locked pair.  R3C2 and R3C3 share possibilities <89>.  Thus, these possibilities can be removed from the rest of the row.

   R3C8 - removing <89> from <4689> leaving <46>.
   R3C9 - removing <9> from <469> leaving <46>.

Deduction pass 2; 52 squares solved; 29 remaining.

* Found a contradiction by Bowman Bingo.  After 2 cycles, it became clear that R5C8 could not be a <5>, because this would force both R7C8 and R7C2 to be <9>.  As they are in the same row, this is a contradiction.

   R5C8 - removing <5> from <45> leaving <4>.

  Here is a trace of the Bowman matrix as it developed.

   X = the current square (also an "C").
   C = squares with chips on them.
   . = squares that can still have more than one value.

  Bowman cycle 1:

   4 7 6 9 8 2 1 3 5
   5 3 1 6 7 4 . . .
   2 . . 5 3 1 7 . .
   9 . 4 7 . 5 . . .
   6 . 7 3 1 8 9 X .
   3 . . 4 . 9 . . .
   7 . . 1 4 6 . . 8
   1 6 . 8 5 7 4 2 .
   8 4 5 2 9 3 6 . .

  Flipped chip at R5C8 setting its value to <5>.

   Placed a <2> chip on R5C2 (forced).
   Placed a <9> chip on R7C8 (forced).
   Placed a <4> chip on R5C9 (pinned).
   Placed a <4> chip on R3C8 (pinned).

  Bowman cycle 2:

   4 7 6 9 8 2 1 3 5
   5 3 1 6 7 4 . . .
   2 . . 5 3 1 7 C .
   9 . 4 7 . 5 . . .
   6 X 7 3 1 8 9 5 C
   3 . . 4 . 9 . . .
   7 . . 1 4 6 . C 8
   1 6 . 8 5 7 4 2 .
   8 4 5 2 9 3 6 . .

  Flipped chip at R5C2 setting its value to <2>.

   Placed a <9> chip on R7C2 (forced).
   Placed a <8> chip on R6C3 (forced).
   Placed a <5> chip on R6C2 (pinned).

  Final state:

   4 7 6 9 8 2 1 3 5
   5 3 1 6 7 4 . . .
   2 . . 5 3 1 7 . .
   9 . 4 7 . 5 . . .
   6 2 7 3 1 8 9 5 4
   3 . 8 4 . 9 . . .
   7 9 . 1 4 6 . 9 8
   1 6 . 8 5 7 4 2 .
   8 4 5 2 9 3 6 . .

  Both R7C8 and R7C2 are <9>.

From this deduction, the following moves are immediately forced:

   R5C9 must be <2>.
   R3C8 must be <6>.
   R5C2 must be <5>.
   R2C9 must be <9>.
   R2C8 must be <8>.
   R8C9 must be <3>.
   R3C9 must be <4>.
   R8C3 must be <9>.
   R7C7 must be <5>.
   R2C7 must be <2>.
   R4C8 must be <1>.
   R4C9 must be <6>.
   R9C8 must be <7>.
   R4C5 must be <2>.
   R6C9 must be <7>.
   R6C8 must be <5>.
   R9C9 must be <1>.
   R7C8 must be <9>.
   R6C7 must be <8>.
   R7C2 must be <2>.
   R3C3 must be <8>.
   R3C2 must be <9>.
   R6C3 must be <2>.
   R4C2 must be <8>.
   R6C5 must be <6>.
   R7C3 must be <3>.
   R6C2 must be <1>.
   R4C7 must be <3>.

Deduction pass 3; 81 squares solved; 0 remaining.

Solution found!

Deduction completed...
Back to top
View user's profile Send private message Visit poster's website AIM Address
gaby

Joined: 02 Jul 2005
Posts: 120
:

Items
PostPosted: Wed Aug 17, 2005 11:43 am    Post subject: Reply with quote

Reading a little more about this, I got an implementation working for XY-wing (which I refer to as Y-wing, for simplicity, and I realise now is a short forcing chain).

Also, reading in simes site:

http://www.simes.clara.co.uk/programs/sudokutechnique11.htm

In the section about 'other possible combinations', I am thinking about other possible eliminations of candidates in the y-wing pattern. If the XY cell has the two linked cells XZ and YZ:

XZ = {r1,c1,b1}
YZ = {r5,c5,b5}

Can I legitimately remove Z from the intersections of:

r1 and c5
c1 and r5
r1 and b5
c1 and b5
r5 and b1
c5 and b1

Being that the cells that are found are in each of those houses, and we can remove Z from the intersections of those houses (except the actual XY, XZ and YZ cells themselves)? In some instances these intersections will produce no cells, but this increases the number of intersections, and possibly candidate removals as a result.
_________________
Free daily sudoku - Online puzzle database
http://vanhegan.net/sudoku/
Back to top
View user's profile Send private message Visit poster's website
Nick70

Joined: 08 Jun 2005
Posts: 160
:

Items
PostPosted: Thu Aug 18, 2005 8:09 am    Post subject: Reply with quote

gaby wrote:
Can I legitimately remove Z from the intersections of:

Yes, this isn't different from what Simes says in his page unless I misunderstood something.

You might also find interesting this description of generalized triplets, of which xy-wing is a special case.
Back to top
View user's profile Send private message
Dave

Joined: 12 Jul 2006
Posts: 2
:
Location: Spokane, WA

Items
PostPosted: Wed Jul 12, 2006 11:19 pm    Post subject: Reply with quote

The puzzle here is broken open with a simple XY-Wing.

The three linked cells with (possible solutions) are R5C2 (2,5), R7C2 (2,9), and R7C8 (5,9). The intersection of the first row and third is R5C8 (4,5). The common element in these are 5, so it can be removed from this cell, leaving 4.

This is the same answer as the Bowman Bingo, but may be easier for manual search.
Back to top
View user's profile Send private message
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