Office Applications and Entertainment, Magic Squares

Vorige Pagina Volgende Pagina Index About the Author

6.10   Magic Squares, Rectangular Compact

6.10.1 Introduction

In Section 2.4 the property ‘Compact’ has been introduced as: Each 2 x 2 Sub Square sums to 4 * s1 / n.

For Magic Squares of order 6 this property could only be applied in combination with non consecutive integers (ref. Section 6.09).

For order 6 Magic Squares, Rectangular Compact can be defined as: Each 2 x 3 Sub Rectangle sums to the Magic Sum.

6.10.2 Partly Rectangular Compact

A Magic Square can be referred to as Partly Rectangular Compact, when only the six non overlapping Sub Rectangles (2 x 3) sum to the Magic Sum:

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)

a(26)

a(27)

a(28)

a(29)

a(30)

a(31)

a(32)

a(33)

a(34)

a(35)

a(36)


This results in following additional equations:

a( 1) + a( 2) + a( 3) + a( 7) + a( 8) + a( 9) = s1
a( 4) + a( 5) + a( 6) + a(10) + a(11) + a(12) = s1
a(13) + a(14) + a(15) + a(19) + a(20) + a(21) = s1
a(16) + a(17) + a(18) + a(22) + a(23) + a(24) = s1
a(25) + a(26) + a(27) + a(31) + a(32) + a(33) = s1
a(28) + a(29) + a(30) + a(34) + a(35) + a(36) = s1

which can be added to the equations describing a Simple Magic Square of the sixth order (ref. Section 6.2).

The resulting Partly Rectangular Compact Magic Square is described by following set of linear equations:

a(31) =   s1 - a(32) - a(33) - a(34) - a(35) - a(36)
a(28) =   s1 - a(29) - a(30) - 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(16) =   s1 - a(17) - a(18) - a(22) - a(23) - a(24)
a(13) =   s1 - a(14) - a(15) - a(16) - a(17) - a(18)
a(11) = 4*s1 + a(12) + a(17) + 2*a(18) - 2*a(19) - 2*a(20) - 3*a(21) - a(22) - a(23) - 2*a(25) +
                             - 3*a(26) - 2*a(27) - a(28) - a(29) - 3*a(31) - 2*a(32) - 2*a(33) - a(34) - a(35)
a( 8) =  (- a( 9) - a(10) - 2*a(12) - a(14) - 2*a(15) - a(17) - 2*a(18) + 2*a(19) + a(20) + 2*a(21) + 
                                    + a(23) + 2*a(25) + 2*a(26) + a(27) + a(28) + 2*a(31) - 2*a(36))/2
a( 7) =   s1 - a( 8) - a( 9) - a(10) - a(11) - a(12)
a( 6) =   s1 - a(12) - a(18) - a(24) - a(30) - a(36)
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( 7) - a(13) - a(19) - a(25) - a(31)

The linear equations shown above are ready to be solved, for the magic constant s1 = 111.

However the solutions can only be obtained by guessing:

      a(9), a(10), a(12), a(14), a(15), a(17), a(18), a(20) .. a(24), a(26), a(27), a(29), a(30) and a(32) .. a(36)

and filling out these guesses in the abovementioned equations.

With an optimized guessing routine (MgcSqr6102) and careful variation of the independent variables, numerous Magic Squares can be produced, of which a few are shown in Attachment 6.10.2.

6.10.3 Rectangular Compact

A Magic Square is Rectangular Compact when all 2 x 3 Sub Rectangles sum to the Magic Sum, which property is covered by following equations:

       Σ   a(i + j) = s1 with 1 =< i =< 28 and i ≠ 6 * n and i ≠ (6 * n - 1) for n = 1 ... 5
j = 0, 1, 2
    6, 7, 8

       Σ   a(i + j) = s1 with i = (6 * n - 1) for n = 1 ... 5
j = 0, 1, 2
    6, 7,-4

       Σ   a(i + j) = s1 with i = 6 * n       for n = 1 ... 5
j = 0, 1, 2
    6,-5,-4

       Σ   a(i + j) = s1 with i = 1 ... 4
j = 0, 1, 2
   30,31,32

a(1) + a(5) + a(6) + a(31) + a(35) + a(36) = s1
a(1) + a(2) + a(6) + a(31) + a(32) + a(36) = s1

which can be added to the equations describing a Simple Magic Square of the sixth order (ref. Section 6.2).

