x-wing

Advanced methods and approaches for solving Sudoku puzzles

Postby whohe » Mon May 30, 2005 11:38 pm

Animator wrote:'X-Wing' refers to a certain technique which you might need to solve the Very hard puzzles generated by the program...

There are several intresting posts about it on this forum... this is one of yesterday: http://forum.enjoysudoku.com/viewtopic.php?t=300


Hi simes. Nice site, which will no doubt help many, but...

A few questions regarding your techniques pages.

1. This "x-wing" business. Surely an "x-wing" is the exact same thing as your example 4 (Reducing Candidates part 2)? From a purely logical perspective, I can't see what the difference is - in both cases, the potential placing a number in one cell forces the placing of the same number in an alternative cell, and vice versa, thus eliminating the possibility of that number going in certain other cells.

2. Reducing Candidates part 4. Is there a typo or two on this page?

For example, consider a block that has the following candidates:

{4, 5, 6, 9}, {4, 9}, {5, 6, 9}, {2, 4}, {1, 2, 3, 4, 7}, {1, 2, 3, 7}, {2, 5, 6}, {1, 2, 7}, {8}

(The single {8} indicates that this cell already holds the value 8.) You can see that there are only three cells that have the candidates 1, 3 and 7.


I count 2.

In this example, we're left with:

{4, 5, 6, 9}, {4, 9}, {5, 6, 9}, {2, 4}, {1, 3, 7}, {1, 3, 7}, {2, 5, 6}, {1, 7}, {8}

How?

Should this be -
Candidates before:

{4, 5, 6, 9}, {4, 9}, {5, 6, 9}, {2, 4}, {1, 2, 3, 4, 7}, {1, 2, 3, 7}, {2, 5, 6}, {1, 3, 7}, {8}

Candidates after:

{4, 5, 6, 9}, {4, 9}, {5, 6, 9}, {2, 4}, {1, 3, 7}, {1, 3, 7}, {2, 5, 6}, {1, 3, 7}, {8}

?

3. Swordfish. I don't get this at all. In the second diagram, are you implying that the highlighted cells are the only possibilities for the placement of a 1 in the relevant row/column/block, or that we can ignore all other possibilities because of the "swordfish"?
whohe
 
Posts: 32
Joined: 28 May 2005

Postby goldie5218 » Tue May 31, 2005 6:49 am

hey thanks soooo much whohe! i wanted to raise the same queries but being a new sudoku fan was scared to do so but i really battled to make sense of the original examples - waiting eagerly for a reply to your comments cheers
goldie5218
 
Posts: 37
Joined: 27 May 2005

Postby Animator » Tue May 31, 2005 9:32 am

whohe wrote:1. This "x-wing" business. Surely an "x-wing" is the exact same thing as your example 4 (Reducing Candidates part 2)? From a purely logical perspective, I can't see what the difference is - in both cases, the potential placing a number in one cell forces the placing of the same number in an alternative cell, and vice versa, thus eliminating the possibility of that number going in certain other cells.


Basiccly yes, but try looking at one of the X-wing examples... then you might have a different opinion...


whohe wrote:2. Reducing Candidates part 4. Is there a typo or two on this page?

For example, consider a block that has the following candidates:

{4, 5, 6, 9}, {4, 9}, {5, 6, 9}, {2, 4}, {1, 2, 3, 4, 7}, {1, 2, 3, 7}, {2, 5, 6}, {1, 2, 7}, {8}

(The single {8} indicates that this cell already holds the value 8.) You can see that there are only three cells that have the candidates 1, 3 and 7.


I count 2.



I count three.

There are three cells that can have the numbers: 1, 3 and/or 7. That is: {1, 2, 3, 4, 7}, {1, 2, 3, 7} and {1, 2, 7}.

Yes the last one doesn't have the number 3, but that is not required. As in, would you see it if the last one was {1, 2, 3, 7}? The 3 is removed because an other constraint in the column/box I guess.

whohe wrote:
In this example, we're left with:

