|
View previous topic :: View next topic |
Author |
Message |
| rubylips
| Joined: 07 Apr 2005 | Posts: 62 | : | Location: London | Items |
|
Posted: Sun Apr 24, 2005 5:00 am Post subject: Further swordfish example |
|
|
The following puzzle contains a swordfish pattern that, when found, allows completion without guesses:
Code: | . 1 . | . . . | 8 . 3
5 . . | . 9 6 | . . .
. . 4 | . . . | . 6 .
----------------------
9 . . | 4 . 3 | . . .
. 2 . | . . . | . 1 .
. . . | 8 . 5 | . . 7
----------------------
. 6 . | . . . | 4 . .
. . . | 1 7 . | . . 5
1 . 3 | . . . | . 2 . |
|
|
Back to top |
|
|
| rubylips
| Joined: 07 Apr 2005 | Posts: 62 | : | Location: London | Items |
|
Posted: Sun Apr 24, 2005 10:28 am Post subject: |
|
|
Another swordfish puzzle:
Code: | . . . | . . 4 | . . .
. 8 . | 7 . . | . 4 3
. . . | 5 . . | . 6 2
----------------------
1 . 2 | . 8 . | . . .
. . 5 | . . . | 7 . .
. . . | . 9 . | 1 . 4
----------------------
3 7 . | . . 2 | . . .
4 2 . | . . 1 | . 9 .
. . . | 6 . . | . . . |
|
|
Back to top |
|
|
| Simes
| Joined: 08 Apr 2005 | Posts: 71 | : | Location: North Yorkshire, UK | Items |
|
Posted: Sun Apr 24, 2005 6:38 pm Post subject: |
|
|
sorry again rubylips, but the second example doesn't need swordfish. |
|
Back to top |
|
|
| rubylips
| Joined: 07 Apr 2005 | Posts: 62 | : | Location: London | Items |
|
Posted: Sun Apr 24, 2005 7:36 pm Post subject: |
|
|
Do I have yet another bug in my solver? Without swordfish, I reach the following position:
Code: | . . 3 | . . 4 | . . .
. 8 . | 7 . . | . 4 3
7 . 4 | 5 . . | . 6 2
----------------------
1 . 2 | 4 8 7 | . 5 .
. 4 5 | 1 . . | 7 . .
. . 7 | . 9 5 | 1 . 4
----------------------
3 7 . | . 5 2 | 4 . .
4 2 . | . 7 1 | . 9 5
. . . | 6 4 . | 2 . . |
at which point there's a swordfish in the 3s. I agree that I don't have to spot the swordfish if I resort to Nishio, which (critically) tells me that a 3 can't go into the cell r6c8. However, it's possible to solve the first puzzle without a swordfish if Nishio is tolerated. I'd be grateful if you could tell me how you proceed from the above position. My solver tells me:
The value 1 in Row 1 must lie in Box [1,3].
The value 6 in Box [2,1] must lie in Row 6.
The value 6 in Box [2,3] must lie in Row 4.
The value 6 in Column 3 must lie in Box [3,1].
The value 8 in Box [3,1] must lie in Column 3.
The values 1 and 7 occupy the cells (1,8) and (1,9) in some order.
The value 8 in Column 7 must lie in Box [1,3].
The value 9 in Box [2,3] must lie in Column 9.
The values 2, 3 and 6 occupy the cells (5,5), (5,6) and (5,8) in some order.
The values 2, 5 and 6 occupy the cells (1,1), (1,2) and (2,1) in some order.
3s must appear in the cells (4,2) and (6,4) or the cells (4,7) and (6,2). [3-leg Swordfish]
The values 8 and 9 occupy the cells (1,4) and (1,7) in some order.
The cell (6,4) is the only candidate for the value 2 in Column 4.
TIA |
|
Back to top |
|
|
| Simes
| Joined: 08 Apr 2005 | Posts: 71 | : | Location: North Yorkshire, UK | Items |
|
Posted: Mon Apr 25, 2005 7:13 am Post subject: |
|
|
Now that's curious. When I paste in your part-complete example, my program doesn't find a solution. But when I paste in the original, it does find a solution. Hmmm.
Here's the log from the original puzzle:
Note: Cell coordinates are in (column,row) format
(3,3) = 4 : only cell in column 3 that can contain 4
(7,9) = 2 : only cell in column 7 that can contain 2
(1,3) = 7 : only cell in row 3 that can contain 7
(6,4) = 7 : only cell in row 4 that can contain 7
(3,6) = 7 : only cell in row 6 that can contain 7
(5,9) = 4 : only cell in row 9 that can contain 4
(6,6) = 5 : only cell in block 5 that can contain 5
(5,8) = 7 : only cell in block 8 that can contain 7
(7,7) = 4 : only cell in block 9 that can contain 4
block 4: column 2 must contain 3, removing 3 from candidates for cell(s) (2,1)(2,3)
block 4: column 1 must contain 8, removing 8 from candidates for cell(s) (1,9)
block 7: row 9 must contain 5, removing 5 from candidates for cell(s) (8,9)(9,9)
block 7: column 3 must contain 6, removing 6 from candidates for cell(s) (3,1)(3,2)
block 5: row 5 must contain 6, removing 6 from candidates for cell(s) (1,5)(2,5)(9,5)
block 8: row 7 must contain 5, removing 5 from candidates for cell(s) (8,7)(9,7)
block 3: row 1 must contain 1, removing 1 from candidates for cell(s) (2,1)(3,1)(4,1)(5,1)
block 6: row 4 must contain 6, removing 6 from candidates for cell(s) (2,4)
(5,7) = 5 : only possible value for this cell
(3,1) = 3 : only cell in column 3 that can contain 3
(4,5) = 1 : only cell in column 4 that can contain 1
(2,5) = 4 : only cell in row 5 that can contain 4
(4,4) = 4 : only cell in block 5 that can contain 4
column 7: unique subset 589 in cells (7,1)(7,2)(7,3) - updating candidates for cell(s) (7,4)(7,8)
row 1: unique subset 25689 in cells (1,1)(2,1)(4,1)(5,1)(7,1) - updating candidates for cell(s) (8,1)(9,1)
row 5: unique subset 89 in cells (1,5)(9,5) - updating candidates for cell(s) (8,5)
row 8: unique subset 368 in cells (3,8)(4,8)(7,8) - updating candidates for cell(s) (9,8)
block 1: unique subset 19 in cells (3,2)(2,3) - updating candidates for cell(s) (1,1)(2,1)(1,2)
(9,8) = 5 : only possible value for this cell
(8,4) = 5 : only cell in column 8 that can contain 5
row 1: unique subset 12567 in cells (1,1)(2,1)(5,1)(8,1)(9,1) - updating candidates for cell(s) (4,1)(7,1)
block 3: unique subset 1789 in cells (7,1)(8,1)(9,1)(7,3) - updating candidates for cell(s) (7,2)
(7,2) = 5 : only possible value for this cell
(4,6) = 2 : only cell in column 4 that can contain 2
(8,5) = 2 : only cell in column 8 that can contain 2
blocks 2 and 5 must contain 3 in columns 5 and 6 - removing 3 from candidates for cell(s) (6,9)
(4,8) = 3 : only cell in column 4 that can contain 3
(7,4) = 3 : only cell in column 7 that can contain 3
(8,9) = 3 : only cell in column 8 that can contain 3
(9,4) = 6 : only cell in row 4 that can contain 6
(2,6) = 3 : only cell in row 6 that can contain 3
(3,7) = 6 : only cell in row 7 that can contain 6
(7,8) = 6 : only cell in row 8 that can contain 6
(3,8) = 8 : only cell in row 8 that can contain 8
(9,9) = 7 : only cell in row 9 that can contain 7
(1,6) = 6 : only cell in block 4 that can contain 6
(8,1) = 7 : only cell in block 3 that can contain 7
(9,5) = 9 : only cell in block 6 that can contain 9
block 1: row 1 must contain 6, removing 6 from candidates for cell(s) (5,1)
block 4: column 2 must contain 9, removing 9 from candidates for cell(s) (2,3)(2,9)
block 7: row 9 must contain 9, removing 9 from candidates for cell(s) (6,9)
block 8: column 4 must contain 9, removing 9 from candidates for cell(s) (4,1)
block 3: column 9 must contain 1, removing 1 from candidates for cell(s) (9,7)
block 6: column 8 must contain 8, removing 8 from candidates for cell(s) (8,7)
block 9: row 7 must contain 8, removing 8 from candidates for cell(s) (4,7)
(1,2) = 2 : only possible value for this cell
(1,5) = 8 : only possible value for this cell
(2,3) = 1 : only possible value for this cell
(2,4) = 9 : only possible value for this cell
(2,9) = 5 : only possible value for this cell
(3,2) = 9 : only possible value for this cell
(3,9) = 1 : only possible value for this cell
(4,1) = 8 : only possible value for this cell
(4,7) = 9 : only possible value for this cell
(5,1) = 2 : only possible value for this cell
(5,3) = 3 : only possible value for this cell
(5,5) = 6 : only possible value for this cell
(6,2) = 6 : only possible value for this cell
(6,3) = 9 : only possible value for this cell
(6,5) = 3 : only possible value for this cell
(6,9) = 8 : only possible value for this cell
(7,1) = 9 : only possible value for this cell
(7,3) = 8 : only possible value for this cell
(8,6) = 8 : only possible value for this cell
(8,7) = 1 : only possible value for this cell
(9,1) = 1 : only possible value for this cell
(9,7) = 8 : only possible value for this cell
(1,1) = 5 : only cell in column 1 that can contain 5
(1,9) = 9 : only cell in column 1 that can contain 9
(2,1) = 6 : only cell in column 2 that can contain 6
(5,2) = 1 : only cell in column 5 that can contain 1
Completed
resulting in:
563824971
289716543
714539862
192487356
845163729
637295184
376952418
428371695
951648237
Does that match your solution or is there more than one? |
|
Back to top |
|
|
| rubylips
| Joined: 07 Apr 2005 | Posts: 62 | : | Location: London | Items |
|
Posted: Mon Apr 25, 2005 9:53 pm Post subject: |
|
|
First, I did have a bug in my solver (the 'performance enhancement' again - I've just stripped it out completely!). The solver now confirms that it's not necessary to find a swordfish in order to complete the puzzle.
Secondly, the fact that your solver isn't able to complete the partially-solved puzzle suggests that it has a bug. Here's the output from my solver for the first move, after which all is plain sailing:
The value 1 in Row 1 must lie in Box [1,3].
The value 6 in Box [2,1] must lie in Row 6.
The value 6 in Box [2,3] must lie in Row 4.
The value 6 in Column 3 must lie in Box [3,1].
The value 8 in Box [3,1] must lie in Column 3.
The values 1 and 7 occupy the cells (1,8) and (1,9) in some order.
The value 8 in Column 7 must lie in Box [1,3].
The value 9 in Box [2,3] must lie in Column 9.
The values 2, 3 and 6 occupy the cells (5,5), (5,6) and (5,8) in some order.
The values 2, 5 and 6 occupy the cells (1,1), (1,2) and (2,1) in some order.
The values 8 and 9 occupy the cells (1,4) and (1,7) in some order.
The cell (6,4) is the only candidate for the value 2 in Column 4.
Thirdly, here's a new swordfish puzzle:
Code: | . 4 . | . . . | . . 9
8 . . | 7 . . | . 5 .
. . 1 | . . 8 | 2 . .
----------------------
. . . | . 9 . | . . 8
2 . . | . 4 . | . . 6
5 . . | . 6 . | . . .
----------------------
. . 8 | 2 . . | 7 . .
. 6 . | . . 1 | . . 4
9 . . | . . . | . 3 . |
|
|
Back to top |
|
|
| Tempbow
| Joined: 18 Apr 2005 | Posts: 22 | : | | Items |
|
Posted: Mon Apr 25, 2005 11:40 pm Post subject: What is missing? |
|
|
Message moved to new topic
Last edited by Tempbow on Tue Apr 26, 2005 8:55 am; edited 1 time in total |
|
Back to top |
|
|
| Tempbow
| Joined: 18 Apr 2005 | Posts: 22 | : | | Items |
|
Posted: Tue Apr 26, 2005 6:24 am Post subject: |
|
|
Message moved to new topic "Difficult Problems"
Last edited by Tempbow on Tue Apr 26, 2005 8:56 am; edited 1 time in total |
|
Back to top |
|
|
| Tempbow
| Joined: 18 Apr 2005 | Posts: 22 | : | | Items |
|
Posted: Tue Apr 26, 2005 6:27 am Post subject: |
|
|
Oops, sorry, my last two postings should really have been a new topic, rather than under the Swordfish thread
I have now moved them to the new topic "Difficult Problems"
They defined problems that XWINGS and SWORDFISH did not resolve.
Last edited by Tempbow on Tue Apr 26, 2005 8:58 am; edited 1 time in total |
|
Back to top |
|
|
| Simes
| Joined: 08 Apr 2005 | Posts: 71 | : | Location: North Yorkshire, UK | Items |
|
Posted: Tue Apr 26, 2005 7:05 am Post subject: |
|
|
Rublips,
Quote: | ...suggests that it has a bug. |
Yep, you're right. I wasn't correctly flagging that a change had been made to the candidates and so terminated the search too early. I'm surprised I haven't come a cropper with that one before than this.
Tempbow
Yes, they should. You could try deleting them (or editing them down to nothing if you cannot delete) and repost in a new thread. |
|
Back to top |
|
|
|
|
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
|
Powered by phpBB © 2001, 2005 phpBB Group
Igloo Theme Version 1.0 :: Created By: Andrew Charron
|