The resulting Rectangular Compact Magic Square is described by following set of linear equations:

a(31) =      s1 - a(32) - a(33) - a(34) - a(35) - a(36)
a(28) =      s1 - a(29) - a(30) - a(34) - a(35) - a(36)
a(27) =           a(30) - a(33) + a(36)
a(26) =           a(29) - a(32) + a(35)
a(25) =          -a(29) - a(30) + a(32) + a(33) + a(34)
a(22) =         - a(23) - a(24) + a(34) + a(35) + a(36)
a(21) =           a(24) + a(33) - a(36)
a(20) =           a(23) + a(32) - a(35)
a(19) =      s1 - a(23) - a(24) - a(32) - a(33) - a(34)
a(16) =      s1 - a(17) - a(18) - a(34) - a(35) - a(36)
a(15) =           a(18) - a(33) + a(36)
a(14) =           a(17) - a(32) + a(35)
a(13) =           a(17) - a(18) + a(32) + a(33) + a(34)
a(12) =  7*s1/3 - a(17) - 2 * a(18) - a(30) - 2 * a(32) - 2 * a(34) - a(35) - 4 * a(36)
a(11) =    s1/3 - a(29)
a(10) = -8*s1/3 + a(17) + 2 * a(18) + a(29) + a(30) + 2 * a(32) + 3 * a(34) + 2 * a(35) + 5 * a(36)
a( 9) =  7*s1/3 - a(17) - 2 * a(18) - a(30) - 2 * a(32) + a(33) - 2 * a(34) - a(35) - 5 * a(36)
a( 8) =    s1/3 - a(29) + a(32) - a(35)
a( 7) = -5*s1/3 + a(17) + 2 * a(18) + a(29) + a(30) + a(32) - a(33) + a(34) + a(35) + 4 * a(36)
a( 6) = -4*s1/3 + a(17) + a(18) - a(24) + 2 * a(32) + 2 * a(34) + a(35) + 3 * a(36)
a( 5) =  2*s1/3 - a(17) - a(23) - a(35)
a( 4) =  5*s1/3 - a(18) + a(23) + a(24) - 2 * a(32) - 3 * a(34) - a(35) - 4 * a(36)
a( 3) = -4*s1/3 + a(17) + a(18) - a(24) + 2 * a(32) - a(33) + 2 * a(34) + a(35) + 4 * a(36)
a( 2) =  2*s1/3 - a(17) - a(23) - a(32)
a( 1) =  2*s1/3 - a(18) + a(23) + a(24) - a(32) + a(33) - a(34) - 3 * a(36)

The solutions can be obtained by guessing:

      a(17), a(18), a(23), a(24), a(29), a(30) and a(32) .. a(36)

and filling out these guesses in the abovementioned equations.

With an optimized guessing routine (MgcSqr6103) numerous Rectangular Compact Magic Squares can be produced.

Attachment 6.10.3 shows the first occuring Rectangular Compact Magic Squares for a(36) = i (i = 1 ... 36).

Following consequential symmetry is worth to be noticed:

      a( 8) = s1 / 3 - a(26)
      a(11) = s1 / 3 - a(29)

and the reason that order 6 Rectangular Compact Magic Squares can't be Diagonal Symmetric.

Squares Nr. 4, 5, 6 and 13 are Rectangular Compact, Axial Symmetric as discussed in following Section.

6.10.4 Rectangular Compact, Axial Symmetric

Although Rectangular Compact Magic Squares can't be Diagonal Symmetric they can be Axial Symmetric.

When the equations defining Axial Symmetry as illustrated below:


are added to the equations describing a Rectangular Compact Magic Square of the sixth order (Section 6.10.3), the resulting Magic Square is described by following set of linear equations:

a(31) =   s1 - a(32) - a(33) - a(34) - a(35) - a(36)
a(28) =   s1 - a(29) - a(30) - a(34) - a(35) - a(36)
a(27) =        a(30) - a(33) + a(36)
a(26) =        a(29) - a(32) + a(35)
a(25) =      - a(29) - a(30) + a(32) + a(33) + a(34)
a(23) = - s1 - 2 * a(24) + 2 * a(32) + 2 * a(34) + a(35) + 4 * a(36)
a(22) =   s1 + a(24) - 2 * a(32) - a(34) - 3 * a(36)
a(21) =        a(24) + a(33) - a(36)
a(20) = - s1 - 2 * a(24) + 3 * a(32) + 2 * a(34) + 4 * a(36)
a(19) = 2*s1 + a(24) - 3 * a(32) - a(33) - 3 * a(34) - a(35) - 4 * a(36)

