|
-
April 16th, 2009, 11:16 AM
#1
magic square
Is there an existing formula to find the number of solutions of a magic square?
I know:
3x3
4x4
5x5
..
I'd like to be able to do a nxn.
I can also do the magic number sums.
Any help in the right direction would be greatly appreciated.
-
April 16th, 2009, 12:00 PM
#2
Re: magic square
Hi all.
Take a look at
http://mathworld.wolfram.com/MagicSquare.html
It provides some methods to build magis square nxn.
-
April 16th, 2009, 01:28 PM
#3
Re: magic square
According to that webpage:
The number of 6×6 squares is not known, but Pinn and Wieczerkowski (1998) estimated it to be (1.7745+/-0.0016)×10^(19) using Monte Carlo simulation and methods from statistical mechanics.
So, I guess this project would be impossible, unless I were to sit down and figure them out myself.
-
April 16th, 2009, 04:25 PM
#4
Re: magic square
This is one of the unsolved questions in mathematics. If you do happen to find a solution you will join the ranks of great mathematicians. Keep us posted!
-
April 16th, 2009, 10:59 PM
#5
Re: magic square
Sounds like an intriguing task.
-
April 16th, 2009, 11:01 PM
#6
Re: magic square
Since there are so many different solutions, would it be better to make the application multi-threaded - and thread several different computations at once? or would it be better to just run it straight forward no threads?
-
April 17th, 2009, 12:58 PM
#7
Re: magic square
Whether you should multi-thread or not would depend on the hardware you are targeting.
If you are targeting a single-core, non-hyperthreaded processor, you are going to take an extra CPU hit whenever the threads switch.
If you are targeting a single-core, hyperthreaded processor, probably go with just 2 threads.
If you have multiple cores/multiple processors, you can probably scale up accordingly. There are probably some additional tricks you need to do to get your program to run on more than one core. The Multithreading Forum would probably be the place to go to get further advice.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|