{4, 5, 6, 9}, {4, 9}, {5, 6, 9}, {2, 4}, {1, 3, 7}, {1, 3, 7}, {2, 5, 6}, {1, 7}, {8}


How?



There are only three cells that can have the numbers 1, 3 and/or 7. Three cells, three numbers. This allows you to remove all other candidates from those cells. As in, if you would place another number in it, then you will reach a dead end.


whohe wrote:Should this be -
Candidates before:

{4, 5, 6, 9}, {4, 9}, {5, 6, 9}, {2, 4}, {1, 2, 3, 4, 7}, {1, 2, 3, 7}, {2, 5, 6}, {1, 3, 7}, {8}

Candidates after:

{4, 5, 6, 9}, {4, 9}, {5, 6, 9}, {2, 4}, {1, 3, 7}, {1, 3, 7}, {2, 5, 6}, {1, 3, 7}, {8}

?


No, the 3 in column 8 is not a candidate for that cell... why not? it was removed because an other constraint. Either because the box-constraint or the column-constraint. (Impossible to tell without seeing the full grid)




whohe wrote:3. Swordfish. I don't get this at all. In the second diagram, are you implying that the highlighted cells are the only possibilities for the placement of a 1 in the relevant row/column/block, or that we can ignore all other possibilities because of the "swordfish"?


First, to what examples are you refering too?
Second, you really shoudln't care about swordfish. First try to understand (and see) X-wings in the puzzles.

A swordfish is a generalised X-Wing. An X-wing uses two columns/row, a Swordfish uses 3. Also swordfish aren't required to solve puzzles generated by the Pappocom software.
Animator
 
Posts: 469
Joined: 08 April 2005

Postby Animator » Tue May 31, 2005 9:40 am

goldie5218 wrote:hey thanks soooo much whohe! i wanted to raise the same queries but being a new sudoku fan was scared to do so but i really battled to make sense of the original examples - waiting eagerly for a reply to your comments cheers


goldie5218, you said you were able to solve the very easy puzzles, and that you are having problems with some easy puzzles. (and most likely with mediums too).

If that is the case then you shouldn't be looking at these examples.

