View previous topic :: View next topic |
Author |
Message |
| DrSudoku
| Joined: 30 Oct 2005 | Posts: 1 | : | | Items |
|
Posted: Sun Oct 30, 2005 12:17 pm Post subject: Number of "magic sudokus" (and random generation) |
|
|
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 |
|
|
| dukuso
| Joined: 14 Jul 2005 | Posts: 424 | : | Location: germany | Items |
|
Posted: Sun Oct 30, 2005 2:14 pm Post subject: |
|
|
I think it's
someone else please fill in the missing digits so to confirm it. |
|
Back to top |
|
|
| mrcl
| Joined: 01 Dec 2005 | Posts: 3 | : | | Items |
|
Posted: Thu Dec 01, 2005 12:54 am Post subject: |
|
|
dukuso wrote: | I think it's
|
maybe 5971968
besides transposition and reordering column or rows the only possible box of such a sudoku is
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 |
|
|
|