Office Applications and Entertainment, Magic Squares

Vorige Pagina Volgende Pagina Index About the Author

5.5   Concentric and Eccentric Magic Squares

5.5.1 Concentric Magic Squares (1)

In general an odd Concentric Magic Square consists of a centre of one cell and an even Concentric Magic Square consists of a centre of 2 x 2 cells, around which borders can be constructed again and again.

A 5th order Concentric Magic Square consists of one Embedded Magic Square of the 3th order with one border around it.

a(1)

a(2)

a(3)

a(4)

a(5)

a(6)

a(7)

a(8)

a(9)

a(10)

a(11)

a(12)

a(13)

a(14)

a(15)

a(16)

a(17)

a(18)

a(19)

a(20)

a(21)

a(22)

a(23)

a(24)

a(25)

The Embedded Magic Square can be described by following linear equations:

a( 7) + a( 8) + a( 9) = 39
a(12) + a(13) + a(14) = 39
a(17) + a(18) + a(19) = 39

a(7) + a(12) + a(17) = 39
a(8) + a(13) + a(18) = 39
a(9) + a(14) + a(19) = 39

a(7) + a(13) + a(19) = 39
a(9) + a(13) + a(17) = 39

which can be added to the equations describing a Magic Square of the fifth order (Section 3.2), and result in following linear equations:

a(21) =  65 - a(22) - a(23) - a(24) - a(25)
a(17) =  39 - a(18) - a(19)
a(16) =  26 - a(20)
a(14) =  52 - a(18) - 2 * a(19)
a(13) =  13
a(12) =  26 - a(14)
a(11) =  26 - a(15)
a(10) =  39 - a(15) - a(20) + a(21) - a(25)
a( 9) =  26 - a(17)
a( 8) =  26 - a(18)
a( 7) =  26 - a(19)
a( 6) =  26 - a(10)
a( 5) =  26 - a(21)
a( 4) =  26 - a(24)
a( 3) =  26 - a(23)
a( 2) =  26 - a(22)
a( 1) =  26 - a(25)

Note: The Embedded Magic Square is based on the consecutive integers 9, 10, ... 17.

With the border variables constant, an optimized guessing routine (MgcSqr5d), produced eight Magic Squares within 0.36 seconds, which are shown in Attachment 5.5.1.

With the variables a(18) and a(19) constant, the same optimized guessing routine, produced 2880 Magic Squares within 4 minutes, which are shown in Attachment 5.5.2.

Consequently, the total number of Concentric Magic Squares of the 5th order will be 8 * 2880 = 23040.

It should be noted that much more Concentric Magic Squares can be generated with routine MgcSqr5d, when the base for the Embedded Magic Squares is not limited to the consecutive integers 9, 10, ... 17.

5.5.2 Concentric Magic Squares (2)

Alternatively the border of a 5th order Concentric Magic Square can be described by following equations:

a(22) = 65 - a(21) - a(23) - a(24) - a(25)
a(10) = 65 - a( 5) - a(15) - a(20) - a(25)

a( 5) = 26 - a(21)   a(16) = 26 - a(20)
a( 4) = 26 - a(24)   a(11) = 26 - a(15)
a( 3) = 26 - a(23)   a( 6) = 26 - a(10)
a( 2) = 26 - a(22)
a( 1) = 26 - a(25)

The resulting solutions will be unique when following conditions are added to the equations listed above:

a( 5) < a(21) < a(25), prevent rotation and reflection
a(22) < a(23) < a(24), prevent permutation of non corner variables
a(10) < a(15) < a(20)

An optimized guessing routine (MgcSqr5d2) produced, based on the integers 1 ... 8 and 18 ... 25, ten suitable unique borders within 0.36 seconds, which are shown in Attachment 5.5.6.

Consequently, the total number of borders will be 10 * 8 * (3!)2 = 2880 as found in Section 5.5.1 above.

