How do I easily verify a solved sudoku puzzle

Everything about Sudoku that doesn't fit in one of the other sections

How do I easily verify a solved sudoku puzzle

Postby totup » Fri Mar 31, 2006 5:43 pm

I would like to know if there is a faster way of verifying my finsihed solution for any 9x9 sudoku puzzle (not by looking at the solution in the back of a book of puzzles ... I may not have the solution if I copied a puzzle from the internet or a magazine). Right now I check it in 3 steps: (1) check that each square has 1-9 (2) check that each row has 1-9 and (3) check that each column has 1-9. I'm wondering if there is a quicker method than this (such as only checking some of the squares, rows, and columns to prove my solution is correct). I've done many puzzles but I'm basically self taught (have not read any books or anything on methods).
totup
 
Posts: 2
Joined: 31 March 2006

Postby ab » Fri Mar 31, 2006 6:58 pm

there is no quicker way!

why did you post this in the solver programs forum??
ab
 
Posts: 451
Joined: 06 September 2005

Postby MCC » Sat Apr 01, 2006 4:46 pm

ab wrote:why did you post this in the solver programs forum??

I thought this was the 'General puzzle' forum.

MCC
MCC
 
Posts: 1275
Joined: 08 June 2005

oops

Postby totup » Sat Apr 01, 2006 5:15 pm

sorry ... thought i did put this in the general puzzle forum. Not sure how I got it into this forum. This was my first post and I must have made some kind of mistake when posting it.
totup
 
Posts: 2
Joined: 31 March 2006

Postby MCC » Sun Apr 02, 2006 10:59 am

totup, this is the General puzzle forum, either your post was moved from the solver programs forum or ab has made a mistake.

MCC
MCC
 
Posts: 1275
Joined: 08 June 2005

Postby Pappocom » Sun Apr 02, 2006 11:45 am

No need to get so hung up about which forum is used. If it's in a wrong forum, I'll move it to the correct one. That's what I did here. This topic was originally in the Solver Programs forum and I moved here to the General/Puzzle forum.

- Wayne
Pappocom
 
Posts: 599
Joined: 05 March 2005

Postby HATMAN » Sun Apr 02, 2006 11:53 am

If you want to do this regularly there is a quicker way:

set up a spreadsheet with sums on the rows, columns and nonets

cut and paste in and if all are 45 you are fine.

Alternatively sum up all the cells and if you get 405 you are probably correct.
HATMAN
 
Posts: 315
Joined: 25 February 2006
Location: Saudi Arabia

Postby PaulIQ164 » Sun Apr 02, 2006 1:15 pm

You can get a puzzle wrong and still have all the rows, columns and boxes summing to 45 (most obviously if you have a 5 in every single cell).

I think that checking every row, column and box for the numbers 1-9 is the only way to completely verify you've got it right. Other methods are quicker, but the trade-off is that there's a slight chance they'll give a 'false positive'. It depends on what level of certainty you're comfortable with.
PaulIQ164
 
Posts: 533
Joined: 16 July 2005

Postby Smythe Dakota » Sun Apr 02, 2006 2:00 pm

PaulIQ164 wrote:You can get a puzzle wrong and still have all the rows, columns and boxes summing to 45 (most obviously if you have a 5 in every single cell). ....

Maybe you could have your Excel spreadsheet make the following substitutions:

1 --> 2
2 --> 4
3 --> 8
4 --> 16
5 --> 32
6 --> 64
7 --> 128
8 --> 256
9 --> 512
anything else --> 1024

-- and then check that the sum of every row, column, and 3x3 is 1023.

Bill Smythe
Smythe Dakota
 
Posts: 564
Joined: 11 February 2006

Postby HATMAN » Sun Apr 02, 2006 2:59 pm

Paul

