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   

Strange things in 2x2 sudoku's

 
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> The mathematics of sudoku
View previous topic :: View next topic  
Author Message
soduko

Joined: 10 Oct 2005
Posts: 50
:

Items
PostPosted: Mon Oct 31, 2005 1:04 am    Post subject: Strange things in 2x2 sudoku's Reply with quote

while I was browsing the forum I came to the thread
http://www.setbb.com/phpbb/viewtopic.php?t=27&mforum=sudoku

And made a simplistic BASIC program to make all 288 2x2 sudoku's

In my simplistic program I made 8 nested loops from 1 to 4 for the variables
R1C1, R1C2, R1C3, R2C1, R2C3, R3C1, R3C2 and R3C3

the other variables were calculated from these loopvariables like:
R1C4 = 10 - R1C1 - R1C2 - R1C3
and
R2C2 = 10 - R1C1 - R1C2 - R2C1


And then did all the testing
- not two the same values in a row, column and box

There are 6 (tests per row, column and box)
times
8 (number of rows and collumns)
plus
2 (extra tests per box, the other 4 are already in the row and column tests)
times
4 (number of boxes)

total 56 tests. (corrected original gave 54 by mistake)

By mistake I forgot some tests but strangly (to me) this did not result is extra (wrong) solutions.

Some puzzeling later I found that I only had to do

the following 19 tests:

R1C2 = R1C1
R1C3 = R1C1
R1C3 = R1C2
R2C1 = R1C1
R2C1 = R1C2
R2C3 = R1C3
R2C3 = R2C1
R2C3 = R2C2
R3C1 = R1C1
R3C1 = R2C1
R3C2 = R1C2
R3C2 = R3C1
R3C2 = R2C2
R3C3 = R1C3
R3C3 = R2C3
R3C3 = R3C1
R3C3 = R3C2
R4C3 = R4C1
R4C3 = R4C2

Can somebody explain this to me?
I noticed that only the last two tests involve calculated variables, but I do not understand why, they are nessesary and the others are not.

Ps I do not understand DLX and QWH's
And Graph theory is also still uncharted.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> The mathematics of 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