Office Applications and Entertainment, Magic Squares Index About the Author

 15.0   Special Magic Squares, Bimagic Squares, Part 2 15.4   Bimagic Squares (9 x 9) In his book Magische Quadrate (Version 19, 2017), Holger Danielsson provides a detailed description of classical construction methods of Bimagic Squares of order 9. Following sections are adopted from a few of these descriptions and have been generalised were possible. 15.4.2 Victor Coccoz        (Based on Sudoku Comparable Squares) This method is based on the application of two Sudoku Comparable Squares (B1/B2) as shown below:
B1
 B C A D d M b a c a c b B A C d D M D M d a b c A B C b a c A C B M d D A B C d M D c b a d D M b c a C A B c b a C B A D M d M d D c a b B C A C A B M D d a c b
B2
 R n r Q p S q P s p Q S q s P n r R s q P n R r Q S p n r R S Q p P s q q P s r n R S p Q Q S p P q s r R n P s q R r n p Q S r R n p S Q s q P S p Q s P q R n r
 The resulting Square M1 = 9 * B1 + B2 + 1 will be Associated Magic if following conditions are fulfilled:       A + a = B + b = C + c = D + d = P + p = Q + q = R + r = S + s = 8       M = n = 4       A + B + C + d = a + b + c + D = 16       P + Q + R + S = p + q + r + s = 16 For the numbers {0, 1, ... , 8} this can be realised with the sub sets {0, 3, 6, 7} and {1, 2, 5, 8}, which ensures also that the Associated Square is Bimagic as:       0  + 3  + 6  + 7  = 1  + 2  + 5  + 8       02 + 32 + 62 + 72 = 12 + 22 + 52 + 82 A self explanatory numerical example is shown below:
B1
 3 6 0 1 7 4 5 8 2 8 2 5 3 0 6 7 1 4 1 4 7 8 5 2 0 3 6 5 8 2 0 6 3 4 7 1 0 3 6 7 4 1 2 5 8 7 1 4 5 2 8 6 0 3 2 5 8 6 3 0 1 4 7 4 7 1 2 8 5 3 6 0 6 0 3 4 1 7 8 2 5
B2
 8 4 0 5 6 1 3 2 7 6 5 1 3 7 2 4 0 8 7 3 2 4 8 0 5 1 6 4 0 8 1 5 6 2 7 3 3 2 7 0 4 8 1 6 5 5 1 6 2 3 7 0 8 4 2 7 3 8 0 4 6 5 1 0 8 4 6 1 5 7 3 2 1 6 5 7 2 3 8 4 0
M1 = 9 * B1 + B2 + 1
 36 59 1 15 70 38 49 75 26 79 24 47 31 8 57 68 10 45 17 40 66 77 54 19 6 29 61 50 73 27 2 60 34 39 71 13 4 30 62 64 41 18 20 52 78 69 11 43 48 22 80 55 9 32 21 53 76 63 28 5 16 42 65 37 72 14 25 74 51 35 58 3 56 7 33 44 12 67 81 23 46
 Based on these characteristics 8 Magic Lines can be constructed for both B1 and B2 (ref. Attachment 15.3.21). With routine CnstrSqrs42 128 suitable sets of Sudoku Comparable Squares can be generated, resulting in 128 (32 unique) Bimagic Squares M1 (ref. Attachment 15.4.22, page 1). The resulting squares are Bimagic, Associated with Trimagic Main Diagonals. With an alternative mathematical model:
B1
 D b M d c B C a A c B b a A M d C D C D A B d c b M a b C a c B d D A M B d C A M a c D b M a d D b C A c B A M B C D b a d c d c D M a A B b C a A c b C D M B d