You are correct in that it is not perfect (but Bill's method sorts that).

However I think the total sum 405 is enough for confidence as we also have a human being in the circuit doing a visual scan of the puzzle (who would hopefully spot all the 5s).

In this I am following the same method I use in text checking: human + computer. Each finds different types of mistakes.

Anyway stick to killer, as the cage sums make it bl**dy obvious when you are wrong (unless, of course, you try my non-unique KiMo).
HATMAN
 
Posts: 315
Joined: 25 February 2006
Location: Saudi Arabia

Postby Smythe Dakota » Tue Apr 04, 2006 12:04 pm

Oops, the sum in my method should be 1022, not 1023. I forgot I started with 2 instead of 1.

Bill Smythe
Smythe Dakota
 
Posts: 564
Joined: 11 February 2006

Postby Pi » Wed Apr 05, 2006 4:33 pm

I have an adequate spreadsheet if you want it.

PM/email me
Pi
 
Posts: 389
Joined: 27 May 2005

Postby lunababy_moonchild » Wed Apr 05, 2006 7:25 pm

Personally, I check each row and each column (and get a certain personal satisfaction out of doing so) - I take it we're talking about solving on paper?

My father, on the other hand, checks them as he goes. This he does by putting a line through each set of 3 by column and row (I have no idea which, if any, come first). He knows by the direction of the score whether it's column or row and when he's finished (each number having been crossed off) he knows it's checked - although it looks like a dog's breakfast by that time!

So, in case that wasn't clear, it's (say) \ for column / for row and X for complete. It works for him, but most of the time he fails to solve so I don't know how much of a recommendation that is!

Luna
lunababy_moonchild
 
Posts: 659
Joined: 23 March 2005

Re: How do I easily verify a solved sudoku puzzle

Postby Condor » Mon Apr 10, 2006 2:13 am

totup wrote:I would like to know if there is a faster way of verifying my finsihed solution for any 9x9 sudoku puzzle (not by looking at the solution in the back of a book of puzzles ... I may not have the solution if I copied a puzzle from the internet or a magazine). Right now I check it in 3 steps: (1) check that each square has 1-9 (2) check that each row has 1-9 and (3) check that each column has 1-9. I'm wondering if there is a quicker method than this (such as only checking some of the squares, rows, and columns to prove my solution is correct). I've done many puzzles but I'm basically self taught (have not read any books or anything on methods).

I will assume from your posting that you are looking for a method that you can apply by hand. Before giving a method I use, it is not a good idea to talk about squares. Squares can refer to too many different things. Use 'Box' for the 3x3 groupings.
ab wrote:there is no quicker way!


Actually it can be done in 18 checks.

Start in box 1 and look for the 1 digit. Note which row it is in. Now move to box 2 and note which row the 1 is in. Now move to box 3. It can only be in the remaining row.

Repeat the above, for the rest of the digits in boxes 1 to 3.

This proceedure is then repeated in boxes 4 to 6, and then 7 to 9.

All the rows and boxes have now checked. The same proceedure can also be applied to the columns and boxes.

There are some things that can be done to reduce the checks further.

Consider the following band (3 boxes in a row)

Code: Select all
281 374 569
569 821 347
374 965 812

Note that the digits 1, 2 and 8 are in the first row and box. They are also in the second row and box. (in some order) They must therefore be in the third row and box. (in some order)

The next digits (5, 6 and 9) must also be in the same row and box, whatever the order. Likewise the the third set of digits (3, 4 and 7)

More fequently two of the digits will be paired together - that is same row and box, while the third digit is in the other row for the second and third boxes.

Code: Select all
732 148 956
416 259 738
895 736 124

Here we see 7 and 3 paired, likewise 1 and 4, also 5 and 9. 2, 6 and 8 each share a row and box with one of the pairs in turn.
Condor
 
Posts: 62
Joined: 19 June 2005

Postby algernon » Sun Jul 02, 2006 7:05 am

If you have checked the rows, you know that the every digit is present exactly 9 times. So, when you check the columns afterwards, you only
have to check the first 8 columns, as the last column must obviously contain the remaining digits. Same for the blocks.
algernon
 
Posts: 25
Joined: 26 June 2006

Next

Return to General

cron