Jump to content

Recommended Posts

Posted

I spent a little bit of time yesterday looking at magic squares yesterday (something which I havent done since school)

 

I noticed that sudoku puzzles are basicly magic squares but they reuse each number 9 times. Sudoku puzles are in essence very easy to make. Simple count up and loop back to 1 after 9. and offset each row so that it there is never the same number in each colum.

 

 

1 2 3 l 4 5 6 l 7 8 9

4 5 6 l 7 8 9 l 1 2 3

7 8 9 l 1 2 3 l 4 5 6

2 3 4 l 5 6 7 l 8 9 1

5 6 7 l 8 9 1 l 2 3 4

8 9 1 l 2 3 4 l 5 6 7

3 4 5 l 6 7 8 l 9 1 2

6 7 8 l 9 1 2 l 3 4 5

9 1 2 l 3 4 5 l 6 7 8

 

each number can be switched with any other and the order of the colums and rows can also be swiched in various manners. I think this method will produce every possible puzzle. I then realized that I could turn this in to a true magic square by adding 9 * (square - 1) to the sudoku numbers from a smaller 3 * 3 magic square.

 

To make the smaller magic square I started with 159 in the midle making a total row of 15. then I worked on the end colum. 15 - 9 = 6. the only ways to make 6 are 1 and 5 or 2 and 4. 1 and 5 are already taken so I am left with 2 and 4 which that gives me

----2

1 5 9

----4

then I takle the diagonals 4 + 5 is 9 so 6 goes top left and 2 + 5 is 7 so 8 goes bottom left. then the rest is simple.

 

6 7 2

1 5 9

8 3 4

 

so:

123

456

789

 

+ 9 * (6-1) =

 

46 47 48

49 50 51

52 53 54

 

 

 

so the complete thing becomes:

 

46 47 48 58 59 60 16 17 18

49 50 51 61 62 63 10 11 12

52 53 54 55 56 57 13 14 15

02 03 04 41 42 43 80 81 73

05 06 07 44 45 37 74 75 76

08 09 01 38 39 40 77 78 79

66 67 68 24 25 26 36 28 29

69 70 71 27 19 20 30 31 32

72 64 65 21 22 23 33 34 35

 

unfortunately after completion I reallised the diagonals didn't add up because I didn't start with an x-sudoku but I was rather short of time.

 

each row and colum adds up to 369, the formular relating the size of the magic square and the row total is row lengh = a. a^2 (a^2 +1) / 2a

a (a+1) /2 being the formual for triange numbers (all numbers added together) then devided by the number of rows.

 

This same method can be used to create a magic square of 27 * 27 total of 9855 per row or 81 * 81 with a total of 265761 which I might upload later in the week.

 

 

I then tried to move on to magic cubes but the smallest possible is 5 * 5 * 5.

because the formuar for the total per row doesn't give a whole number with anything smaller so I've admited defeat for now . the formular for the totals in cubes is a^3 (a^3+1) / 2a^2.

 

If anyone have managed to make a magic cube I'd be interested to see.

 

I've done a tiny bit of research and have found a 5 * 5 * 5magic cube. aparently no one have ever made one biger than 9 * 9 * 9. I can use my formular to create one of 25 * 25 * 25 which will smash the world record.

 

PerfectMagicCube5.gif

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.