Office Applications and Entertainment, Magic Squares | ||
Index | About the Author |
8.4 Franklin Squares, Bent Diagonals
Following well known Magic Square was constructed by Benjamin Franklin:
The square has been constructed based on following properties:
The properties described in section 8.4.1 above result in following linear equations for a Franklin Square of the 8th order.
The numbers of the main bent diagonals and all the bent diagonals parallel to it sum to the Magic Constant:
a( 1) + a(10) + a(19) + a(28) + a(36) + a(43) + a(50) + a(57) = s1
Every 2 × 2 sub square sums to half the Magic Constant:
a(i) + a(i+1) + a(i+ 8) + a(i+ 9) = s1/2 with 1 =< i < 56 and i ≠ 8*n for n = 1, 2 ... 7
The resulting number of equations can be written in the matrix representation as:
which can be reduced, by means of row and column manipulations, and results in following set of linear equations:
a(61) = 0.5 * s1 - a(62) - a(63) - a(64)
The solutions can be obtained by guessing a(24), a(32), a(48), a(56), a(59), a(60) and a(62) ... a(64)
and filling out these guesses in the abovementioned equations.
0 < a(i) =< 64 for i = 1, 2, ... 23, 25 ... 31, 33 ... 47, 49 ... 55, 57, 58 and 61
With a(64) = 17 and a(63) = 32, an optimized guessing routine (MgcSqr8f), produced 3840 Franklin Squares within 634 seconds, which are shown in Attachment 8.4.2.
The total number of order 8 Franklin Squares (8 * 1.105.920) has been determined in 2006
by Daniel Schindel, Mathes Rempel and Peter Lody (ref. Proceedings of the Royal Society 2006).
A more appropriate routine - in which after the corner points a(64), a(57), a(8) and a(1) the remaining variables are calculated - can be developed.
a( 1) = 0.5 * s1 - a( 8) - a(57) - a(64) a(61) = 0.5 * s1 - a(62) - a(63) - a(64) a(59) = 0.5 * s1 - a(62) - a(57) - a(64) a(58) = -a(60) + a(62) + a(64) a(55) = 0.5 * s1 - a(56) - a(63) - a(64) a(54) = a(56) - a(62) + a(64) a(53) = - a(56) + a(62) + a(63) a(52) = a(56) - a(60) + a(64) a(51) = - a(56) + a(62) + a(57) a(50) = a(56) + a(60) - a(62) a(49) = 0.5 * s1 - a(56) - a(57) - a(64) a(47) = - a(48) + a(63) + a(64) a(46) = a(48) + a(62) - a(64) a(45) = 0.5 * s1 - a(48) - a(62) - a(63) a(44) = a(48) + a(60) - a(64) a(43) = 0.5 * s1 - a(48) - a(62) - a(57) a(42) = a(48) - a(60) + a(62) a(41) = - a(48) + a(57) + a(64) a(40) = 0.5 * s1 - a(48) - a(56) - a(64) a(39) = a(48) + a(56) - a(63) a(38) = 0.5 * s1 - a(48) - a(56) - a(62) a(37) = -0.5 * s1 + a(48) + a(56) + a(62) + a(63) + a(64) a(36) = 0.5 * s1 - a(48) - a(56) - a(60) a(35) = -0.5 * s1 + a(48) + a(56) + a(62) + a(57) + a(64) a(34) = 0.5 * s1 - a(48) - a(56) + a(60) - a(62) - a(64) a(33) = a(48) + a(56) - a(57) a(31) = - a(32) + a(63) + a(64) a(30) = a(32) + a(62) - a(64) a(29) = 0.5 * s1 - a(32) - a(62) - a(63) a(28) = a(32) + a(60) - a(64) a(27) = 0.5 * s1 - a(32) - a(62) - a(57) a(26) = a(32) - a(60) + a(62) a(25) = - a(32) + a(57) + a(64) a(24) = 0.5 * s1 - a(48) - a( 8) - a(64) a(23) = a(48) - a(63) + a( 8) a(22) = 0.5 * s1 - a(48) - a(62) - a( 8) a(21) = -0.5 * s1 + a(48) + a(62) + a(63) + a(8) + a(64) a(20) = 0.5 * s1 - a(48) - a(60) - a( 8) a(19) = -0.5 * s1 + a(48) + a(62) + a( 8) + a(57) + a(64) a(18) = 0.5 * s1 - a(48) + a(60) - a(62) - a(8) - a(64) a(17) = a(48) + a( 8) - a(57) a(16) = - a(32) + a(48) + a(64) a(15) = a(32) - a(48) + a(63) a(14) = - a(32) + a(48) + a(62) a(13) = 0.5 * s1 + a(32) - a(48) - a(62) - a(63) - a(64) a(12) = - a(32) + a(48) + a(60) a(11) = 0.5 * s1 + a(32) - a(48) - a(62) - a(57) - a(64) a(10) = - a(32) + a(48) - a(60) + a(62) + a(64) a( 9) = a(32) - a(48) + a(57) a( 7) = 0.5 * s1 - a(63) - a( 8) - a(64) a( 6) = - a(62) + a( 8) + a(64) a( 5) = a(62) + a(63) - a( 8) a( 4) = - a(60) + a( 8) + a(64) a( 3) = a(62) - a( 8) + a(57) a( 2) = a(60) - a(62) + a( 8)
The solutions can be obtained by guessing the 8 parameters:
a(i) for i = 32, 48, 56, 60, 62, 63, 8, 57, 64
and filling out these guesses in the abovementioned equations.
a(64) < a(57), a(8), a(1)
can be incorporated (MgcSqr8f1).
368.640 Pan Magic Franklin Squares (Most Perfect) A breakdown of all (Unique) Franklin Squares and the related processor time (green) as a function of a(64) is shown in the graph below:
A dedicated routine for Pan Magic Franklin Squares has been developed and discussed in Section 8.5.3 and returned the same result as mentioned above
(368.640 = 2.949.120 / 8).
As mentioned in section 8.4.1 above, the fourth property (the four corner numbers together with the four middle numbers sum to the Magic Constant) is a consequence of the fifth property ( every 2 × 2 sub square sums to half the Magic Constant).
|
A(8,8)
|
A(6,8)
|
A(4,8)
|
A(2,8)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A(8,6)
|
A(6,6)
|
A(4,6)
|
A(2,6)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A(8,4)
|
A(6,4)
|
A(4,4)
|
A(2,4)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A(8,2)
|
A(6,2)
|
A(4,2)
|
A(2,2) = B(8,8)
|
This and comparable patterns can be translated (with wrap-around) in either direction.
In section 12.1 Pan Magic Squares of the 12th order will be treated, which are constructed by Barink.
The resulting number of equations can be written in the matrix representation as:
which can be reduced, by means of row and column manipulations, and results in following set of linear equations:
a(61) = 0.5 * s1 - a(62) - a(63) - a(64)
The solutions can be obtained by guessing a(32), a(48), a(56), a(60) and a(62) ... a(64)
and filling out these guesses in the abovementioned equations.
0 < a(i) =< 64 for i = 1, 2, ... 31, 33 ... 47, 49 ... 55, 57, 58, 59 and 61
With a(64) = 17 and a(63) = 40 an optimized guessing routine (MgcSqr8f2), produced 480 Franklin Squares with Barink Restrictions within 56 seconds, which are shown in Attachment 8.4.4.
The linear equations deducted above, have been applied in following Excel Spread Sheets:
Only the red figures have to be “guessed” to construct one of the applicable Franklin Squares of the 8th order (wrong solutions are obvious).
|
Index | About the Author |