New method – X-Box (X-Wing box interaction)

Advanced methods and approaches for solving Sudoku puzzles

Postby Bob Hanson » Tue Dec 06, 2005 6:39 pm

agreed. and an X-wing can be the easiest thing to find if you know what you are looking for. I think I was responding to Ruud, who requested "with singles, locked candidates and subsets only, because my solver requires at least coloring to go beyond the first stage." Something's odd there. Ruud's solver is very good.

Oh, Ruud, I see it. I put your configuration into Sudoku Assistant and ran it one step. Somehow your solver is missing a simple hidden 25 pair in column 9. Hmm. Wonder why?
Bob Hanson
 
Posts: 75
Joined: 04 December 2005

Postby Ruud » Tue Dec 06, 2005 7:30 pm

Bob wrote:Somehow your solver is missing a simple hidden 25 pair in column 9. Hmm. Wonder why?

I am no longer wondering why.

When I optimized the code, a very sneaky error crept in. Only affected subsets in columns, not rows and boxes.

I am very glad I found (and fixed) it. It teaches us never to stop testing our programs.

Ruud.
Ruud
 
Posts: 664
Joined: 28 October 2005

re: new method - "X-Box"

Postby Pat » Thu Dec 08, 2005 5:02 pm

Morgoth wrote:I tried to solve this.
Code: Select all
 . . . | 5 . 3 | 6 . 1
 . . . | . 4 . | . . .
 . 8 . | . 1 . | . . 9
-------+-------+------
 . . 9 | 2 3 . | 7 . .
 8 . . | . . . | . . 6
 . . 2 | . 6 1 | 5 . .
-------+-------+------
 5 . . | . 2 . | . 3 .
 . . . | . 5 . | . . .
 1 . 4 | 7 . 6 | . . .

After several pairs and X-wings,
it was still incomplete
and there was nothing to do with the standard methods.

So I found a new X structure.
It has 2 crossing lines with only 2 possibilities for one digit and one of them is in the crossroad.
If you try to make a square, the new lines is crossing in one box,
and if the only possibilities for the searching digit in this box lies on one of the lines, so the first cross is known.

here is an example (from the upper sudoku):
Code: Select all
{  }, {}, {}, {   }, {248 }, {}
{89}, {}, {}, {238}, {2578}, {}
{  }, {}, {}, {   }, {    }, {}
{  }, {}, {}, {   }, {    }, {}
{  }, {}, {}, {   }, {    }, {}
{89}, {}, {}, {   }, {89  }, {}


The first crossway is between the first left column and the lowest row. There are no other possible places for 8 in these lines.
The second crossway is in the up right box where 8 is not present. For this box, only possible places for 8 lies on the second crossway and one of them must be 8. Nevertheless where is the exact place of 8 in the box, the low left corner must be 8 too, otherwise the top left and the low right will be 8, so there is no place for 8 in the up right box.

Have I invent something or I have found the hot water?

Ruud wrote:Can you tell me how you got from here:
Code: Select all
249  249  7   | 5    89   3   | 6    248  1
2369 156  135 | 89   4    27  | 238  2578 2358
234  8    35  | 6    1    27  | 234  2457 9
--------------+---------------+--------------
46   156  9   | 2    3    58  | 7    148  48
8    15   135 | 49   7    59  | 2349 1249 6
347  47   2   | 489  6    1   | 5    489  348
--------------+---------------+--------------
5    79   6   | 1    2    489 | 489  3    478
279  279  8   | 3    5    49  | 1    6    47
1    3    4   | 7    89   6   | 289  2589 258
to here:
Code: Select all
249  249  7    | 5    89   3    | 6    248  1
239  6    1    | 89   4    27   | 238  2578 25
234  8    5    | 6    1    27   | 234  247  9
---------------+----------------+--------------
6    15   9    | 2    3    58   | 7    14   48
8    15   3    | 4    7    59   | 29   129  6
47   47   2    | 89   6    1    | 5    89   3
---------------+----------------+--------------
5    79   6    | 1    2    489  | 49   3    478
279  279  8    | 3    5    49   | 1    6    47
1    3    4    | 7    89   6    | 289  2589 25
because my solver requires at least coloring to go beyond the first stage.

Morgoth wrote:9:2 -3 Hidden Pair with 9:9
9:6 3 One in column
3:5 3 One in row
3:3 5 Only one
3:2 1 Only one
4:6 -4 Naked Pair 1:6; 2:6
4:5 4 One in column
8:6 -4 Naked Pair 1:6; 2:6
1:4 -4 Naked Pair 1:6; 2:6
1:4 6 Only one
2:2 6 One in column
2:4 -4 Naked Pair 1:6; 2:6
9:2 -8 Hidden Pair with 9:9
9:9 -8 Hidden Pair with 9:2
8:4 -8 X-Wing 6:4; 6:7; 9:4; 9:7
7:7 -8 X-Wing 6:4; 6:7; 9:4; 9:7


