Office Applications and Entertainment, Magic Squares

Vorige Pagina Volgende Pagina Index About the Author

17.0   Special Magic Squares, ZigZag

17.1   Introduction

When a Magic Square contains repeated wave type patterns (see below) summing to the Magic Sum s1, it is called a V type ZigZag Magic Square.

Top/Bottom
o - o - o
- o - o -
- - - - -
- - - - -
- - - - -
Left/Right
o - - - -
- o - - -
o - - - -
- o - - -
o - - - -


As illustrated above the repetition can be in the directions:

- Top / Bottom with wrap around and reverse
- Left / Right with wrap around and reverse

If one of these options occurs, the Magic Square is referred to as a Two Way V type ZigZag Magic Square.

If both options are applicable, the Magic Square is referred to as a Four Way V type ZigZag Magic Square.
Such squares occur only for orders larger than 5.

Although for higher order Magic Squares other wave type patterns are possible, only Two and Four Way V type ZigZag Magic Squares will be discussed in following sections.

17.2   Magic Squares (4 x 4)
       Two Way, V type ZigZag

When the equations defining the horizontal V type ZigZag property for a fourth order Magic Square:

a( 1) + a( 6) + a( 3) + a( 8) = s1
a( 5) + a(10) + a( 7) + a(12) = s1
a( 9) + a(14) + a(11) + a(16) = s1
a(13) + a( 2) + a(15) + a( 4) = s1

are added to the equations describing a Simple Magic Square of the fourth order (ref. Section 2.2), the resulting Two Way V type ZigZag Magic Square is described by following set of linear equations:

a(11) =  s1 - a(12) -   a(15) - a(16)
a( 7) = -s1 + a( 8) + 2*a(12) + a(15) + a(16)
a( 4) =  s1 - a( 8) -   a(12) - a(16)
a( 3) =  s1 - a( 8) -   a(12) - a(15)

a(14) = 0.5 * s1 - a(16)        a(9) = 0.5 * s1 - a(11)
a(13) = 0.5 * s1 - a(15)        a(5) = 0.5 * s1 - a( 7)
a(10) = 0.5 * s1 - a(12)        a(2) = 0.5 * s1 - a( 4)
a( 6) = 0.5 * s1 - a( 8)        a(1) = 0.5 * s1 - a( 3)

The consequential symmetry (Column Symmetrical) is worth to be noticed and complies with Dudeney Group 5.

The solutions can be obtained by guessing a(16), a(15), a(12) and a(8) and filling out these guesses in the equations shown above.

An optimized guessing routine (ZigZag4) produced 384 (96 unique) Two Way V type ZigZag Magic Squares within 7,5 seconds, which are shown in Attachment 17.01.

17.3   Magic Squares (5 x 5)
       Two Way, V type ZigZag

When the equations defining the horizontal V type ZigZag property for a fifth order Magic Square:

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

are added to the equations describing a Simple Magic Square of the fifth order (ref. Section 3.2), the resulting Two Way V type ZigZag Magic Square is described by following set of linear equations:

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

The consequential symmetry (Columns 2 - 4) is worth to be noticed and the reason that Two Way V type ZigZag Magic Squares of the fifth order can't be Associated or Pan Magic.

The solutions can be obtained by guessing a(23) - a(25), a(19) - a(20), a(13) - a(15) and a(10) and filling out these guesses in the equations shown above.

A very fast guessing routine (ZigZag5) counted 214272 ( = 4 * 53568) Two Way V type ZigZag Magic Squares within half an hour, of which the first occurring solutions for a(25) = i (i = 1 ... 25) are shown in Attachment 17.02.

17.4   Magic Squares (6 x 6)
       (Non Consecutive Integers)


17.4.1 Two Way V type ZigZag

When the equations defining the horizontal V type ZigZag property for a sixth order Magic Square:

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

are added to the equations describing a Simple Magic Square of the sixth order (ref. Section 6.2), the resulting Two Way V type ZigZag Magic Square is described by following set of linear equations:

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

