Office Applications and Entertainment, Magic Squares | ||
Index | About the Author |
8.0 Magic Squares (8 x 8)
8.1 Pan Magic Squares, General
8.1.1 Analytic Solution
A Magic Square for which all rows, columns and all diagonals sum to the same constant is normally referred to as a Pan Magic Square.
As the numbers a(i), i = 1 ... 64, in all rows, columns and diagonals sum to the same constant this results for Pan Magic Squares in following linear
equations:
a( 1) + a( 2) + a( 3) + a( 4) + a( 5) + a( 6) + a( 7) + a( 8) = s1
Or in matrix representation:
which can be reduced, by means of row and column manipulations, and results in following linear equations: a(57) = s1 - a(58) - a(59) - a(60) - a(61) - a(62) - a(63) - a(64) a(49) = s1 - a(50) - a(51) - a(52) - a(53) - a(54) - a(55) - a(56) a(41) = s1 - a(42) - a(43) - a(44) - a(45) - a(46) - a(47) - a(48) a(33) = s1 - a(34) - a(35) - a(36) - a(37) - a(38) - a(39) - a(40) a(25) = s1 - a(26) - a(27) - a(28) - a(29) - a(30) - a(31) - a(32) a(23) = 3 * s1 - a(24) - a(25) - a(30) - 2 * a(31) - 2 * a(32) - a(33) + a(35) + a(36) - a(38) - 2 * a(39) + - 2 * a(40) - a(41) + a(43) + a(44) - a(46) - 2 * a(47) - 2 * a(48) - a(49) - a(54) - 2 * a(55) + - 2 * a(56) - a(63) - a(64) a(22) = 2 * s1 + a(24) + a(25) - a(29) - a(30) + a(32) - a(35) - 2 * a(36) - 2 * a(37) - 2 * a(38) - a(39) + - a(43) - 2 * a(44) - 2 * a(45) - 2 * a(46) - a(47) + a(49) - a(53) - a(54) + a(56) - a(62) + a(64) a(21) = s1 - a(24) + a(26) + a(27) - a(37) - a(38) - a(39) - a(40) - a(45) - a(46) - a(47) - a(48) + + a(50) + a(51) - a(61) - a(64) a(20) = a(21) - a(23) + a(24) + a(25) - a(27) - a(36) + a(40) - a(44) + a(48) + a(49) - a(51) + - a(60) + a(61) - a(63) + a(64) a(19) = s1 - a(24) + a(29) + a(30) - a(33) - a(34) - a(35) - a(40) - a(41) - a(42) - a(43) - a(48) + + a(53) + a(54) - a(59) - a(64) a(18) = s1 - a(21) + a(31) + a(32) - a(34) - a(35) - a(36) - a(37) - a(42) - a(43) - a(44) - a(45) + + a(55) + a(56) - a(58) - a(61) a(17) = s1 - a(18) - a(19) - a(20) - a(21) - a(22) - a(23) - a(24) a(16) = - s1/2 - a(23) - a(24) - a(30) - a(31) - a(32) + a(33) + a(34) + a(35) + a(36) + a(41) + a(42) + + a(43) + a(49) + a(50) + a(57) a(15) = a(16) - a(22) + a(24) - a(29) + a(32) - a(36) + a(40) - a(43) + a(48) - a(50) + a(56) + - a(57) + a(64) a(14) = a(16) + a(17) - a(21) + a(26) - a(28) - a(42) + a(44) - a(49) + a(53) + a(62) - a(64) a(13) = a(15) - a(20) + a(24) + a(25) - a(27) - a(41) + a(43) + a(52) - a(56) + a(61) - a(63) a(12) = a(14) - a(19) + a(23) - a(26) + a(32) + a(42) - a(48) + a(51) - a(55) + a(60) - a(62) a(11) = a(13) - a(18) + a(22) - a(25) + a(31) + a(41) - a(47) + a(50) - a(54) + a(59) - a(61) a(10) = a(12) - a(17) + a(21) + a(30) - a(32) - a(46) + a(48) + a(49) - a(53) + a(58) - a(60) a( 9) = s1 - a(10) - a(11) - a(12) - a(13) - a(14) - a(15) - a(16) a( 8) = s1 - a(16) - a(24) - a(32) - a(40) - a(48) - a(56) - a(64) a( 7) = s1 - a(15) - a(23) - a(31) - a(39) - a(47) - a(55) - a(63) a( 6) = s1 - a(14) - a(22) - a(30) - a(38) - a(46) - a(54) - a(62) a( 5) = s1 - a(13) - a(21) - a(29) - a(37) - a(45) - a(53) - a(61) a( 4) = s1 - a(12) - a(20) - a(28) - a(36) - a(44) - a(52) - a(60) a( 3) = s1 - a(11) - a(19) - a(27) - a(35) - a(43) - a(51) - a(59) a( 2) = s1 - a(10) - a(18) - a(26) - a(34) - a(42) - a(50) - a(58) a( 1) = s1 - a( 2) - a( 3) - a( 4) - a( 5) - a( 6) - a( 7) - a( 8)
However the solutions can only be obtained by guessing a(24), a(26) ... a(32), a(34) ... a(40), a(42) ... a(48),
a(50) ... a(56) and a(58) ... a(64) and filling out these guesses in the abovementioned equations.
0 < a(i) =< 64 for i = 1, 2, ... 23, 25, 33, 41, 49, 57
which can be incorporated in a guessing routine, which might be used to generate - if not all - at least collections of 8th order squares with distinct integers within a reasonable time.
8.1.2 Further Analysis, Matrix Operation
Rather than trying to find solutions based on the equations deducted in section 8.1.1 above, the construction method described in section 13.4 will be used as a starting point for the generation of 8th order Pan Magic Squares.
As illustrated in section 13.4 an individual Pan Magic Square of order 8 can be constructed by means of following method:
Which can be realized by means of an Excel spreadsheet as shown below: |
The 384 possible solutions, generated with routine MgcSqr8a within 86,5 seconds, are shown in Attachment 8.1.4 and further referred to as Collection {B}.
The generation of all possible order 8 Most Perfect Magic Squares (64 * 46080 = 2949120) will be discussed in Section 8.5.5.
|
Index | About the Author |