Office Applications and Entertainment, Magic Cubes

Vorige Pagina Volgende Pagina Index About the Author

6.0 Construction Methods (Higher Order)

6.1 Introduction


In previous sections several procedures were developed for sequential generation of Magic Cubes of order 3, 4 and 5, based on the linear equations describing subject Magic Cubes.

In the majority of the studied cases the solutions could only be obtained by considering the Quarternary and Quinary solutions of the applicable equations, due to the vast amount of independent variables.

For higher order Magic Cubes other methods are required, of which a few will be discussed in following sections.

6.2 Composition by means of Sub Cubes

Simple Magic Cube of order 9

Comparable with the method discussed in Section 9.8 of 'Magic Squares' it is possible to compose a 9th order Simple Magic Cube out of 27 Magic Cubes of order 3, each with 27 consecutive integers and corresponding Magic Sum.

The construction method can be summarised as follows:

  1. Construct a 9th order Magic Cube C Composed out of 27 identical 3th order Magic Sub Cubes Ci (i = 1 ... 27);
  2. Construct a 3th order Magic Cube B with elements bj (j = 1 ... 27);
  3. Replace each element cij of Sub Cube Ci by cij = cij + (bj - 1) * 27;
  4. The corresponding Magic Sums of the Sub Cubes will be 42 + 3 * (bj - 1) * 27 with j = 1 ... 27;
  5. The result will be a 9th order Simple Magic Cube with 729 consecutive integers and resulting Magic Sum 3285.

An example obtained by the method described above is shown in Attachment 6.2.1, together with Base Cube Ci and Multiplier Cube B.

With 192 possible cubes for both B and Ci (i = 1 ... 27), the resulting number of 9th order Magic Cubes with Magic Sum 3285 will be 192 * 19227 = 8,56 1063.

With procedure CnstrCbs9 it is possible to construct Simple Magic Cubes of order 9, by selecting in the head of the program, a Multiplier Cube B and 27 - not necessarily different - Base Cubes Ci (i = 1 ... 27) from an Excel Worksheet (ref. Attachment 6.2.3, line format).

An example constructed with this procedure is shown in Attachment 6.2.2 page 1, together with the selected Base Cubes Ci (i = 1 ... 27) and Multiplier Cube B (Attachment 6.2.2 page 2).

6.3   Composition by means of Factor Cubes

6.3.1 Introduction

The consecutive integers ci (i = 1 ... m3) of a Magic Cube C of order m with the values 1 ... m3 can be written as:

(ci - 1) = b1 + m * b2 + m2 * b3 with bj = 0, 1, 2, ... m - 1 for j = 1, 2, 3

Consequently any Magic Cube C of order m with the numbers 1 ... m3 can be written as:

C = B1 + m * B2 + m2 * B3 + [1]

where the matrices B1, B2 and B3 - further referred to as Factor Cubes - contain only the integers 0, 1, 2, 3 ... m - 1.

The construction methods described below are based on this principle.

6.3.2 Pantriagonal Magic Cubes

Associated Pantriagonal Magic Cubes (m = 2x + 1, m >= 5, m Mod 3 ≠ 0)

Based on a decomposition (ref. Attachment 6.3.1) of John Hendricks 7th order Associated Pantriagonal Cube (1973), procedure AssPntr21 could be built, which generates the Factor Cubes B1, B2, B3 and the resulting cube C.

The procedure returns:

  • Associated Pantriagonal Magic Cubes for m = 2x + 1, m >= 5, m Mod 3 ≠ 0 (ref. Attachment 6.3.2 for m = 5, 7, 11 and 13)
  • Associated Simple Magic Cubes for m = 2x + 1, m >= 5, m Mod 3 = 0 (ref. Attachment 6.3.3a for m = 3 and 9)

Associated Pantriagonal Magic Cubes (m = 2x + 1, m >= 5, m Mod 3 = 0)

To deal with orders m for which m Mod 3 = 0, Mitsutoshi Nakamura applies a transformation Sm,3(x), which transforms the Factor Cubes B1, B2 and B3 as generated by procedure AssPntr21, into Factor Cubes Sm,3(B1), Sm,3(B2) and Sm,3(B3) which result in Associated Pantriagonal Magic Cubes.

This function has been combined with abovementioned procedure and the resulting program AssPntr22 returns Associated Pantriagonal Magic Cubes for m = 2x + 1, m >= 5, m Mod 3 = 0 (ref. Attachment 6.3.3b for m = 9 and 15).

Attachment 6.3.5 shows for m = 9:

  • The Factor Cubes B1, B2, B3 and resulting Associated Simple Magic Cube C1;
  • The transformed Factor Cubes Sm,3(B1), Sm,3(B2), Sm,3(B3) and resulting Associated Pantriagonal Magic Cube C2.

Based on comparable principles, Mitsutoshi Nakamura developed - amongst others - methods to construct following types of Magic Cubes:

Associated Pantriagonal Magic Cubes (m = 4x)

This method has been incorporated in procedure AssPntr23 which generates the Factor Cubes and resulting Cube for the defined order.

Attachment 6.3.6 shows the results for m = 4, m = 8 and m = 12.

Non-associated Pantriagonal Magic Cubes, 2D-compact and Complete (m = 4x)

This method has been incorporated in procedure CnstrPntr4x which generates the Factor Cubes and resulting Cube for the defined order.

Attachment 6.3.4 shows the results for m = 4, m = 8 and m = 12.
The result for m = 4 is the Pantriagonal Magic Cube published by John Hendricks in 1972 (ref. Section 3.7).

More algorithms for higher order (single even) Associated Pantriagonal Magic Cubes are available on Mitsutoshi Nakamura's website regarding the subject.