a(18) = s1/3 - a(24)
a(17) = s1/3 - a(23)
a(16) = s1/3 - a(22)
a(15) = s1/3 - a(21)
a(14) = s1/3 - a(20)
a(13) = s1/3 - a(19)

a(12) = s1/3 - a(30)
a(11) = s1/3 - a(29)
a(10) = s1/3 - a(28)
a( 9) = s1/3 - a(27)
a( 8) = s1/3 - a(26)
a( 7) = s1/3 - a(25)

a(6) = s1/3 - a(36)
a(5) = s1/3 - a(35)
a(4) = s1/3 - a(34)
a(3) = s1/3 - a(33)
a(2) = s1/3 - a(32)
a(1) = s1/3 - a(31)

The solutions can be obtained by guessing:

      a(24), a(29), a(30) and a(32) .. a(36)

and filling out these guesses in the abovementioned equations.

An optimized guessing routine (MgcSqr6104), produced 17248 Rectangular Compact Axial Symmetric Magic Squares within 3,8 hours, of which the first occuring for a(36) = i (i = 1 ... 36) are shown in Attachment 6.10.4.

6.10.5 Rectangular Compact, Row Symmetric, Pan Magic
       (Non Consecutive Integers)

When the equations defining Row Symmetry as illustrated below:


are added to the equations describing a Rectangular Compact Magic Square of the sixth order (Section 6.10.3), the resulting Magic Square can be described by following set of linear equations:

a(32) =  s1/2 - a(34) - a(36)
a(31) =  s1/2 - a(33) - a(35)
a(28) =  s1   - a(29) - a(30) - a(34) - a(35) - a(36)
a(27) =         a(30) - a(33) + a(36)
a(26) = -s1/2 + a(29) + a(34) + a(35) + a(36)
a(25) =  s1/2 - a(29) - a(30) + a(33) - a(36)
a(22) =       - a(23) - a(24) + a(34) + a(35) + a(36)
a(21) =         a(24) + a(33) - a(36)
a(20) =  s1/2 + a(23) - a(34) - a(35) - a(36)
a(19) =  s1/2 - a(23) - a(24) - a(33) + a(36)

a(18) = s1/3 - a(36)
a(17) = s1/3 - a(35)
a(16) = s1/3 - a(34)
a(15) = s1/3 - a(33)
a(14) = s1/3 - a(32)
a(13) = s1/3 - a(31)

a(12) = s1/3 - a(30)
a(11) = s1/3 - a(29)
a(10) = s1/3 - a(28)
a( 9) = s1/3 - a(27)
a( 8) = s1/3 - a(26)
a( 7) = s1/3 - a(25)

a(6) = s1/3 - a(24)
a(5) = s1/3 - a(23)
a(4) = s1/3 - a(22)
a(3) = s1/3 - a(21)
a(2) = s1/3 - a(20)
a(1) = s1/3 - a(19)

and appears to be Pan Magic as well.

The solutions require an even Magic Sum s1 and can be obtained by guessing:

      a(23), a(24), a(29), a(30) and a(33) .. a(36)

and filling out these guesses in the abovementioned equations.

The minimum Magic Sum s1 = 120 occurs for the range {i} = {1 ... 13, 15 ... 19, 21 ... 25, 27 ... 39}.

An optimized guessing routine (MgcSqr6105), produced 15552 Rectangular Compact Row Symmetric Pan Magic Squares within 17,5 minutess, of which the first occuring for a(36) = i are shown in Attachment 6.10.5.

6.10.6 Summary

The obtained results regarding the miscellaneous types of order 6 Rectangular Compact Magic Squares as deducted and discussed in previous sections are summarized in following table:

Type

Characteristics

Subroutine

Results

Simple

Non Overlapping Rectangles (2 x 3)

MgcSqr6102

Attachment 6.10.2

Rect. Compact

General

MgcSqr6103

Attachment 6.10.3

Axial Symmetric

MgcSqr6104

Attachment 6.10.4

Row   Symmetric, Pan Magic

MgcSqr6105

Attachment 6.10.5

Comparable routines as listed above, can be used to generate alternative types of order 6 Magic Squares, which will be defined in following sections.


Vorige Pagina Volgende Pagina Index About the Author