Those are used in Hard and Very Hard puzzles (I think not in medium, but I'm not sure).

You said yourself that you have problems with English. I'm not a native English speaker either. Explaning the techniques without an example is impossible. Therefor you *should* post the grids you are having troubles with.

Why? I won't explain it properly and you won't understand it (due to bad knowledge of the English language). Therefor we need a 'common language', and that language is sudoku. You post a grid and someone tells you what cells you should look at, and what numbers you should look at.
Animator
 
Posts: 469
Joined: 08 April 2005

Postby whohe » Tue May 31, 2005 10:16 am

Animator wrote:
whohe wrote:1. This "x-wing" business. Surely an "x-wing" is the exact same thing as your example 4 (Reducing Candidates part 2)? From a purely logical perspective, I can't see what the difference is - in both cases, the potential placing a number in one cell forces the placing of the same number in an alternative cell, and vice versa, thus eliminating the possibility of that number going in certain other cells.


Basiccly yes, but try looking at one of the X-wing examples... then you might have a different opinion...

I have looked at them - the example referred to above is an "x-wing" - it's just that the cells are adjacent to one another.

I must admit I find the description "x-wing" very obscure. More simply, if you have unique candidate numbers anywhere on the grid that form a rectangle, then you can eliminate as per the guidelilnes on technique 4.
whohe wrote:2. Reducing Candidates part 4. Is there a typo or two on this page?

For example, consider a block that has the following candidates:

{4, 5, 6, 9}, {4, 9}, {5, 6, 9}, {2, 4}, {1, 2, 3, 4, 7}, {1, 2, 3, 7}, {2, 5, 6}, {1, 2, 7}, {8}

(The single {8} indicates that this cell already holds the value 8.) You can see that there are only three cells that have the candidates 1, 3 and 7.


I count 2.



I count three.

There are three cells that can have the numbers: 1, 3 and/or 7. That is: {1, 2, 3, 4, 7}, {1, 2, 3, 7} and {1, 2, 7}.

Yes the last one doesn't have the number 3, but that is not required. As in, would you see it if the last one was {1, 2, 3, 7}? The 3 is removed because an other constraint in the column/box I guess.

I see what you mean, but I still have to admit finding the explanation confusing. The explanation is "if there are N cells, with N common candidates...", and "you can see that there are only 3 cells that have the candidates 1,3 and 7". This is not the case, as 3 is not given as a candidate for the 3rd cell mentioned.

I think for those who are relatively new to Su Doku (which I'm not), these sort of guidelines could be very confusing. If it means "and/or", it really should say so!
whohe wrote:3. Swordfish. I don't get this at all. In the second diagram, are you implying that the highlighted cells are the only possibilities for the placement of a 1 in the relevant row/column/block, or that we can ignore all other possibilities because of the "swordfish"?


First, to what examples are you refering too?

The example on the page I mentioned. -

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

e.g.

"There are two candidate positions in column 6 - (6, 2) and (6, 6)."

Why not (6,3) or (6,8) as well?

Additionally, this puzzle isn't even valid. Look at the top right block!
Second, you really shoudln't care about swordfish. First try to understand (and see) X-wings in the puzzles.

I fully understand X-wings (even if I disagree about making them a separate case from the earlier technique given).

What I don't understand is why in the example given to explain a "swordfish", the candidate positions for the 1's are limited to those shown.
whohe
 
Posts: 32
Joined: 28 May 2005

Postby Animator » Tue May 31, 2005 2:55 pm

whohe wrote:The example on the page I mentioned. -

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

"There are two candidate positions in column 6 - (6, 2) and (6, 6)."
Why not (6,3) or (6,8) as well?


First: r1c8 in the second grid has to be the number 2, not the number 3. (Simes, can you fix that?)

Second: I guess the notation of these cells is wrong and should be (2, 6) and 6, 6) (first row then column)

Third, if you look at box 2, then you will see a pair of the numbers 1 and 8 (r2c6 and r3c5). This means that r3c6 cannot have the number 1.

If you look at row 8, then you will see a pair of 1 and 6 (r8c2 and r8c5), so the number 1 isn't possible in r8c6 either.

Now you should be able to see the swordfish...
Animator
 
Posts: 469
Joined: 08 April 2005

Postby whohe » Tue May 31, 2005 3:24 pm

Animator wrote:
whohe wrote:The example on the page I mentioned. -

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

"There are two candidate positions in column 6 - (6, 2) and (6, 6)."

Why not (6,3) or (6,8) as well?



First: r1c8 in the second grid has to be the number 2, not the number 3. (Simes, can you fix that?)

Second: I guess the notation of these cells is wrong and should be (2, 6) and 6, 6) (first row then column)

Third, if you look at box 2, then you will see a pair of the numbers 1 and 8 (r2c6 and r3c5). This means that r3c6 cannot have the number 1.

If you look at row 8, then you will see a pair of 1 and 6 (r8c2 and r8c5), so the number 1 isn't possible in r8c6 either.

Now you should be able to see the swordfish...


Ahh.. got you.

Many thanks for taking the time to explain it.
whohe
 
Posts: 32
Joined: 28 May 2005

Postby Animator » Tue May 31, 2005 4:31 pm

whohe wrote:
Animator wrote:
whohe wrote:1. This "x-wing" business. Surely an "x-wing" is the exact same thing as your example 4 (Reducing Candidates part 2)? From a purely logical perspective, I can't see what the difference is - in both cases, the potential placing a number in one cell forces the placing of the same number in an alternative cell, and vice versa, thus eliminating the possibility of that number going in certain other cells.


Basiccly yes, but try looking at one of the X-wing examples... then you might have a different opinion...

I have looked at them - the example referred to above is an "x-wing" - it's just that the cells are adjacent to one another.

I must admit I find the description "x-wing" very obscure. More simply, if you have unique candidate numbers anywhere on the grid that form a rectangle, then you can eliminate as per the guidelilnes on technique 4.