which require an even Magic Sum s1. Consequently possible solutions can only be found for Non Consecutive Integers.

It appears that Rectangular Compact, Row Symmetric, Pan Magic Squares are Two Way, V type ZigZag (ref. Section 6.10.5).

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

The total number of subject Rectangular Compact, Row Symmetric, Pan Magic Squares is 15552, of which the first occurring solutions for a(36) = i are shown in Attachment 6.10.5.

17.4.2 Four Way V type ZigZag

When, together with the equations defining the horizontal V type ZigZag property, the equations defining the vertical V type ZigZag property for a sixth order Magic Square:

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

are added to the equations describing a Pan Magic Square of the sixth order (ref. Section 6.1), the resulting Four Way V type ZigZag Pan Magic Square can be described - after deduction - by following set of linear equations:

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

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

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

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

which illustrate the consequential symmetry (complete).

The solutions can be obtained by guessing a(36) ... a(33) and a(30) ... a(27) and filling out these guesses in the equations shown above.

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

An optimized guessing routine (ZigZag6) produced 82944 Four Way V type ZigZag Magic Squares within 2 hours, of which the first occurring for a(36) = i are shown in Attachment 17.03.

17.4.3 Construction Method

Four Way V type ZigZag Magic Square of order 6 can be constructed by transformation of Composed Magic Squares (ref. Section 6.09.8).

Following Composed Magic Squares can be used:

A1 Attachment 6.10.8a, Pan Magic Complete Magic Squares, Composed of Anti Symmetric Semi Magic Sub Squares
A2 Attachment 6.10.8b, Associated Magic Squares, Composed of Anti Symmetric Semi Magic Sub Squares

and will return respectively:

Four Way V type ZigZag Crosswise Symmetric Magic Squares B1 as illustrated below for s1 = 120:

A1 (PM Complete)
27 29 4 18 34 8
31 12 17 35 10 15
2 19 39 7 16 37
22 6 32 13 11 36
5 30 25 9 28 23
33 24 3 38 21 1
B1 (Cross Symm)
27 18 29 34 4 8
22 13 6 11 32 36
31 35 12 10 17 15
5 9 30 28 25 23
2 7 19 16 39 37
33 38 24 21 3 1

Each suitable set of Anti Symmetric Semi Magic Sub Squares corresponds with 8 * 122 = 1152 Prime Number Four Way V type ZigZag Crosswise Symmetric Magic Squares of order 6.

Four Way V type ZigZag Associated Magic Squares B2 as illustrated below for s1 = 120:

A2 (Associated)
27 29 4 8 34 18
31 12 17 15 10 35
2 19 39 37 16 7
33 24 3 1 21 38
5 30 25 23 28 9
22 6 32 36 11 13
B2 (Associated)
27 8 29 34 4 18
33 1 24 21 3 38
31 15 12 10 17 35
5 23 30 28 25 9
2 37 19 16 39 7
22 36 6 11 32 13

Each suitable set of Anti Symmetric Semi Magic Sub Squares corresponds with 8 * 122 = 1152 Prime Number Four Way V type ZigZag Associated Magic Squares of order 6.

Notes:
For the Crosswise Symmetric Magic Squares B1 also half of the Broken Diagonals sum to the Magic Sum.
For the Associated Magic Squares B2 also the Semi Diagonals sum to the Magic Sum.

17.5   Magic Squares (7 x 7)

Although Two and Four Way V type ZigZag Simple Magic Squares of order 7 do exist, following sections are limited to seventh order Ultra and Associated Magic Squares.

17.5.1 Two Way V type ZigZag

When the equations defining the horizontal V type ZigZag property for a seventh order Magic Square:

a( 1) + a( 9) + a( 3) + a(11) + a( 5) + a(13) + a( 7) = s1
a( 8) + a(16) + a(10) + a(18) + a(12) + a(20) + a(14) = s1
a(15) + a(23) + a(17) + a(25) + a(19) + a(27) + a(21) = s1
a(22) + a(30) + a(24) + a(32) + a(26) + a(34) + a(28) = s1
a(29) + a(37) + a(31) + a(39) + a(33) + a(41) + a(35) = s1
a(36) + a(44) + a(38) + a(46) + a(40) + a(48) + a(42) = s1
a(43) + a( 2) + a(45) + a( 4) + a(47) + a( 6) + a(49) = s1

are added to the equations describing an Ultra Magic Square of the seventh order (ref. Section 7.3), the resulting Two Way V type ZigZag Ultra Magic Square is described by following set of linear equations:

a(44) =  3*s1/7 - a(46) - a(48)
a(43) =  4*s1/7 - a(45) - a(47) - a(49)
a(38) =    s1/7 - a(40) + a(45) - a(46) + a(47)
a(37) =  3*s1/7 - a(39) - a(41)
a(36) =  3*s1/7 - a(42) - a(45) + a(46) - a(47)
a(35) =  6*s1/7 - a(41) - a(42) - a(47) - a(48) - a(49)
a(34) = 12*s1/7 - a(39) - a(40) - 2 * a(41) - a(42) + a(45) - 2 * a(46) - a(47) - 3 * a(48) - a(49)
a(33) = 10*s1/7 - a(39) - 2 * a(40) - a(41) + a(45) - 2 * a(46) - a(47) - 2 * a(48) - a(49)
a(32) =  2*s1/7 - a(45) + a(46) - a(47)
a(31) =- 5*s1/7 + 2 * a(40) + a(41) - 2 * a(45) + 2 * a(46) + 2 * a(48) + a(49)
a(30) =-11*s1/7 + a(39) + a(40) + 2 * a(41) + a(42) + a(46) + 2 * a(47) + 3 * a(48) + a(49)
a(29) =-   s1   + a(39) + a(41) + a(42) + a(45) + 2 * a(47) + a(48) + a(49)
a(28) =- 5*s1/7 + a(39) + 2 * a(41) - a(45) + a(46) + a(47) + 2 * a(48)
a(27) =-16*s1/7 + a(39) + 2 * a(40) + 2 * a(41) + 2 * a(42) - a(45) + 2*a(46) + 3*a(47) + 4*a(48) + 2*a(49)
a(26) =-13*s1/7 + a(39) + 2 * a(40) + 2 * a(41) - a(45) + 3 * a(46) + a(47) + 4 * a(48) + 2*a(49)
a(25) =    s1/7

a(24) = 2*s1/7- a(26)
a(23) = 2*s1/7- a(27)
a(22) = 2*s1/7- a(28)
a(21) = 2*s1/7- a(29)
a(20) = 2*s1/7- a(30)
a(19) = 2*s1/7- a(31)

a(18) = 2*s1/7- a(32)
a(17) = 2*s1/7- a(33)
a(16) = 2*s1/7- a(34)
a(15) = 2*s1/7- a(35)
a(14) = 2*s1/7- a(36)
a(13) = 2*s1/7- a(37)

a(12) = 2*s1/7- a(38)
a(11) = 2*s1/7- a(39)
a(10) = 2*s1/7- a(40)
a( 9) = 2*s1/7- a(41)
a( 8) = 2*s1/7- a(42)
a( 7) = 2*s1/7- a(43)

a(6) = 2*s1/7- a(44)
a(5) = 2*s1/7- a(45)
a(4) = 2*s1/7- a(46)
a(3) = 2*s1/7- a(47)
a(2) = 2*s1/7- a(48)
a(1) = 2*s1/7- a(49)

The solutions can be obtained by guessing a(49) ... a(45) and a(42) ... a(39) and filling out these guesses in the equations shown above.

Attachment 17.04 shows the first occurring solutions for a(49) = i (i = 1 ... 49; i ≠ 25), found with an optimized guessing routine (ZigZag7a) within ca. 7 hours.

