Office Applications and Entertainment, Magic Squares

Vorige Pagina Volgende Pagina Index About the Author

5.5   Quadrant Magic Squares

The concept of Quadrant Magic Squares, as discussed in following sections for order 5 Magic Squares, was introduced by Harvey Heinz (2001/2002).

5.6.1 Definition and Terminology

An order 5 magic square can be divided into four overlapping quadrants of 3 x 3 cells.

Each quadrant might contain symmetric patterns of 5 cells (4 cells + the centre cell) which sum to the Magic Sum s1.

For order 5 magic squares two patterns can be recognised, as illustrated below:

Plus Magic
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)
Cross Magic
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)

further referred to as Plus Magic and Cross Magic Patterns.

An order 5 Magic Square is called Quadrant Magic if the same pattern occurs in all four quadrants.

5.6.2 Ultra Magic Squares

All order 5 Ulta Magic Squares (8 * 16) found in Section 5.4.2 are both Plus Magic and Cross Magic as illustrated for the 16 unique Ultra Magic Squares shown in Attachment 5.6.2.

5.6.3 Pan Magic Squares

When the formulas defining the Quadrant Plus property and the Quadrant Cross property:

a( 2) + a( 6) + a( 7) + a( 8) + a(12) = s1 Plus Magic
a( 4) + a( 8) + a( 9) + a(10) + a(14) = s1
a(12) + a(16) + a(17) + a(18) + a(22) = s1
a(14) + a(18) + a(19) + a(20) + a(24) = s1

a( 1) + a( 3) + a( 7) + a(11) + a(13) = s1 Cross Magic
a( 3) + a( 5) + a( 9) + a(13) + a(15) = s1
a(11) + a(13) + a(17) + a(21) + a(23) = s1
a(13) + a(15) + a(19) + a(23) + a(25) = s1

are added to the defining equations of an order 5 Pan Magic Square (ref. Section 3.1), the resulting Quadrant Magic Square is described by following equations:

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

which are the reduced equations of a Pan Magic Square as deducted in Section 3.3.

Consequently: All order 5 Pan Magic Square (8 x 3600) shown in Attachment 5.2.6 are both Plus Magic and Cross Magic.

5.6.4 Associated Magic Squares

Plus and Cross Magic

Alternatively the formulas defining the Quadrant Plus property and the Quadrant Cross property can be added to the defining equations of an order 5 Associated Magic Square (ref. Section 5.4.1).

The resulting Associated Quadrant Magic Square is described by following equations:

a(21) =        s1 - a(22) - a(23) - a(24) - a(25)
a(20) =  0.6 * s1 - a(24) - a(25)
a(19) =  0.6 * s1 + a(22) - a(23) - a(24) - a(25)
a(18) =  0.6 * s1 - a(22) - a(24)
a(17) = -0.4 * s1 + 2 * a(24) + a(25)
a(16) = -0.4 * s1 + a(23) + a(24) + a(25)
a(15) =  0.2 * s1 - a(22) + a(24)
a(14) = -0.8 * s1 + a(23) + 2 * a(24) + 2 * a(25)
a(13) =        s1 / 5

a(12) = 2*s1/5 - a(14)
a(11) = 2*s1/5 - a(15)
a(10) = 2*s1/5 - a(16)
a( 9) = 2*s1/5 - a(17)

a(8) = 2*s1/5 - a(18)
a(7) = 2*s1/5 - a(19)
a(6) = 2*s1/5 - a(20)
a(5) = 2*s1/5 - a(21)

a(4) = 2*s1/5 - a(22)
a(3) = 2*s1/5 - a(23)
a(2) = 2*s1/5 - a(24)
a(1) = 2*s1/5 - a(25)

which are the reduced equations of an Ultra Magic Square as deducted in Section 5.4.2.

Consequently: All order 5 Associatedl Magic Squares which are both Cross Magic and Plius Magic are Ultra Magic.

Plus Magic

When the formulas defining the Quadrant Plus property are added to the defining equations of an order 5 Associated Magic Square, the resulting Quadrant Magic Square is described by following equations:

a(21) =     s1     - a(22) - a(23) - a(24) - a(25)
a(18) = 3 * s1 / 5 - a(22) - a(24)
a(17) =     s1 / 5 - a(20) + a(24)
a(16) =     s1 / 5 - a(19) + a(22)
a(15) = 7 * s1 / 5 - a(19) - a(20) - a(23) - a(24) - 2 * a(25)
a(14) = 2 * s1 / 5 - a(19) - a(20) + a(22)
a(13) =     s1 / 5

a(12) = 2*s1/5 - a(14)
a(11) = 2*s1/5 - a(15)
a(10) = 2*s1/5 - a(16)
a( 9) = 2*s1/5 - a(17)

