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   

Number of "magic sudokus" (and random generation)

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

Joined: 30 Oct 2005
Posts: 1
:

Items
PostPosted: Sun Oct 30, 2005 12:17 pm    Post subject: Number of "magic sudokus" (and random generation) Reply with quote

Hi,

I am intereste in calculating how many "magic sudokus" it's possible to create. A "magic sudoku" is a normal sudoku with an extra constraint:
in each of the 9 3x3 squares the sum of each row and col must be the same (15).

I have read about the difficulty in calculating the number of regular sudokus but I reckon it's possible to calculate the numbers when it's a magic sudoku. The number of possible 3x3 squares where the sum of each row and col is 15 should be each to calculate.

I have written a simple program i c to generate random "magic sudokus" but I am interested in knowing how many it's possible to make. I have a hunch that it's not that many.

Here's some output examples from my program:

1 9 5 | 6 7 2 | 3 4 8
8 4 3 | 1 5 9 | 7 2 6
6 2 7 | 8 3 4 | 5 9 1
---------------------
2 7 6 | 9 1 5 | 8 3 4
4 3 8 | 2 6 7 | 1 5 9
9 5 1 | 4 8 3 | 6 7 2
---------------------
7 6 2 | 3 4 8 | 9 1 5
5 1 9 | 7 2 6 | 4 8 3
3 8 4 | 5 9 1 | 2 6 7


1 9 5 | 7 2 6 | 3 8 4
8 4 3 | 5 9 1 | 7 6 2
6 2 7 | 3 4 8 | 5 1 9
---------------------
5 1 9 | 8 3 4 | 2 7 6
7 6 2 | 1 5 9 | 4 3 8
3 8 4 | 6 7 2 | 9 5 1
---------------------
2 7 6 | 4 8 3 | 1 9 5
9 5 1 | 2 6 7 | 8 4 3
4 3 8 | 9 1 5 | 6 2 7


8 6 1 | 2 9 4 | 3 5 7
3 7 5 | 6 1 8 | 4 9 2
4 2 9 | 7 5 3 | 8 1 6
---------------------
5 3 7 | 8 6 1 | 2 4 9
9 4 2 | 3 7 5 | 6 8 1
1 8 6 | 4 2 9 | 7 3 5
---------------------
7 5 3 | 1 8 6 | 9 2 4
2 9 4 | 5 3 7 | 1 6 8
6 1 8 | 9 4 2 | 5 7 3

Thanks in advance.
Back to top
View user's profile Send private message
dukuso

Joined: 14 Jul 2005
Posts: 424
:
Location: germany

Items
PostPosted: Sun Oct 30, 2005 2:14 pm    Post subject: Reply with quote

I think it's
Code:

5.7.9..


someone else please fill in the missing digits so to confirm it.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mrcl

Joined: 01 Dec 2005
Posts: 3
:

Items
PostPosted: Thu Dec 01, 2005 12:54 am    Post subject: Reply with quote

dukuso wrote:
I think it's
Code:

5.7.9..


maybe 5971968

besides transposition and reordering column or rows the only possible box of such a sudoku is
Code:
159
672
834

transposition divides the boxes into two classes. boxes of different classes cannot be in the same sudoku. there are 2*3!*3! posibilities to select a box 1: transposition (2) ,permuting rows (3!) or columns (3!).
for box2 there are 2!*3! possibilites: 2! for permuting the rows and 3! for permuting the columns. all in all there are the following possibilities to seleect boxes:

Code:

  2*3!*3!  3!*2!  3!*1!
    2!*3!  2!*2!  2!*1!
    1!*3!  1!*2!  1!*1!

this gives 2*2!^6*3!^6 possiblitis, that gives 5971968.
_________________
guenter
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