17.5.2 Four Way V type ZigZag

It can be proven that seventh order Four Way V type ZigZag Ultra Magic Square don't exist.

However seventh order Associated Magic Squares with Square Inlays of Order 3 and 4 - as deducted and discussed in Section 7.6.3 - are Four Way V type ZigZag.

An optimized guessing routine (MgcSqr7j2) produced, with both the 3th and 4th order Square Inlays constant, 2560 Associated Magic Squares within 130 seconds, of which the first 48 are shown in Attachment 7.7.3.

An alternative method to find subject squares, based on transformation of Composed Magic Squares, has been discussed in Section 7.8.1.

17.6   Magic Squares (8 x 8)
       Four Way V type ZigZag

17.6.1 Double Order Method, General

Magic Squares of order 8 can be constructed by means of the Double Order method as introduced by L.S. Frierson (1910).

This method, quite comparable with the Medjig Method as discussed in Section 8.3, is based on the application of one of following 2 x 2 Sub Squares:

1

4

2

3

1

4

3

2

2

3

1

4

3

2

1

4

2

3

4

1

3

2

4

1

4

1

2

3

4

1

3

2

to construct Magic Squares of order 2n, based on Magic Squares of order n, as follows:

  • Select a 4 x 4 Magic Square A with symmetric or complete diagonals;
  • Select one of the 2 x 2 Sub Squares s1 and determine the mirrored (vertical axes) aspect s2;
  • Construct an intermediate 8 x 8 Square B by replacing a(i) with s1 for a(i) = 1 ... 8 and s2 for a(i) = 9 ... 16;
  • Calculate the 8 x 8 Magic Square C with the formula c(j) =(a(i)-1)*4 + b(j).

A numerical example is shown below:

A (4 x 4)
14 11 5 4
7 2 16 9
12 13 3 6
1 8 10 15
B (8 x 8)
4 1 4 1 1 4 1 4
3 2 3 2 2 3 2 3
1 4 1 4 4 1 4 1
2 3 2 3 3 2 3 2
4 1 4 1 1 4 1 4
3 2 3 2 2 3 2 3
1 4 1 4 4 1 4 1
2 3 2 3 3 2 3 2
C (8 x 8)
56 53 44 41 17 20 13 16
55 54 43 42 18 19 14 15
25 28 5 8 64 61 36 33
26 27 6 7 63 62 35 34
48 45 52 49 9 12 21 24
47 46 51 50 10 11 22 23
1 4 29 32 40 37 60 57
2 3 30 31 39 38 59 58
s1

1

4

2

3

s2

4

1

3

2

The resulting 8 x 8 Magic Square is Four Way V type ZigZag and for the example shown above Pan Magic and Complete.

The applicable additional properties depend from the selected 4 x 4 Magic Square A and will be discussed in detail in following sections.

17.6.2 Double Order Method, Pan Magic Base Square A

The Pan Magic Squares A can be selected from Attachment 1 (384 ea) as deducted and discussed in Section 2.1.

Following 3 Squares can be used as a possible base for all 384 Pan Magic Squares (ref. Attachment 5.1.1):

Base Square 1:
12 13 3 6
7 2 16 9
14 11 5 4
1 8 10 15
Base Square 2:
12 13 2 7
6 3 16 9
15 10 5 4
1 8 11 14
Base Square 3:
14 11 2 7
4 5 16 9
15 10 3 6
1 8 13 12

as none of these squares can be obtained by means of rotation, reflection, row or column shift performed on one of the others.

The three Four Way V type ZigZag Magic Squares which can be constructed based on the first 2 x 2 Sub Square and the Base Squares shown above correspond each with a collection of 512 Magic Squares.

The 1536 resulting Magic Squares include the ones which can be constructed based on the 384 Pan Magic Squares as listed in Attachment 1.