Actually technique 4 ( http://www.simes.clara.co.uk/programs/sudokutechnique4.htm ) can be explained differently.

If you look at the example, then there is only one box that can have the number 3 in column 6, and that is box 8.

You are correct that that examples is an X-wing aswell...

A much better example for that technique would be a grid like:

* * 3 | * * * | * * *
* * * | 4 2 5 | * * *
* * * | + + 1 | * * *
------------------------
* * * | + + 4 | * * *
* 3 * | * * * | * * *
* * * | + + 6 | * * *
------------------------
* * * | * * * | * * *
* * * | * * * | * * *
* * * | * * * | * * *


(The + means that a three is possible (only in box 2 and 5))

And based on that information you can remove the number 3 as candidate from: r7c4, r7c5, r8c4, r8c5, r9c4 and r9c5.

(And this ofcourse is not an X-wing.)
Animator
 
Posts: 469
Joined: 08 April 2005

Postby Guest » Tue May 31, 2005 4:54 pm

Animator wrote:
whohe wrote:
Animator wrote:
whohe wrote:1. This "x-wing" business. Surely an "x-wing" is the exact same thing as your example 4 (Reducing Candidates part 2)? From a purely logical perspective, I can't see what the difference is - in both cases, the potential placing a number in one cell forces the placing of the same number in an alternative cell, and vice versa, thus eliminating the possibility of that number going in certain other cells.


Basiccly yes, but try looking at one of the X-wing examples... then you might have a different opinion...

I have looked at them - the example referred to above is an "x-wing" - it's just that the cells are adjacent to one another.

I must admit I find the description "x-wing" very obscure. More simply, if you have unique candidate numbers anywhere on the grid that form a rectangle, then you can eliminate as per the guidelilnes on technique 4.


Actually technique 4 ( http://www.simes.clara.co.uk/programs/sudokutechnique4.htm ) can be explained differently.

If you look at the example, then there is only one box that can have the number 3 in column 6, and that is box 8.

You are correct that that examples is an X-wing aswell...

A much better example for that technique would be a grid like:

* * 3 | * * * | * * *
* * * | 4 2 5 | * * *
* * * | + + 1 | * * *
------------------------
* * * | + + 4 | * * *
* 3 * | * * * | * * *
* * * | + + 6 | * * *
------------------------
* * * | * * * | * * *
* * * | * * * | * * *
* * * | * * * | * * *


(The + means that a three is possible (only in box 2 and 5))

And based on that information you can remove the number 3 as candidate from: r7c4, r7c5, r8c4, r8c5, r9c4 and r9c5.

(And this ofcourse is not an X-wing.)


I must be missing something here.

A better example, I agree (although of course your example also reduces the selection in r3c7,8,9).

But the fundamental aspect of it is still the same:

What you have is a situation where candidate cells for the same number in different blocks share either rows and/or columns. You can remove that number from candidate cells in other blocks for the shared rows and/or columns.

In the example on simes' page, both rows and columns are shared, so it is identical to an "x-wing" (it causes reduction external to the formed rectangle, whereas in an "x-wing" as presented, the reduction is internal. There is of course no reason why the reduction can't be both internal and external to the formed rectangle).

It really doesn't matter whether the candidate options are on the diagonals of the rectangle (in the x-wing example) or adjacent (in the reducing candidates part 2 or 4 example), nor what the "dimensions" of the rectangle formed are - the logical inference is identical.
Guest
 
Posts: 312
Joined: 25 November 2005

Postby Colette » Mon Jun 06, 2005 8:19 pm

thanks simes that makes sense. have added your site to my favourites...

Colette
 
Posts: 1
Joined: 06 June 2005

Postby simes » Tue Jun 07, 2005 7:12 am

Sorry folks, I've been away and have missed the questions addressed to me in this thread.

Yes, there was a mistake on the swordfish example (thanks Animator)

Yes, the examples still use (column,row) coordinate format (as my solver did originally) - I'll correct this.

I'll look through the above comments, and see if I can clarify any of the examples.

Thanks,
simes
 
Posts: 324
Joined: 11 March 2005
Location: UK

Previous

Return to Advanced solving techniques