MainScienceMathRecreations › Mathpages: Solving Magic Squares

Mathpages: Solving Magic Squares

Edit Page
Report
Scan day: 09 February 2014 UTC
34
Virus safety - good
Description: An attempt to solve for all possible magic squares, a mathematical treatment.
What's the most efficient way of generating all possible NxN magic squares? Obviously trying all (N^2)! possible arrangements and checking for "magicness" would be prohibitive. Presumably this was not the method used by Bernard Frenicle de Bessy back in 1693 to determine that there are exactly 880 distinct 4x4 magic squares, not counting rotations and reflections. (Does anyone know what method he actually used?) There are several more modern treatments of the subject, such as in the book "Winning Ways" by Conway, but they mainly seem to approach the question in terms of equivalence classes and transformations of various kinds. This approach is certainly illuminating, but it's also interesting to try just "solving" the problem algebraically. In general, when dealing with NxN squares, where N is odd, it's helpful to subtract (N^2 + 1)/2 from each of the numbers 1 through N^2, since this makes all the common sums zero. For example, with a typical 3x3 square we subtract 5 from each number to give a b c 1 -4 3 d e f = 2 0 -2 g h i -3 4 -1 which makes it immediately obvious that there is only one possible magic square of order 3, up to rotations and reflections. This can also be seen by combining the algebraic conditions on the variables to eliminate all but two of the variables and arrive at the conic 2a^2 + 2ab + b^2 = 10 (1) (See
Size: 1393 chars

Contact Information

Email:
Phone&Fax:
Address:
Extended:

WEBSITE Info

Page title:Solving Magic Squares
Keywords:
Description:
IP-address:198.65.11.82

WHOIS Info

NS
Name Server: NS19A.NAMESERVERS.NET
Name Server: NS19B.NAMESERVERS.NET
WHOIS
Status: clientTransferProhibited
Date
Creation Date: 08-aug-1999
Expiration Date: 07-oct-2021