All 1536 Four Way V type ZigZag Magic Squares - constructed based on order 4 Pan Magic Squares - are Pan Magic, Complete and Compact (4 x 4).

Solutions 17.6.21 shows for each of the three Base Squares shown above, the eight related Four Way V type ZigZag Magic Squares while applying different 2 x 2 Sub Squares (ref. DblOrder8).

17.6.3 Double Order Method, Associated Base Square A

When 48 ea unique Associated Magic Squares A are selected from Attachment 2.5 - as deducted and discussed Section 2.3 – 384 Four Way V type ZigZag Magic Squares are returned, while applying the eight different 2 x 2 Sub Squares.

Although for these squares the Semi Diagonals sum to the Magic Sum, none of these Four Way V type ZigZag Magic Squares is Associated or Pan Magic.

17.6.4 Medjig Method, Pan Magic Base Square A

In Section 8.3.3 the Medjig Method has been used to construct Pan Magic Complete Squares of order 8.

The Medjig method of constructing Four Way V type ZigZag Pan Magic Complete Squares of order 8 is as follows:

  • Select a 4 x 4 Pan Magic Square A, e.g. one of the Base Squares shown in Section 17.6.2 above;
  • Select a 4 x 4 Four Way V type ZigZag Pan Magic Complete Medjig Square B;
  • Construct the 8 x 8 Four Way V type ZigZag Pan Magic Complete Square C with the formula c(j) = a(i) + 16 * b(j).

A numerical example is shown below:

A (4 x 4)

12 13 3 6
7 2 16 9
14 11 5 4
1 8 10 15

Medjig Square B (4 x 4)

3 2 1 0 2 3 0 1
1 0 3 2 0 1 2 3
2 3 0 1 3 2 1 0
0 1 2 3 1 0 3 2
1 0 3 2 0 1 2 3
3 2 1 0 2 3 0 1
0 1 2 3 1 0 3 2
2 3 0 1 3 2 1 0

C (8 x 8)

60 44 29 13 35 51 6 22
28 12 61 45 3 19 38 54
39 55 2 18 64 48 25 9
7 23 34 50 32 16 57 41
30 14 59 43 5 21 36 52
62 46 27 11 37 53 4 20
1 17 40 56 26 10 63 47
33 49 8 24 58 42 31 15

As mentioned in Section 8.7.5, a collection of 640000 Quaternary Pan Magic Complete Squares could be generated with procedure Quat869

This collection contains 40 Medjig Squares suitable for the construction of Four Way V type ZigZag Pan Magic Complete Squares, which are shown in Attachment 17.6.45.

The related Four Way V type ZigZag Pan Magic Complete Squares, based on the Pan Magic Square A shown in the example above, are shown in Attachment 17.6.46.

All resulting Four Way V type ZigZag Pan Magic Complete Squares (384 * 40 = 15360) are 4 x 4 Compact.

17.6.5 Medjig Method, Associated Base Square A

In Section 8.3.4 the Medjig Method has been used to construct Associated Magic Squares of order 8.

The Medjig method of constructing Associated Four Way V type ZigZag Magic Squares of order 8 is as follows:

  • Select a 4 x 4 Associated Magic Square A (ref. Attachment 2.5);
  • Select a 4 x 4 Associated Four Way V type ZigZag Medjig Square B;
  • Construct the 8 x 8 Associated Four Way V type ZigZag Magic Square C with the formula c(j) = a(i) + 16 * b(j).

A numerical example is shown below:

A (4 x 4)

16 9 5 4
3 6 10 15
2 7 11 14
13 12 8 1

Medjig Square B (4 x 4)

3 2 3 2 0 1 0 1
1 0 1 0 2 3 2 3
0 1 0 1 3 2 3 2
2 3 2 3 1 0 1 0
3 2 3 2 0 1 0 1
1 0 1 0 2 3 2 3
0 1 0 1 3 2 3 2
2 3 2 3 1 0 1 0

C (8 x 8)