Jeff wrote:in this case, the assignment of not-8 in r6c4 forces the 8 to vanish in box 3:
  • r6c4 8 r2c4 = 8 r2r7 8 and r2r8 8
  • r6c4 8 r6r8 = 8 r1r8 8 and r2r8 8
contradiction: no 8 in box 3;
therefore, r6c4 = 8



hi all,
i suppose you can skip over my somewhat-excessive quotations---


i'm just wondering if this is an example of Nishio's method?
probably obvious to you experts, but i'd like it clarified, being very much a non-expert.



i remember a very similar example - tso (2005.Sep.19):
Code: Select all
 . . . | 5 2 . | . . .
 . 9 . | . . 3 | . . 4
 . . . | . . . | 7 . .
-------+-------+------
 . 1 . | . . . | . 4 .
 . 8 . | . 4 5 | 3 . 1
 6 . 4 | . 1 . | . . 8
-------+-------+------
 7 . 2 | . . . | . . .
 1 . 8 | . . . | . 3 2
 . 4 . | . 8 . | . 1 7


- Pat
User avatar
Pat
 
Posts: 4056
Joined: 18 July 2005

Postby rubylips » Thu Dec 08, 2005 8:47 pm

Yes, it is an example of Nishio. In the following position:

Code: Select all
  2|4|9  2|4|9  7 |    5  8|9      3 |      6    2|4|8      1
  2|3|9      6  1 |  8|9    4    2|7 |  2|3|8  2|5|7|8    2|5
  2|3|4      8  5 |    6    1    2|7 |  2|3|4    2|4|7      9
------------------+------------------+-----------------------
      6    1|5  9 |    2    3    5|8 |      7    1|4|8    4|8
      8    1|5  3 |    4    7    5|9 |    2|9    1|2|9      6
    4|7    4|7  2 |  8|9    6      1 |      5      8|9      3
------------------+------------------+-----------------------
      5    7|9  6 |    1    2  4|8|9 |  4|8|9        3  4|7|8
  2|7|9  2|7|9  8 |    3    5    4|9 |      1        6    4|7
      1      3  4 |    7  8|9      6 |  2|8|9  2|5|8|9    2|5

  .  .  . |  .  ?  . |  .  ?  .
  .  .  . |  ?  .  . |  ?  ?  .
  .  8  . |  .  .  . |  .  .  .
----------+----------+---------
  .  .  . |  .  .  ? |  .  ?  ?
  8  .  . |  .  .  . |  .  .  .
  .  .  . |  ?  .  . |  .  ?  .
----------+----------+---------
  .  .  . |  .  .  ? |  ?  .  ?
  .  .  8 |  .  .  . |  .  .  .
  .  .  . |  .  ?  . |  ?  ?  .

we have:

Code: Select all
The move r1c8:=8 would make it impossible to place the remaining 8s.
- The move r1c8:=8 has been eliminated.
The cell r1c5 is the only candidate for the value 8 in Row 1.
rubylips
 
Posts: 149
Joined: 01 November 2005

Postby masb » Thu Dec 08, 2005 9:46 pm

http://www.axcis.com.au/numbler came up with a solution that just needs an X-Wing and an XY-Wing, as follows:

Code: Select all
Single r1c3=7 r3c4=6
Single Row r9c2=3
Single Row r8c4=3
Single Column r7c4=1 r5c5=7 r8c8=6
Single r8c3=8
Single r7c3=6
Single Row r8c7=1
Pair Box @ r1c5 r2c4> r2c6x8 r2c6x9
Box Row @ 7> r8c9x2
Box Column @ 8 9> r4c6x4 r5c6x4 r2c9x7
Triple Column r2c9x8 r6c9=3 r9c9x8
Single Row r5c3=3
Single r3c3=5
Single r2c3=1
Pair Row @ r6c1 r6c2> r6c4x4 r6c8x4
Single Column r5c4=4
Pair Box @ r6c1 r6c2> r4c1=6 r4c2x4
Single Row r2c2=6
XWing @ r4c6 r4c9 r7c6 r7c9> r4c8x8 r7c7x8
XYWing @ r4c6 r5c6 r6c4> r5c7=2 r5c8=1 r7c6x9 r8c6=4


After this it can be solved with singles. In the above "x" means remove a candidate and "=" means set a cell.
masb
 
Posts: 16
Joined: 17 November 2005

Previous

Return to Advanced solving techniques