Office Applications and Entertainment, Magic Squares | ||
Index | About the Author |
6.0 Magic Squares (6 x 6)
Magic squares of order 6 can be represented as follows:
For Pan Magic Squares the numbers a(i), i = 1 ... 36, in all rows, columns, main and broken diagonals should sum to the same constant, which results in following linear equations:
a( 1) + a( 2) + a( 3) + a( 4) + a( 5) + a( 6) = s1
which can be reduced, by means of row and column manipulations, to:
a(31) = s1 - a(32) - a(33) - a(34) - a(35) - a(36) a(25) = s1 - a(26) - a(27) - a(28) - a(29) - a(30) a(19) = s1 - a(20) - a(21) - a(22) - a(23) - a(24) a(17) = 2/3 * s1 - a(18) + a(20) + a(21) - a(23) - a(24) + a(26) + a(27) - a(29) - a(30) - a(35) - a(36) a(16) = 2 * s1 + a(18) - a(20) - 2*a(21) - 2*a(22) - a(23) - a(26) - 2*a(27) - 2*a(28) - a(29) - a(34) + a(36) a(15) = 2/3 * s1 - a(18) - a(33) - a(36) a(14) = a(18) - a(20) - a(21) + a(23) + a(24) - a(26) - a(27) + a(29) + a(30) - a(32) + a(36) a(13) = -4/3 * s1 - a(18) + a(20) + 2*a(21) + 2*a(22) + a(23) + a(26) + 2*a(27) + 2*a(28) + a(29) - a(31) - a(36) a(12) = 11/6 * s1 - a(20) - a(21) - a(22) - a(26) - 2*a(27) - a(28) - a(32) - a(33) - a(34) a(11) = -7/6 * s1 + a(22) + a(23) + a(24) - a(26) + a(28) + a(29) + a(30) + a(34) + a(35) + a(36) a(10) = -7/6 * s1 + a(21) + a(22) + a(23) - a(25) + a(27) + a(28) + a(29) + a(33) + a(34) + a(35) a(9) = -7/6 * s1 + a(20) + a(21) + a(22) + a(26) + a(27) + a(28) - a(30) + a(32) + a(33) + a(34) a(8) = 11/6 * s1 - a(22) - a(23) - a(24) - a(28) - 2*a(29) - a(30) - a(34) - a(35) - a(36) a(7) = 11/6 * s1 - a(21) - a(22) - a(23) - a(27) - 2*a(28) - a(29) - a(33) - a(34) - a(35) a(6) = -5/6 * s1 - a(18) + a(20) + a(21) + a(22) - a(24) + a(26) + 2*a(27) + a(28) - a(30)+a(32)+a(33)+a(34)-a(36) a(5) = 1/2 * s1 + a(18) + a(19) + a(24) - a(27) - a(28) - a(29) - a(34) - a(35) a(4) = 1/6 * s1 - a(18) + a(20) + a(21) - a(28) - a(29) - a(30) + a(31) + a(32) a(3) = 1/2 * s1 + a(18) - a(20) - 2*a(21) - a(22) - a(26) - 2*a(27) - a(28) + a(30) + a(31) + a(35) + 2*a(36) a(2) = 1/6 * s1 - a(18) + a(21) + a(22) - a(25) - a(26) - a(30) + a(34) + a(35) a(1) = 1/2 * s1 + a(18) + a(23) + a(24) - a(25) - a(26) - a(27) - a(31) - a(32)
Although the linear equations shown above can be solved for any magic constant s1, it is obvious that no solution can be found for the consecutive integers {1 ... 36}, as the related magic constant s1 = 111 is odd.
Solutions for non consecutive integers, resulting in other magic constants, will be discussed in Section 6.09.
6.2 Analytic Solution, Simple Magic Squares
For solutions with consecutive integers we moderate the definition to all rows, columns and main diagonals sum to the same constant, which results in following linear equations:
a( 1) + a( 2) + a( 3) + a( 4) + a( 5) + a( 6) = s1 which can be reduced, by means of row and column manipulations, to: |
a(31) = s1 - a(32) - a(33) - a(34) - a(35) - a(36) a(25) = s1 - a(26) - a(27) - a(28) - a(29) - a(30) a(19) = s1 - a(20) - a(21) - a(22) - a(23) - a(24) a(13) = s1 - a(14) - a(15) - a(16) - a(17) - a(18) a(11) = + a(12) - a(16) + a(18) - a(21) + a(24) - a(26) + a(30) - a(31) + a(36) a( 8) = {- a( 9) - a(10) - 2*a(11) - a(14) - 2*a(15) - 2*a(16) - a(17) + 2*a(19) + a(20) + a(23) + 2*a(24) + 2*a(25) + a(27) + a(28) + 2*a(30)}/2 a( 7) = a( 8) - a(13) + a(15) - a(19) + a(22) - a(25) + a(29) - a(31) + a(36) a( 6) = s1 - a(11) - a(16) - a(21) - a(26) - a(31) a( 5) = s1 - a(11) - a(17) - a(23) - a(29) - a(35) a( 4) = s1 - a(10) - a(16) - a(22) - a(28) - a(34) a( 3) = s1 - a( 9) - a(15) - a(21) - a(27) - a(33) a( 2) = s1 - a( 8) - a(14) - a(20) - a(26) - a(32) a( 1) = s1 - a( 8) - a(15) - a(22) - a(29) - a(36)
The linear equations shown above are ready to be solved, for the magic constant 111.
0 < a(i) =< 36 for i = 1, 2, ... 8, 11, 13, 19, 25
which can be incorporated in a guessing routine, which can be used to generate - if not all - at least collections of 6th order squares with distinct integers within a reasonable time (MgcSqr6b).
With the highlighted variables constant, above mentioned guessing routine (MgcSqr6b), produced 856 Simple Magic Squares of the 6th order within 56 minutes, which are shown in Attachment 6.5.1.
A much faster routine - in which after the bottom row, first the main diagonals and afterward the remaining rows and columns are calculated -
can be developed.
a(31) = s1 - a(32) - a(33) - a(34) - a(35) - a(36)
The solutions can be obtained by guessing the 23 parameters:
a(36) is the smallest of all integers in the two main diagonals
can be incorporated (MgcSqr6a).
The total number of order 6 Simple Magic Squares has been determined in July 2023 by Hidetoshi Mino (Japan).
6.3 Transformations and Standard Positions
For simple magic squares, related squares can be found by means of rotation and/or reflection (ref. Attachment 6.5.2).
Based on this set of transformations and the eight squares which can be found by means of rotation and/or reflection any 6th order simple magic square corresponds with a Class of 8 * 24 = 192 magic squares
(ref. Attachment 6.5.6).
6.3b Standard Positions
Standard Position of Unique Magic Squares
Each of the 8 orientations (aspects) can be considered to be the same Unique Magic Square.
a(36) < a(31), a(6), a(1)
Standard position of Essential Different Magic Squares
Two different Unique Magic Squares are called Essential Different, if it is not possible
to transform one square into the other square by means of the transformations described above.
a(36) is the smallest of all integers in the two main diagonals
An example of a square in standard position - with the main diagonals highlighted - is shown in (ref. Attachment 6.5.6).
|
Index | About the Author |