a(8) = 2*s1/5 - a(18)
a(7) = 2*s1/5 - a(19)
a(6) = 2*s1/5 - a(20)
a(5) = 2*s1/5 - a(21)

a(4) = 2*s1/5 - a(22)
a(3) = 2*s1/5 - a(23)
a(2) = 2*s1/5 - a(24)
a(1) = 2*s1/5 - a(25)

An optimized guessing routine (MgcSqr5d1), in which the relations ensuring unique magic squares:

     a(25) < a(21), a(5), a(1)
     a(21) < a(5)

have been incorporated, generated 487 unique Associated Quadrant Plus Magic Squares within 1,85 seconds, which are shown in Attachment 5.6.41.

Cross Magic

When the formulas defining the Quadrant Cross property are added to the defining equations of an order 5 Associated Magic Square, the resulting Quadrant Magic Square is described by following equations:

a(21) =      s1     - a(22) - a(23) - a(24) - a(25)
a(18) =  6 * s1 / 5 + a(19) - 2 * a(20) - 2 * a(22) + a(23) - 2 * a(24) - a(25)
a(17) =      s1 / 5 - a(19) + a(22) - a(23) + a(24)
a(16) = -2 * s1 / 5 - a(19) + a(20) + a(22) + a(24) + a(25)
a(15) =  4 * s1 / 5 - a(19) - a(23) - a(25)
a(14) =  2 * s1 / 5 - 2 * a(19) + 2 * a(22) - a(23)
a(13) =      s1 / 5

a(12) = 2*s1/5 - a(14)
a(11) = 2*s1/5 - a(15)
a(10) = 2*s1/5 - a(16)
a( 9) = 2*s1/5 - a(17)

a(8) = 2*s1/5 - a(18)
a(7) = 2*s1/5 - a(19)
a(6) = 2*s1/5 - a(20)
a(5) = 2*s1/5 - a(21)

a(4) = 2*s1/5 - a(22)
a(3) = 2*s1/5 - a(23)
a(2) = 2*s1/5 - a(24)
a(1) = 2*s1/5 - a(25)

An optimized guessing routine (MgcSqr5d2), in which the relations ensuring unique magic squares:

     a(25) < a(21), a(5), a(1)
     a(21) < a(5)

have been incorporated, generated 35 unique Associated Quadrant Cross Magic Squares within 1,2 seconds, which are shown in Attachment 5.6.42.

5.6.5 Sumple Magic Squares

Plus and Cross Magic

Finally the formulas defining the Quadrant Plus property and the Quadrant Cross property can be added to the defining equations of an order 5 Simple Magic Square (ref. Section 3.2.1).

The resulting Quadrant Magic Square is described by following equations:

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

which are the reduced equations of a Pan Magic Square as deducted in Section 3.3.

Consequently: All order 5 Magic Square which are both Cross Magic and Plius Magic are Pan Magic.

Plus Magic

When the formulas defining the Quadrant Plus property are added to the defining equations of an order 5 Simple Magic Square, the resulting Quadrant Magic Square is described by following equations:

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

Based on the equations shown above it can be proven that also the 3 x 3 center quadrant is Plus Magic as:

    a(8) + a(12) + a(13) + a(14) +a(18) = s1

An optimized guessing routine (MgcSqr5d4), in which the relations ensuring unique magic squares:

    a(25) < a(21), a(5), a(1)
    a(21) < a(5)

have been incorporated, generated - while excluding Associated and Pan Magic Squares - 14460 unique Quadrant Plus Magic Squares within 2916 seconds.

Attachment 5.6.52 shows the first occuring Quadrant Plus Magic Square for a(25) = 1 ... 14.

Cross Magic

When the formulas defining the Quadrant Cross property are added to the defining equations of an order 5 Simple Magic Square, the resulting Quadrant Magic Square is described by following equations:

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

Based on the equations shown above it can be proven that also the 3 x 3 center quadrant is Cross Magic as:

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

An optimized guessing routine (MgcSqr5d5), in which the relations ensuring unique magic squares:

    a(25) < a(21), a(5), a(1)
    a(21) < a(5)

have been incorporated, generated - while excluding Associated and Pan Magic Squares - 94492 unique Quadrant Cross Magic Squares within about 12 hrs.

Attachment 5.6.53 shows the first occuring Quadrant Cross Magic Square for a(25) = 1 ... 14.

5.6.6 Summary

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

Type

Characteristics

Subroutine

Results

Ultra Magic

Plus - and Cross Magic

-

Attachment 5.6.2

Associated

Plus  Magic

MgcSqr5d1

Attachment 5.6.41

Cross Magic

MgcSqr5d2

Attachment 5.6.42

Simple

Plus  Magic

MgcSqr5d4

Attachment 5.6.52

Cross Magic

MgcSqr5d5

Attachment 5.6.53

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


Vorige Pagina Volgende Pagina Index About the Author