6.3.3 Pandiagonal Magic Cubes (Odd)

Associated Pandiagonal Magic Cubes (m = 2x+1, m >= 7, gcd(m, 3 x 5) = 1)

This amazing simple method has been incorporated in procedure AssPanDia21 which generates the Factor Cubes and resulting Cube for the defined order.

Attachment 6.3.7 shows the results for m = 7, m = 11 and m = 13.

Note: The function gcd returns the highest common factor (greatest common divisor).

Associated Pandiagonal Magic Cubes (m = 2x+1, m >= 7, 1 < gcd(m, 3 x 5) < m)

To deal with orders m for which either m Mod 3 = 0 or m Mod 5 = 0 a transformation Sm,q(x), with q = gcd(m, 3 x 5), has been applied which transforms the Factor Cubes B1, B2 and B3 as generated by procedure AssPanDia21, into Factor Cubes Sm,q(B1), Sm,q(B2) and Sm,q(B3) which result in Associated Pandiagonal Magic Cubes.

This transformation, combined with abovementioned procedure in program AssPanDia22, returns Associated Pandiagonal Magic Cubes for m = 2x + 1, m >= 7, m Mod 3 = 0 or m Mod 5 = 0 (ref. Attachment 6.3.8 for m = 9 and 25).

Associated Pandiagonal Magic Cubes (m = 15)

For this particular case a transformation S15(x) = R3,5(x mod 3, x mod 5) - 1 has been applied, which transforms the Factor Cubes B1, B2 and B3 as generated by procedure AssPanDia21, into Factor Cubes S15(B1), S15(B2) and S15(B3) which result in an Associated Pandiagonal Magic Cube of order 15.

R3,5 is an Associated 3 x 5 Magic Rectangle, with center element c1 = 8, for which the rows, columns and center symmetric pairs sum to respectively 5 * c1, 3 * c1 and 2 * c1.

Based on the linear equations describing subject rectangle, 16 suitable rectangles can be found, which are shown in Attachment 6.3.9.

The Associated Pandiagonal Magic Cubes of order 15, generated with procedure AssPanDia23, which includes above described transformation, are shown in Attachment 6.3.10.

More algorithms for higher order even (Associated) Pandiagonal Magic Cubes are available on Mitsutoshi Nakamura's website regarding the subject.

6.3.5 Pandiagonal Pantriagonal Magic Cubes (Nasik, m = odd)

Nasik, Associated (m = 2x+1, m >= 9, gcd(m, 3x5x7) = 1)

This method has been incorporated in procedure AssNasik21 which generates the Factor Cubes and resulting Cube for the defined order.

Attachment 6.3.12 shows the results for m = 11, m = 13, m = 17 and m = 19.

Nasik, Associated (m = 2x+1, m >= 9, 1 < gcd(m, 3x5x7) < m)

This method applying a transformation Sm,q(x), with q = gcd(m, 3 x 5 x 7), which transforms the Factor Cubes as generated by procedure AssNasik21 into Factor Cubes Sm,q(B1), Sm,q(B2) and Sm,q(B3), has been incorporated in procedure AssNasik22 which generates the Factor Cubes and resulting Associated Nasik Magic Cubes for the defined order.

Attachment 6.3.13 shows the results for m = 9 and m = 25.

Nasik, Associated (m = 2x+1, m >= 9, and gcd(m, 3x5x7) = m )

In this case m = 15, m = 21, m = 35 or m = 105 a transformation Sm(x) has to be applied to transform the Factor Cubes B1, B2 and B3 as generated by procedure AssNasik21, into Factor Cubes Sm(B1), Sm(B2) and Sm(B3) which result in Associated Nasik Magic Cubes of order m.

The appropriate transformations, procedures, related Magic Rectangles (ref. Exhibit IV) and resulting Associated Nasik Magic Cubes are summarised below for the applicable order:

m

Sm

Procedure

Rectangles

Results

15

R3,5(x mod 3, x mod 5) - 1

AssNasik23a

Attachment 6.3.9

Attachment 6.3.14

21

R3,7(x mod 3, x mod 7) - 1

AssNasik23b

Attachment 6.3.15

Attachment 6.3.16

35

R5,7(x mod 5, x mod 7) - 1

AssNasik23c

Attachment 6.3.17

Attachment 6.3.18

105

R3,5,7(x mod 3, x mod 5, x mod 7) - 1

AssNasik23d

Attachment 6.3.19

Attachment 6.3.20


Note: Attachment 6.3.20 not available in HTML.

More algorithms for higher order even (Associated and/or 3D-Compact) Nasik Magic Cubes are available on Mitsutoshi Nakamura's website regarding the subject.

6.4 Knight Jump Method (m = prime, m >= 7)

Based on Euler's knight jump method Yoshi Tamori developed following algorithm to construct Pantriagonal Magic Cubes for prime orders m >= 7:

  1. Move the location by a knight jump, thus the unit vector of the movement is (1,2,0), if it's possible.
  2. If you fail the first movement, move the location by the rule in which the unit vector of the movement is (1,2,2).
  3. If you fail the first movement and the second movement above, move it by the unit vector (1,0,0).

The algorithm described above has been applied in following Interactive Solution (Java Script):



Procedure:

  1. Select the order m by means of the right selection button;

  2. Press the button ‘Construct’ to construct and visualise the resulting Pantriagonal Magic Cube.

The Script will only work when your browser supports Scripts and when the Script support option(s) is (are) enabled. You can view the results for m = 7, m = 11 and m = 13 in Attachment 6.4.1.

Each constructed Pantriagonal Magic Cube of order m belongs to a collection {Aijkm} of m3 * 48 elements which can be found by means of rotation, reflection or plane movements.


Vorige Pagina Volgende Pagina Index About the Author