[WelMac] Sudoku mania
John Crook
jmcrook at mac.com
Tue Mar 7 15:21:59 CST 2006
>
My thanks to both David and Jo for their suggestions on both Sudoku and
programming. Jo now has the program. Here's some follow up to David's
response.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: puzzle 64.pdf
Type: application/pdf
Size: 7257 bytes
Desc: not available
Url : http://nzmac.org/pipermail/welmac_nzmac.org/attachments/20060308/5f51d270/puzzle64-0001.pdf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: puzzle 64 first run.pdf
Type: application/pdf
Size: 12777 bytes
Desc: not available
Url : http://nzmac.org/pipermail/welmac_nzmac.org/attachments/20060308/5f51d270/puzzle64firstrun-0001.pdf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: puzzle 64 stuck.pdf
Type: application/pdf
Size: 12357 bytes
Desc: not available
Url : http://nzmac.org/pipermail/welmac_nzmac.org/attachments/20060308/5f51d270/puzzle64stuck-0001.pdf
-------------- next part --------------
>> 3. Are there any Sudoku-meisters out there who would like to look at
>> the partially completed puzzles that I cannot solve, and tell me what
>> other logical rules I might use?
>
> Fire away. I should at least be able to determine whether I would be
> able to find a solution by logic or can't do it without guesswork.
Thanks David. I've enclosed three files. "Puzzle 64" is the original
puzzle from "Sudoku - the original hand made puzzles" - a book from the
UK.
"Puzzle 64 first run" is as far as my programme will go automatically.
My first two rules are similar to yours but expressed differently.
"Puzzle 64 stuck" is as far as I can by direct logic. (Rules again
similar to your later ones but I need to study when I have a bit more
time and see if your variations add to my stock of rules.
Using guesswork, I can solve the puzzle easily by putting a 4 in the
second cell of the first column (it has to be a four or a 6) and then
running my program again. However, this 'trial and error approach is
not intrinsically satisfying - it's a bit like looking up the answers
at the back of the book.) Would certainly welcome any ideas you have
on direct solution.
>
> I haven't attempted to formally describe the rules I use to solve
> Sudoku puzzles, and haven't seen any standardised terminology which
> would allow mutual understanding of such rules, but then again I
> haven't gone looking for any.
>
> Here are my rules. The first three are usually sufficient to solve
> Gentle and Moderate puzzles.
>
> My first step is to look at all of the instances of a particular
> digit in the puzzle and see whethere there are any other 3x3 squares
> into which that digit can be placed immediately, allowing for other
> instances of the same digit in intersecting rows and columns,
> sometimes requiring two or three nested intersections. I tend to go
> through all of the digits in order of frequency before trying other
> rules. (This could probably be turned around to look at missing
> numbers in each 3x3 square, but I prefer to work the other way.)
>
> My second step is to look at each row and column and identify the
> missing digits, then see if any of those digits can only go in one
> possible position, concentrating on the rows and columns with the
> fewest gaps first. At this step I start noting which numbers can
> appear in particular cells.
>
> My third step (done at the same time as the second step) is to look
> for any "pairs" in a row, column or 3x3 square, i.e. unsolved cells
> which can be either of two possible digits, and there is another cell
> in the same row, column or 3x3 square which has the same two possible
> digits. If so, this allows those digits to be eliminated as
> possibilities in every other cell in the same row, column or 3x3
> square, which may identify further pairs or individual cells in which
> only one possibility remains.
>
> My fourth step is to look for patterns in the placement of possible
> numbers in the unsolved cells within 3x9 blocks. Consider the case
> where no instance of a particular number has yet been placed in a
> horizontal 3x9 block, but all the cells which might hold that number
> have been identified. If the number can only be placed in either of
> two rows for one 3x3 square, and either of the same two rows in a
> second 3x3 square, then it must be located on the third row in the
> third 3x3 square, allowing any potential instances on the other two
> rows within the third square to be eliminated. This can be repeated
> vertically, and there are some minor variations.
>
> I think that covers it. After using each rule I tend to repeat the
> earlier ones in case more numbers pop out.
>
> --
> David Empson
> dempson at actrix.gen.nz
> Snail mail: P.O. Box 27-103, Wellington, New Zealand
>
>
I'm travelling for the next week or ten days so it'll be a little while
before I can get back to this.
Cheers
John
More information about the WelMac
mailing list