Office Applications and Entertainment, Magic Squares

Vorige Pagina Volgende Pagina Index About the Author

5.7   Magic Squares, Miscellaneous Inlays

5.7.1 Diamond Inlay General

When an embedded Magic Square is rotated 45 degrees, the embedded square is referred to as a Diamond Inlay.

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 3th order Diamond Inlay of a 5th order Magic Square can be described by following linear equations:

a( 3) + a( 7) + a(11) = 39
a( 9) + a(13) + a(17) = 39
a(15) + a(19) + a(23) = 39

a( 3) + a( 9) + a(15) = 39
a( 7) + a(13) + a(19) = 39
a(11) + a(17) + a(23) = 39

a( 3) + a(13) + a(23) = 39
a(11) + a(13) + a(15) = 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) =       s1 - a(22) - a(23) - a(24) - a(25)
a(17) = 0.8 * s1 - a(19) - 2 * a(23)
a(16) = 0.2 * s1 - a(18) - a(20) + 2 * a(23)
a(15) = 0.6 * s1 - a(19) - a(23)
a(13) = 0.2 * s1
a(12) = 0.4 * s1 - a(14)
a(11) = 0.4 * s1 - a(15)
a(10) =     - s1 + a(19) - a(20) + 2 * a(21) + a(22) + 2 * a(23) + a(24)
a( 9) = 0.4 * s1 - a(17)
a( 8) = 0.4 * s1 - a(18)
a( 7) = 0.4 * s1 - a(19)
a( 6) = 0.6 * s1 - a(10) + a(18) - 2 * a(23)
a( 5) = 0.4 * s1 - a(21)
a( 4) = 1.4 * s1 - a(14) - 2 * a(19) - 2 * a(23) - a(24)
a( 3) = 0.4 * s1 - a(23)
a( 2) = 0.8 * s1 - a(4) - a(22) - a(24)
a( 1) = 0.4 * s1 - a(25)

An optimized guessing routine (MgcSqr5g1), produced 8288 (= 8 * 1036) Magic Squares with Diamond Inlay within 240 seconds, of which the first 142 are shown in Attachment 5.6.1.

5.7.2 Diamond Inlay and Associated

When the equations describing the 3th order Diamond Inlay are added to the equations describing an Associated Magic Square of the fifth order (Section 5.4.1), following set of linear equations will result:

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

An optimized guessing routine (MgcSqr5g2), produced 496 Associated Magic Squares with Diamond Inlay within 42 seconds, which are shown in Attachment 5.6.2.

5.7.3 Concentric with Diamond Inlay

When the equations describing the 3th order Diamond Inlay are added to the equations describing an Concentric Magic Square of the fifth order (Section 5.5.1), following set of linear equations will result:

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

An optimized guessing routine (MgcSqr5g3), produced 2592 Concentric Magic Squares with Diamond Inlay within 62 seconds, of which the first 56 are shown in Attachment 5.6.3.

5.7.4 Square Inlay General

When a Magic Square is embedded in another Magic Square as shown below, the embedded square is referred to as a Square Inlay:

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 3th order Square Inlay of a 5th order Magic Square can be described by following linear equations:

a( 1) + a( 3) + a( 5) = 39
a(11) + a(13) + a(15) = 39
a(21) + a(23) + a(25) = 39

a(1) + a(11) + a(21) = 39
a(3) + a(13) + a(23) = 39
a(5) + a(15) + a(25) = 39

a(1) + a(13) + a(25) = 39
a(5) + a(13) + a(21) = 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(22) =  0.4 * s1 - a(24)
a(21) =        s1 - a(22) - a(23) - a(24) - a(25)
a(16) =        s1 - a(17) - a(18) - a(19) - a(20)
a(15) = -0.4 * s1 + 2 * a(21) + a(23)
a(13) =  0.2 * s1
a(12) =  0.4 * s1 - a(14)
a(11) =             a(13) - a(21) + a(25)
a(10) =  0.4 * s1 - a(20)
a( 9) =  0.4 * s1 - a(17)
a( 8) =  0.4 * s1 - a(18)
a( 7) =  0.4 * s1 - a(19)
a( 6) =  0.4 * s1 - a(16)
a( 5) =        s1 - a(10) - a(15) - a(20) - a(25)
a( 4) =        s1 - a( 9) - a(14) - a(19) - a(24)
a( 3) =        s1 - a( 8) - a(13) - a(18) - a(23)
a( 2) =        s1 - a( 7) - a(12) - a(17) - a(22)
a( 1) =        s1 - a( 6) - a(11) - a(16) - a(21)

An optimized guessing routine (MgcSqr5g4), counted 1393920 (= 8 * 174240) Magic Squares with Square Inlay within 236 seconds, of which the first 552 are shown in Attachment 5.6.4.

5.7.5 Square and Diamond Inlay

When the equations describing the 3th order Square Inlay are added to the equations describing an Magic Square of the fifth order with Diamond Inlay (Section 5.6.1), following set of linear equations will result:

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

With the option 'Check Diamond Inlay' enabled, 1440 Magic Squares with Square and Diamond Inlay could be produced within 85 seconds with procedure MgcSqr5g4, of which the first 360 are shown in Attachment 5.6.5.

5.7.6 Spreadsheet Solutions

The linear equations deducted in previous sections for 5th order 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).

5.8   Summary, Enumeration

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

Type

Subroutine

Results

Total Number

Remarks

Classic Magic

MgcSqr5a2

Attachment 3.4.1

8 * 275305224

Walter Trump

Pan Magic

MgcSqr5a

Attachment 5.2.6

28800

-

Associated

MgcSqr5c2

Attachment 5.4.2

388352

-

Ultra Magic

MgcSqr5c

Attachment 5.4.1

128

-

Cocentric

MgcSqr5d

Attachment 5.5.1
Attachment 5.5.2

23040

Note 1

Eccentric

MgcSqr5e

Attachment 5.5.3
Attachment 5.5.4

3072

Note 2

Magic/Diamond Inlay

MgcSqr5g1

Attachment 5.6.1

8288

-

Associated/Diamond Inlay

MgcSqr5g2

Attachment 5.6.2

496

-

Concentric/Diamond Inlay

MgcSqr5g3

Attachment 5.6.3

2592

-

Magic/Square Inlay

MgcSqr5g4

Attachment 5.6.4

1393920

-

Magic/Square + Diamond Inlay

MgcSqr5g4

Attachment 5.6.5

1440

-

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

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


Vorige Pagina Volgende Pagina Index About the Author