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   

I give up. What's the next value and why?

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

Joined: 26 Jul 2005
Posts: 27
:
Location: Washington DC

Items
PostPosted: Wed Aug 24, 2005 2:18 am    Post subject: I give up. What's the next value and why? Reply with quote

--- 13- --5
34- --5 2--
85- 9-2 ---
--- -5- 9--
--2 --- 4--
--3 -6- ---
--- -13 --6
-35 --- -1-
71- -28 ---
Back to top
View user's profile Send private message Visit poster's website
gaby

Joined: 02 Jul 2005
Posts: 120
:

Items
PostPosted: Wed Aug 24, 2005 11:33 am    Post subject: Reply with quote

There is a matched quad (swordfish n=2) in there. The puzzle solves very quickly once you find it.

Hint: it's in the 6's...
_________________
Free daily sudoku - Online puzzle database
http://vanhegan.net/sudoku/
Back to top
View user's profile Send private message Visit poster's website
gaby

Joined: 02 Jul 2005
Posts: 120
:

Items
PostPosted: Wed Aug 24, 2005 11:59 am    Post subject: Reply with quote

Oops, also forgot some other block interactions. If a number only appears in one row in a specific block, you can remove that number from all the other cells in that row. Likewise for columns. This removes 10 candidate numbers. Then you are looking at the matched quad above.
_________________
Free daily sudoku - Online puzzle database
http://vanhegan.net/sudoku/
Back to top
View user's profile Send private message Visit poster's website
qbasicmac

Joined: 26 Jul 2005
Posts: 27
:
Location: Washington DC

Items
PostPosted: Wed Aug 24, 2005 3:07 pm    Post subject: Reply with quote

Afraid I am not following.

Maybe you could just tell me if my current pencil marks are correct. If not, where the errors are.

If they are correct, what is the next pencilmark I can eliminate and why.

Example: You can eliminate 6 from r1c1 because .....

Thanks for you efforts

Mac

269 2679 679 4678 478 467 678 4789 4789
- 679 1679 678 78 67 1678 79 179
16 - 167 467 47 467 1367 347 1347
146 678 4678 23478 478 147 13678 23678 12378
1569 6789 16789 378 789 179 135678 35678 1378
1459 789 14789 2478 4789 1479 1578 2578 1278
249 289 489 457 479 479 57 24579 24789
246 2689 4689 467 479 4679 78 24789 2478
469 69 469 456 49 469 35 3459 349
Back to top
View user's profile Send private message Visit poster's website
gaby

Joined: 02 Jul 2005
Posts: 120
:

Items
PostPosted: Wed Aug 24, 2005 4:28 pm    Post subject: Reply with quote

Going from the starting position that you showed, I can remove the following pencilmarks:

Code:

1 <- [3,4] b1 only has 1 in c3
8 <- [8,2] b2 only has 8 in r2
8 <- [9,2] b2 only has 8 in r2
6 <- [8,1] b6 only has 6 in c8
6 <- [8,2] b6 only has 6 in c8
6 <- [8,3] b6 only has 6 in c8
8 <- [7,7] b7 only has 8 in r7
8 <- [8,7] b7 only has 8 in r7
9 <- [1,8] b8 only has 9 in r8
9 <- [9,8] b8 only has 9 in r8


b1, or block 1, the top left block, only has the number 1 in column 3 in that block. Column 3 has to contain the number 1, as does block 1. The number 1 can only go in one column in block 1, the column on the right, column 3. This means that the other cells in column 3 (the ones in blocks 4 and 7, directly below) cannot contain the number 1, so we can remove it as a candidate from those other cells. Repeat this for the other ones noted above.

After this, we get a matched quad, which is also the swordfish pattern but only looking for 2 rows/columns:

Code:

Swordfish, by rows in 6's (N=2) cells [3,2][4,2][3,9][4,9]
6 <- [3,1] Swordfish in 6's: r2,r9
6 <- [3,3] Swordfish in 6's: r2,r9
6 <- [3,4] Swordfish in 6's: r2,r9
6 <- [4,8] Swordfish in 6's: r2,r9


You can read up on the swordfish pattern or matched quads, locked quads, call them what you will, at various other places. Basically there is a square formed, with the number 6 at each of the corners. The number 6 has to appear at either top left/bottom right, or top right/bottom left, which means that it can't appear in any of the other cells in those rows/columns.

Once you apply these two techniques, the puzzle becomes very simple to solve.

Gaby
_________________
Free daily sudoku - Online puzzle database
http://vanhegan.net/sudoku/
Back to top
View user's profile Send private message Visit poster's website
qbasicmac

Joined: 26 Jul 2005
Posts: 27
:
Location: Washington DC

Items
PostPosted: Wed Aug 24, 2005 5:31 pm    Post subject: Reply with quote

"the puzzle becomes very simple to solve"

ROFL

Well, I finally saw the X-Tree you pointed out. Dang, those are hard to spot. And I thought I looked everywhere.

Thereafter, it was possible to solve, but I wouldn't call it easy.

Thanks for your help! Now I can sleep.

By the way, not to complain, but you could have saved a lot of work if you had simply originally answered "The cells at r2c3, r2c4, r9c3, r9c4 form an X-Tree on digit 6. Let me know if you don't know what that means."

That was really all I was missing. I know the techniques, but can't see the patterns. Mental block.

As I said, No complaint. I would still be staring at that stupid puzzle next week without your help.

Mac
Back to top
View user's profile Send private message Visit poster's website
gaby

Joined: 02 Jul 2005
Posts: 120
:

Items
PostPosted: Wed Aug 24, 2005 5:42 pm    Post subject: Reply with quote

Happy to help.

I just like to make sure I'm thinking clearly myself when I answer questions. It normally ends up with me writing much more than I need to. Whilst I was writing the response, I found three bugs in my code as well Smile

If I may ask, do you have a solver that you've written or are you doing these by hand?

Gaby
_________________
Free daily sudoku - Online puzzle database
http://vanhegan.net/sudoku/
Back to top
View user's profile Send private message Visit poster's website
qbasicmac

Joined: 26 Jul 2005
Posts: 27
:
Location: Washington DC

Items
PostPosted: Thu Aug 25, 2005 12:36 am    Post subject: Reply with quote

I have a non-solver.

I call it SuDoku Scratch Pad.

It is still under construction, but a more-or-less good version can be found at
http://www.sudoku.funurl.com/

It does the drudgery work of maintaining the pencil marks.

There are also three DOS-based utilities. One of them is a solver, but not of interest to you, probably. It simply does the most easy and then immediately begins guessing. It is fast, but uses no techniques beyond simple computing for each cell the legal values by eliminating those already in the box, row, or cell. When a cell has only one value, it is filled in. When stymied, then when a cell has two values, each are tried, etc. (Yawn!)

The source code in QBasic is available via that site also.

Mac
Back to top
View user's profile Send private message Visit poster's website
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