B2
 Q P p S s n R q r S s Q p q r n P R n S R r p q s Q P q r s P R Q p n S P R q s n S Q r p s n P q r p S R Q p q S Q P R r s n r p n R Q P q S s R Q r n S s P p q
 for which following conditions apply:       D + c + B + a = d + C + b + A = 16       Q + p + S + r = q + P + s + R = 16 another 32 suitable sets of Sudoku Comparable Squares can be generated, resulting in 32 (16 Unique) Bimagic Squares M1 (ref. Attachment 15.4.22, page 2). Alternative: The results found above can be used as generator for more Associated Bimagic Squares with Trimagic Diagonals. Based on the applied Sudoku Comparable Squares a collection of 16 (unique) Associated Ternary Squares can be obtained by means of decomposition (ref. Attachment 15.4.23) which result in a (larger) collection of 80 Sudoku Comparable Squares (ref. Attachment 15.4.24) which finally result in a collection of 448 (112 unique) Associated Bimagic Squares with Trimagic Diagonals (ref. Attachment 15.4.25). Note: The Unique Associated Ternary Squares as shown in Attachment 15.4.23 are all different from the Associated Ternary Squares as applied in Section 15.2.4. 15.4.6 Aale De Winkel        (Based on Sudoku Comparable Squares) This method is based on the generation of Sudoku Comparable Squares by means of digital equations. The row and column numbers (z, s) of the square are numbered from 0 to 8 and used as coordinates, which can be converted to ternary numbers by means of following equations:       s = 3 * s(1) + s(2)       z = 3 * z(1) + z(2) with s(i) and z(i) equal to 0, 1 or 2 for i = 1 to 2 e.g. the coordinates (6, 5) can be converted to (20, 12). The ternary components d(1), d(2) of B(z,s) are determined by the formula's:       d(2) = (a(1) * s(1) + a(2) * s(2) + a(3) * z(1) + a(4) * z(2)) Mod 3       d(1) = (b(1) * s(1) + b(2) * s(2) + b(3) * z(1) + b(4) * z(2)) Mod 3 with a(i) and b(i) equal to 0, 1 or 2 for i = 1 ... 4. The resulting decimal value is:       B(z,s) = 3 * d(2) + d(1) Attachment 15.4.60 shows the 864 Sudoku Comparable Squares which could be generated with routine SudSqrs9. Bimagic Squares can be constructed based on two suitable selected Sudoku Comparable Squares (B1, B2) from this collection. Row and column permutations within square B2 are necessary as well as (occasionally) transposition. A self explanatory numerical example (no transposition required) is shown below:
B1
0 1 2 3 4 5 6 7 8
0
 0 3 6 2 5 8 1 4 7 7 1 4 6 0 3 8 2 5 5 8 2 4 7 1 3 6 0 4 7 1 3 6 0 5 8 2 2 5 8 1 4 7 0 3 6 6 0 3 8 2 5 7 1 4 8 2 5 7 1 4 6 0 3 3 6 0 5 8 2 4 7 1 1 4 7 0 3 6 2 5 8
1
2
3
4
5
6
7
8
B2
0 1 2 3 4 5 6 7 8
0
 0 3 6 2 5 8 1 4 7 7 1 4 6 0 3 8 2 5 5 8 2 4 7 1 3 6 0 4 7 1 3 6 0 5 8 2 2 5 8 1 4 7 0 3 6 6 0 3 8 2 5 7 1 4 8 2 5 7 1 4 6 0 3 3 6 0 5 8 2 4 7 1 1 4 7 0 3 6 2 5 8
1
2
3
4
5
6
7
8
B2'
0 4 8 7 2 3 5 6 1
0
 0 5 7 4 6 2 8 1 3 2 4 6 3 8 1 7 0 5 1 3 8 5 7 0 6 2 4 3 8 1 7 0 5 2 4 6 5 7 0 6 2 4 1 3 8 4 6 2 8 1 3 0 5 7 6 2 4 1 3 8 5 7 0 8 1 3 0 5 7 4 6 2 7 0 5 2 4 6 3 8 1
4
8
7
2
3
5
6
1

M1= 9 * B1 + B2' + 1

0 4 8 7 2 3 5 6 1
0
 1 33 62 23 52 75 18 38 67 66 14 43 58 9 29 80 19 51 47 76 27 42 71 10 34 57 5 40 72 11 35 55 6 48 77 25 24 53 73 16 39 68 2 31 63 59 7 30 81 20 49 64 15 44 79 21 50 65 13 45 60 8 28 36 56 4 46 78 26 41 70 12 17 37 69 3 32 61 22 54 74
4
8
7
2
3
5
6
1
 De Winkel provides on his website 224 Bimagic Squares constructed in accordance with the principle described above, which are shown in Attachment 15.4.66. Alternative 1: Based on the collection of 864 Sudoku Comparable Squares as deducted above 2304 (1152 unique) Bimagic Squares could be generated, within 1,75 hrs, without any permutation or transposition (ref. Attachment 15.4.63). Alternative 2: Based on the Ternary Components of the above mentioned 224 examples: a collection of 52 (unique) Ternary Squares can be obtained (ref. Attachment 15.4.61, page 1) which result in a collection of 858 Sudoku Comparable Squares (ref. Attachment 15.4.62) which finally result in a collection of 4384 Bimagic Squares (ref. Attachment 15.4.64). Alternative 3: Based on the Ternary Components of the above mentioned 224 examples and 864 Sudoku Comparable Squares together: a collection of 78 (unique) Ternary Squares can be obtained (ref. Attachment 15.4.61, page 2) which result in a collection of 2208 Sudoku Comparable Squares (ref. Attachment 15.4.65) which finally result in a collection of 17016 Bimagic Squares (not available in HTML). Alternative 4: Attachment 15.4.61, page 2 contains 33 (unique) Associated Ternary Squares. from this collection 9 (unique) Associated Ternary Squares can be selected (ref. Attachment 15.4.67), such that these differ also from the Associated Ternary Squares used in Section 15.2.4 which result in a collection of 292 additional Associated Sudoku Comparable Squares which finally result in another 896 (256 unique) Associated Bimagic Squares (ref. Attachment 9.6.10). Note: The 224 examples (Collection A) correspond with 172032 different Bimagic Squares (Collection B), which can be obtained by means of rotation, reflection or transformation (192). The common results of the alternatives described above with Collection A and B are summarised below:
 - Attachment n9 Common with {A} Common with {B} Alternative 1 2304 24 288 Alternative 2 4384 224 1824 Alternative 3 - 17016 224 3200 Alternative 4 896 16 896
 15.4.7 George Chen        (Based on Diagonal Euler Squares) This method is based on the application of two Diagonal Euler Squares (B1/B2) as illustrated in the example below:
b31
 4 3 8 9 5 1 2 7 6
B1
 1 9 5 8 4 3 6 2 7 6 2 7 1 9 5 8 4 3 8 4 3 6 2 7 1 9 5 9 5 1 4 3 8 2 7 6 2 7 6 9 5 1 4 3 8 4 3 8 2 7 6 9 5 1 5 1 9 3 8 4 7 6 2 7 6 2 5 1 9 3 8 4 3 8 4 7 6 2 5 1 9
B2
 8 7 9 2 1 3 5 4 6 2 1 3 5 4 6 8 7 9 5 4 6 8 7 9 2 1 3 9 8 7 3 2 1 6 5 4 3 2 1 6 5 4 9 8 7 6 5 4 9 8 7 3 2 1 7 9 8 1 3 2 4 6 5 1 3 2 4 6 5 7 9 8 4 6 5 7 9 8 1 3 2
b32
 3 2 1 6 5 4 9 8 7
M1a = B1 + 9 * (B2 - 1)
 64 63 77 17 4 21 42 29 52 15 2 25 37 36 50 71 58 75 44 31 48 69 56 79 10 9 23 81 68 55 22 12 8 47 43 33 20 16 6 54 41 28 76 66 62 49 39 35 74 70 60 27 14 1 59 73 72 3 26 13 34 51 38 7 24 11 32 46 45 57 80 67 30 53 40 61 78 65 5 19 18
M1b = B2 + 9 * (B1 - 1)
 8 79 45 65 28 21 50 13 60 47 10 57 5 76 42 71 34 27 68 31 24 53 16 63 2 73 39 81 44 7 30 20 64 15 59 49 12 56 46 78 41 4 36 26 70 33 23 67 18 62 52 75 38 1 43 9 80 19 66 29 58 51 14 55 48 11 40 6 77 25 72 35 22 69 32 61 54 17 37 3 74
 It can be noticed that: The center square of B1 is a Simple Magic Square of order 3 The center square of B2 is filled with the numbers 1 ... 9 (natural sequence) The remainder of both squares is constructed by moving the center squares b31 (b32) horizontally, vertcally or diagoanl wise, where the rows resp. columns of the sub squares are moved (cyclic) as described below: square to the top    : the columns are moved 1 step to the right square to the bottom : the columns are moved 1 step to the left square to the left   : the rows    are moved 1 step to the top square to the right  : the rows    are moved 1 step to the bottom Based on this method 8 * 8 = 64 sets of Diagonal Euler Squares (B1/B2) can be constructed resulting in 128 (80 unique) Bimagic Squares (ref. Attachment 15.4.07). The resulting squares are Bimagic, Associated and Partly Compact. The elements of the nine regular sub squares return both the magic (369) and the bimagic sum (20049). Note: The collection of Partial Compact Bimagic Squares (20736 ea) - as deducted and discussed in Section 15.2.3 - contains 256 Associated Partly Compact Bimagic Squares, which include the 128 Associated Bimagic Squares described above. 15.4.8 Walter Trump, Holger Danielsson        Enumeration of Associated Bimagic Squares Walter Trump and Holger Danielsson have recently executed the full enumeration of Associated Bimagic Squares. Based on the 949738 Bimagic Series, as computed by Christian Boyer (May 2002), they found 1.307.729.280 Associated Bimagic Squares (6.811.090 essential different). 15.4.9 Summary The obtained results regarding the miscellaneous types of order 9 Bimagic Squares as deducted and discussed in previous sections are summarized in following table:
 Main Characteristics Original Author(s) Subroutine Results Bimagic Squares, Sudoku Based Victor Coccoz Alternative 1 Bimagic Squares, Sudoku Based Aale De Winkel - Alternative 1 Alternative 2 Bimagic Squares, Euler Based George Chen -
 Next section will provide both classical and modern construction methods for Magic Squares of Squares.