Considerable more suitable unique borders can be generated based on the full integer range 1 ... 25 (excl. 13).

An alternative routine (MgcSqr5d3) produced, 605 Unique Concentric Magic Squares within 1,5 seconds, which are shown in Attachment 5.5.7.

The total number of Concentric Magic Squares will be 605 * 8 * (3!)2 * 8 = 1393920 (= 8 * 174240).

5.5.3 Eccentric Magic Squares

An Eccentric Magic Square, also referred to as Inlaid Magic Square, can be defined as a Magic Corner Square of order n, supplemented with two or more (i) rows and columns to a Magic Square of order (n + i).

A 5th order Eccentric Magic Square consists of one Magic Corner Square of the 3th order, supplemented with two rows and two columns.

a(1)

a(2)

a(3)

a(4)

a(5)

a(6)

a(7)

a(8)

a(9)

a(10)

a(11)

a(12)

a(13)

a(14)

a(15)

a(16)

a(17)

a(18)

a(19)

a(20)

a(21)

a(22)

a(23)

a(24)

a(25)

The Magic Corner Square can be described by following linear equations:

a(23) =  39 - a(24) - a(25)
a(20) =  52 - a(24) - 2 * a(25)
a(19) =  13
a(18) =  26 - a(20)
a(15) =  26 - a(23)
a(14) =  26 - a(24)
a(13) =  26 - a(25)

which can be combined with the equations describing a Magic Square of the 5th order (Section 3.2), and result in following linear equations:

a(23) =  39 - a(24) - a(25)
a(21) =  26 - a(22)
a(20) =  52 - a(24) - 2 * a(25)
a(19) =  13
a(18) =  26 - a(20)
a(16) =  26 - a(17)
a(15) =  26 - a(23)
a(14) =  26 - a(24)
a(13) =  26 - a(25)
a(11) =  26 - a(12)
a( 9) =  39 + a(10) - a(13) - a(17) - a(21)
a( 7) =  26 - 0.5 * a(8) - 0.5 * a(9) - 0.5 * a(10) - 0.5 * a(12) + 0.5 * a(16) + 0.5 * a(21)
a( 6) =  65 - a( 7) - a( 8) - a( 9) - a(10)
a( 5) =  26 - a(10)
a( 4) =  26 - a( 9)
a( 3) =  26 - a( 8)
a( 2) =  26 - a( 6)
a( 1) =  26 - a( 7)

Note: The Magic Corner Square is based on the consecutive integers 9, 10, ... 17.

The number of Eccentric Magic Squares is determined by the value of the key variable a(13), which is limited to the four values 10, 12, 14 and 16.

An optimized guessing routine (MgcSqr5e) produced for a(13) = 10, 12, 14 and 16 respectively 160, 224, 224 and 160 Eccentric Magic Squares within 140 seconds, which are summarised in Attachment 5.5.3.

As shown in Attachment 5.5.4 each Eccentric Magic Square is part of a collection of 8 Magic Squares, obtained by rotation and or reflection, for each value of the key variable a(13).

Consequently, the total number of Eccentric Magic Squares of the 5th order will be 8 * (2*160 + 2*224) / 2 = 3072.

It should be noted that much more Eccentric Magic Squares can be generated with routine MgcSqr5e, when the base for the Magic Corner Squares is not limited to the consecutive integers 9, 10, ... 17:

Unique Eccentric Magic Squares

With a(5) < a(21) subject routine produced 12416 unique Eccentric Magic Squares within 624 seconds, as summarised in the frequency characteristic shown above.

5.5.4 Spreadsheet Solutions

The linear equations deducted in previous sections for 5th order Concentric and Eccentric Magic Squares, have been applied in following Excel Spread Sheets:

Only the red figures have to be “guessed” to construct one of the applicable Magic Squares (wrong solutions are obvious).


Vorige Pagina Volgende Pagina Index About the Author