64 48 57 41 5 21 4 20
32 16 25 9 37 53 36 52
3 19 6 22 58 42 63 47
35 51 38 54 26 10 31 15
50 34 55 39 11 27 14 30
18 2 23 7 43 59 46 62
13 29 12 28 56 40 49 33
45 61 44 60 24 8 17 1

Associated Four Way V type ZigZag Medjig Squares can be generated with procedure Quat867z which:

- generates the Associated Medjig Squares and
- checks the horizontal and vertical V type ZigZag property (ref. Section 17.6.7 below).

Subject routine generated 192 Associated Four Way V type ZigZag Medjig Squares within 22,9 seconds, of which the first 48 are shown in Attachment 17.6.43.

The related Associated Four Way V type ZigZag Magic Squares, based on the Associated Square A shown in the example above, are shown in Attachment 17.6.44.

As explained in Section 8.3.4 the Medjig Method is not suitable to construct Ultra Magic Squares of order 8.

17.6.6 Ultra Magic Squares

When the equations defining the horizontal and vertical V type ZigZag property for an eighth order Magic Square, as listed in Section 17.6.7 below, are added to the equations describing an Ultra Magic Square (ref. Section 8.6.2), the resulting Two Way V type ZigZag Ultra Magic Square is defined by following set of linear equations:

a(58) =  0.5 * s1 - a(60) - a(62) - a(64)
a(57) =  0.5 * s1 - a(59) - a(61) - a(63)
a(48) =  0.5 * s1 - a(55) - a(62) - a(64)
a(45) =  0.5 * s1 - a(54) - a(61) - a(63)
a(43) = -0.5 * s1 + 2 * a(54) + a(56) - a(59) + a(61) + 2 * a(63)
a(38) = -0.5 * s1 + a(54) + a(56) + a(61) + 2 * a(63)
a(34) =  0.5 * s1 - a(54) - a(56) + a(59) - a(61) - a(63)
a(42) =      - s1 + a(53) + 2 * a(55) + a(60) + 3 * a(62) + 2 * a(64)
a(39) = -0.5 * s1 + a(53) + a(55) + 2 * a(62) + a(64)
a(35) =        s1 - a(53) - a(55) - a(60) - 2 * a(62) - 2 * a(64)
a(50) =  0.5 * s1 - a(52) - a(54) - a(56)
a(47) =        s1 - a(52) - 2 * a(54) - 2 * a(56) + a(59) - a(61) - 2 * a(63)
a(41) = -0.5 * s1 + a(52) + a(54) + a(56) + a(61) + a(63)
a(40) =             a(52) + a(54) - a(59)
a(36) =  0.5 * s1 - a(52) - a(54) - a(63)
a(49) =  0.5 * s1 - a(51) - a(53) - a(55)
a(46) =        s1 + a(51) - a(53) - a(55) - a(60) - 3 * a(62) - 2 * a(64)
a(44) =           - a(51) + a(62) + a(64)
a(37) =           - a(51) - a(53) + a(60) + a(62) + a(64)
a(33) =             a(51) + a(53) - a(62)

a(32) = s1/4 - a(33)
a(31) = s1/4 - a(34)
a(30) = s1/4 - a(35)
a(29) = s1/4 - a(36)
a(28) = s1/4 - a(37)
a(27) = s1/4 - a(38)
a(26) = s1/4 - a(39)
a(25) = s1/4 - a(40)

a(24) = s1/4 - a(41)
a(23) = s1/4 - a(42)
a(22) = s1/4 - a(43)
a(21) = s1/4 - a(44)
a(20) = s1/4 - a(45)
a(19) = s1/4 - a(46)
a(18) = s1/4 - a(47)
a(17) = s1/4 - a(48)

a(16) = s1/4 - a(49)
a(15) = s1/4 - a(50)
a(14) = s1/4 - a(51)
a(13) = s1/4 - a(52)
a(12) = s1/4 - a(53)
a(11) = s1/4 - a(54)
a(10) = s1/4 - a(55)
a( 9) = s1/4 - a(56)

