View previous topic :: View next topic |
Author |
Message |
| tonald
| Joined: 12 Aug 2006 | Posts: 11 | : | | Items |
|
Posted: Mon Oct 30, 2006 3:09 am Post subject: x wings Please come |
|
|
I write a sudoku solver.
And I want to check whether my solver can solve xwing or not, please give me some xwing sudoku >thank a lot
Last edited by tonald on Mon Oct 30, 2006 9:42 am; edited 2 times in total |
|
Back to top |
|
|
| Ocean
| Joined: 29 Aug 2005 | Posts: 15 | : | | Items |
|
Posted: Mon Oct 30, 2006 8:10 am Post subject: Re: xy wings Please come |
|
|
tonald wrote: | I write a sudoku solver.
And I want to check whether my solver can solve xywing or not, please give me some xywing sudoku >thank a lot |
Here are two puzzles that can be solved with XY-wings.
Code: |
*-----------*
|...|..1|.2.|
|.3.|...|..4|
|..1|.5.|...|
|---+---+---|
|...|1..|..6|
|..7|.4.|3..|
|2..|..7|...|
|---+---+---|
|...|.2.|8..|
|1..|...|.7.|
|.6.|3..|...|
*-----------*
After basic eliminations:
*--------------------------------------------------*
| 8 7 9 | 4 6 1 | 5 2 3 |
| 5 3 2 | 89 7 89 | 1 6 4 |
| 6 4 1 | 2 5 3 | 9 8 7 |
|----------------+----------------+----------------|
| 3 58 4 | 1 89 2 | 7 59 6 |
| 9 158 7 | 6 4 58 | 3 15 2 |
| 2 15 6 | 59 3 7 | 4 159 8 |
|----------------+----------------+----------------|
| 4 9 5 | 7 2 6 | 8 3 1 |
| 1 2 3 | 589 89 4 | 6 7 59 |
| 7 6 8 | 3 1 59 | 2 4 59 |
*--------------------------------------------------*
Six xy-wings available. One is enough to solve the puzzle. |
Code: |
*-----------*
|...|..1|.2.|
|.3.|...|..1|
|..4|.3.|...|
|---+---+---|
|...|3..|..5|
|..6|.7.|8..|
|2..|..6|...|
|---+---+---|
|...|.2.|7..|
|1..|...|.6.|
|.5.|4..|...|
*-----------*
This puzzle can be solved with 2x Locked candidates, plus three applications of XY-wing. It has also alternative solution paths. (Simple Sudoku chooses: Colors, Swordfish, XY-wing - in this order). A path with three xy-wings is shown below:
After basic eliminations:
*--------------------------------------------------*
| 789 6 5 |-789 4 1 | 3 2 #78 |
| 789 3 2 | 5 6 789 | 4 78 1 |
| 78 1 4 | 2 3 78 | 9 5 6 |
|----------------+----------------+----------------|
| 4 78 1 | 3 89 2 | 6 79 5 |
| 5 9 6 | 1 7 4 | 8 3 2 |
| 2 78 3 |#89 5 6 | 1 4 #79 |
|----------------+----------------+----------------|
| 3 4 89 | 6 2 5 | 7 1 89 |
| 1 2 789 | 789 89 3 | 5 6 4 |
| 6 5 789 | 4 1 789 | 2 89 3 |
*--------------------------------------------------*
Later:
*--------------------------------------------------*
| 789 6 5 | 79 4 1 | 3 2 78 |
| 789 3 2 | 5 6 -789 | 4 #78 1 |
| 78 1 4 | 2 3 78 | 9 5 6 |
|----------------+----------------+----------------|
| 4 78 1 | 3 89 2 | 6 79 5 |
| 5 9 6 | 1 7 4 | 8 3 2 |
| 2 78 3 | 89 5 6 | 1 4 79 |
|----------------+----------------+----------------|
| 3 4 89 | 6 2 5 | 7 1 89 |
| 1 2 79 | 789 89 3 | 5 6 4 |
| 6 5 789 | 4 1 #79 | 2 #89 3 |
*--------------------------------------------------*
Later again (two xy-wings available, only one shown):
*--------------------------------------------------*
| 789 6 5 |#79 4 1 | 3 2 #78 |
| 789 3 2 | 5 6 #89 | 4 -78 1 |
| 78 1 4 | 2 3 78 | 9 5 6 |
|----------------+----------------+----------------|
| 4 78 1 | 3 89 2 | 6 79 5 |
| 5 9 6 | 1 7 4 | 8 3 2 |
| 2 78 3 | 89 5 6 | 1 4 79 |
|----------------+----------------+----------------|
| 3 4 89 | 6 2 5 | 7 1 89 |
| 1 2 79 | 789 89 3 | 5 6 4 |
| 6 5 789 | 4 1 79 | 2 89 3 |
*--------------------------------------------------*
|
|
|
Back to top |
|
|
| tonald
| Joined: 12 Aug 2006 | Posts: 11 | : | | Items |
|
Posted: Mon Oct 30, 2006 9:42 am Post subject: |
|
|
sorry I make some mistake
I want to have some xwing puzzle but not Xywing
Sorry
Please help me |
|
Back to top |
|
|
| Ocean
| Joined: 29 Aug 2005 | Posts: 15 | : | | Items |
|
Posted: Mon Oct 30, 2006 9:55 am Post subject: |
|
|
tonald wrote: | sorry I make some mistake
I want to have some xwing puzzle but not Xywing
Sorry
Please help me |
OK, no problem. A few X-Wing puzzles can be found here. |
|
Back to top |
|
|
| pirussas
| Joined: 14 Sep 2009 | Posts: 11 | : | | Items |
|
Posted: Tue Nov 03, 2009 12:01 pm Post subject: |
|
|
What are the advantages and disadvantages of using x-wings?
for those who want to solve sudoku nxn... |
|
Back to top |
|
|
|