a(8) = s1/4 - a(57)
a(7) = s1/4 - a(58)
a(6) = s1/4 - a(59)
a(5) = s1/4 - a(60)
a(4) = s1/4 - a(61)
a(3) = s1/4 - a(62)
a(2) = s1/4 - a(63)
a(1) = s1/4 - a(64)

The solutions can be obtained by guessing a(64) ... a(59) and a(56) ... a(51) and filling out these guesses in the equations shown above.

Attachment 17.6.61 shows miscellaneous solutions, found with an optimized guessing routine (ZigZag8) by means of randomly selection of a(59) ... a(64).

While permutating the variables of the bottom lines numerous additional solutions could be found within a reasonable time (54776 ea).

17.6.7 Bimagic Squares

The 136244 Essential Different Bimagic Squares of order eight, as published by Walter Trump and Francis Gaspalou (April 2014), can be stored in a database (Bimagic8).

When the equations defining the horizontal V type ZigZag property for an eighth order Magic Square:

s(1) = a( 1) + a(10) + a( 3) + a(12) + a( 5) + a(14) + a( 7) + a(16)
s(2) = a( 9) + a(18) + a(11) + a(20) + a(13) + a(22) + a(15) + a(24)
s(3) = a(17) + a(26) + a(19) + a(28) + a(21) + a(30) + a(23) + a(32)
s(4) = a(25) + a(34) + a(27) + a(36) + a(29) + a(38) + a(31) + a(40)
s(5) = a(33) + a(42) + a(35) + a(44) + a(37) + a(46) + a(39) + a(48)
s(6) = a(41) + a(50) + a(43) + a(52) + a(45) + a(54) + a(47) + a(56)
s(7) = a(49) + a(58) + a(51) + a(60) + a(53) + a(62) + a(55) + a(64)
s(8) = a(57) + a( 2) + a(59) + a( 4) + a(61) + a( 6) + a(63) + a( 8)

are incorporated in a Query (ReadDb8z2) in order to find Bimagic Squares with the specified property, 756 Two Way V type ZigZag Bimagic Squares of order 8 can be found.

When the equations defining the vertical V type ZigZag property:

s( 9) = a(1) + a(10) + a(17) + a(26) + a(33) + a(42) + a(49) + a(58)
s(10) = a(2) + a(11) + a(18) + a(27) + a(34) + a(43) + a(50) + a(59)
s(11) = a(3) + a(12) + a(19) + a(28) + a(35) + a(44) + a(51) + a(60)
s(12) = a(4) + a(13) + a(20) + a(29) + a(36) + a(45) + a(52) + a(61)
s(13) = a(5) + a(14) + a(21) + a(30) + a(37) + a(46) + a(53) + a(62)
s(14) = a(6) + a(15) + a(22) + a(31) + a(38) + a(47) + a(54) + a(63)
s(15) = a(7) + a(16) + a(23) + a(32) + a(39) + a(48) + a(55) + a(64)
s(16) = a(8) + a( 9) + a(24) + a(25) + a(40) + a(41) + a(56) + a(57)

are added to this Query no results will be returned. So the collection does not contain Four Way V type ZigZag Bimagic Squares.

However when a comprehensive Query (ReadDb8z4) checks all 192 possible transformations of each available Essential Different Bimagic Square, 144 Unique Four Way V type ZigZag Bimagic Squares can be found of which 96 Associated.

Attachment 17.6.41 shows the 96 Associated Four Way V type ZigZag Bimagic Squares.

Attachment 17.6.42 shows the remaining 48 Four Way V type ZigZag Bimagic Squares.

17.6.8 Transformation of Composed Magic Squares

Four Way V type ZigZag Magic Squares of order 8 can be constructed by transformation of Composed Magic Squares (ref. Section 22.1).

A self explanatory numerical example is shown below (Pan Magic Sub Squares):

A
4 5 59 62 12 13 51 54
57 64 2 7 49 56 10 15
6 3 61 60 14 11 53 52
63 58 8 1 55 50 16 9
20 21 43 46 28 29 35 38
41 48 18 23 33 40 26 31
22 19 45 44 30 27 37 36
47 42 24 17 39 34 32 25
B
4 12 5 13 59 51 62 54
20 28 21 29 43 35 46 38
57 49 64 56 2 10 7 15
41 33 48 40 18 26 23 31
6 14 3 11 61 53 60 52
22 30 19 27 45 37 44 36
63 55 58 50 8 16 1 9
47 39 42 34 24 32 17 25

If the 4 Sub Squares of Square A are Pan Magic, the resulting Square B will be Pan Magic, Complete and 4 x 4 Compact.

Each suitable set of Pan Magic Sub Squares corresponds with 24 * 3844 = 0,5 1012 Four Way V type ZigZag Pan Magic Squares of order 8.

17.7   Magic Squares (9 x 9)
       Four Way V type ZigZag

Associated Magic Squares of order 9 with Square Inlays of Order 4 and 5 - as deducted and discussed in Section 9.7.4 - are Four Way V type ZigZag.

Attachment 9.7.5 shows miscellaneous Associated Magic Squares with order 4 and 5 Square Inlays, based on transformation of Composed Magic Squares (Priem9f3).

17.8   Magic Squares (11 x 11)
       Four Way V type ZigZag

Associated Magic Squares of order 11 with Square Inlays of Order 5 and 6 - as deducted and discussed in Section 11.3.1 - are Four Way V type ZigZag.

Attachment 14.8.16 shows miscellaneous Associated Magic Squares with order 5 and 6 Square Inlays, based on transformation of Composed Magic Squares (Prime11c1).

17.9   Magic Squares (13 x 13)
       Four Way V type ZigZag

Associated Magic Squares of order 13 with Square Inlays of Order 6 and 7 - as deducted and discussed in Section 12.7.2 - are Four Way V type ZigZag.

Attachment 14.10.6 shows miscellaneous Associated Magic Squares with order 5 and 6 Square Inlays, based on transformation of Composed Magic Squares (Priem13c).

17.10  Summary

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

Order

Characteristics

Subroutine

Results

4

Two  Way V ZigZag

ZigZag4

Attachment 17.01

5

Two  Way V ZigZag

ZigZag5

Attachment 17.02

6

Two  Way V ZigZag,
Rect. Compact, Row Symm, Pan Magic

MgcSqr6105

Attachment 6.10.5

Four Way V ZigZag, Pan Magic, Complete

ZigZag6

Attachment 17.03

7

Two  Way V ZigZag, Ultra Magic

ZigZag7a

Attachment 17.04

Four Way V ZigZag, Associated, Inlaid

MgcSqr7j2

Attachment 7.7.3

8

Four Way V ZigZag, Pan Magic, Complete

DblOrder8

Attachment 17.6.21

8

Four Way V ZigZag, Pan Magic, Complete

Medjig8

Attachment 17.6.46

Four Way V ZigZag, Associated

Attachment 17.6.44

8

Four Way V ZigZag, Bimagic

ReadDb8z4

Attachment 17.6.42

Four Way V ZigZag, Bimagic, Associated

Attachment 17.6.41

8

Four Way V ZigZag, Ultra Magic

ZigZag8

Attachment 17.6.61

9

Four Way V ZigZag, Associated, Inlaid

Priem9f3

Attachment 9.7.5

11

Four Way V ZigZag, Associated, Inlaid

Prime11c1

Attachment 14.8.16

13

Four Way V ZigZag, Associated, Inlaid

Prime13c

Attachment 14.10.6

Comparable routines as listed above, can be used to generate Bent Diagonal Magic Squares, which will be described in following sections.


Vorige Pagina Volgende Pagina Index About the Author