0% found this document useful (0 votes)
67 views

Algebraic On Magic Square of Odd Order N

This document summarizes Mahyuddin K. M. Nasution's research on algebraic properties of magic squares of odd order. It defines what a magic square is and its properties. It then discusses constructing magic squares of odd order n by assigning numbers from 1 to n^2 in a certain sequential order. The document proposes modifying this to instead use numbers from 1 to n^2 modulo n. This results in new magic squares where the difference between adjacent rows is 1 modulo n and adjacent columns is 2 modulo n. Tables showing examples for n=3,5,7,9 are provided. The sums of diagonals for these new modulo n magic squares are shown to not always be equal, unlike traditional magic squares.

Uploaded by

hajj marlow
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views

Algebraic On Magic Square of Odd Order N

This document summarizes Mahyuddin K. M. Nasution's research on algebraic properties of magic squares of odd order. It defines what a magic square is and its properties. It then discusses constructing magic squares of odd order n by assigning numbers from 1 to n^2 in a certain sequential order. The document proposes modifying this to instead use numbers from 1 to n^2 modulo n. This results in new magic squares where the difference between adjacent rows is 1 modulo n and adjacent columns is 2 modulo n. Tables showing examples for n=3,5,7,9 are provided. The sums of diagonals for these new modulo n magic squares are shown to not always be equal, unlike traditional magic squares.

Uploaded by

hajj marlow
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Algebraic on Magic Square of Odd Order n

Mahyuddin K. M. Nasution

Mathematic Department, Fakultas Matematika dan Ilmu Pengetahuan Alam


Universitas Sumatera Utara, Padang Bulan 20150 USU Medan Indonesia
[email protected],[email protected]

Abstract. This paper aims to address the relation between a magic


arXiv:1207.5117v1 [cs.DM] 21 Jul 2012

square of odd order n and a group, and their properties. By the modulo
number n, we construct entries for each table from initial table of magic
square with large number n2 . Generalization of the underlying idea is
presented, we obtain unique group, and we also prove variants of the
main results for magic cubes.

Keywords: entry, array, algorithm, magic cubes, group

1 Introduction

According to the book of W. S. Andrews [1], the study of magic squares is quite
old and dates back to ancient Tibet, to 12th century China, to 9th century
Arab astrologers and perhaps much further. Speculation about it might even be
prehistoric.
In this paper, we shall see old procedure can product unique magic square
based on a group of a set f numbers in modulo n. Objectives are find new magic
square which it has different procedure if it compares with old. Therefore, we get
a procedure for generating new magic square. Of course, this paper organized by
first we defined the magic square with a condition for producting it, and based
on conditions we result a procedure on odd order n. Next section, we modify all
entries of magic square on modulo n and we test all conditions of magic square.
In finding new procedure for the magic square with all entries on modulo n,
we force a simple group on a set Zn with a binary operation, and based on we
find new magic square. What are all magic squares of odd order n satisfying the
condition of magic square?

2 The Magic Squares

A magic square (MS) of order n, also called a n × n magic square, or it means


that n × n square array A = (aij ) 0 ≤, j ≤ n − 1, of positive integers such that

a. each integer from 1 to n2 inclusive occurs exactly once among the entries of
A, Pn−1
b. for 0 ≤ i ≤ n − 1, the sum j=0 aij is independent of i,
2 M. K. M. Nasution

Pn−1
c. for 0 ≤ i ≤ n − 1, the sum j=0 aij is independent of j,
Pn−1 Pn−1
d. the sums i=0 aii and i=0 ai,n−i−1 are equal to the sums given in (b.),
and such as to those in (c.).

816
357
492
Fig. 1. 3 × 3 magic square (of odd order).

1 15 14 4
12 6 7 9
8 10 11 5
13 3 2 16
Fig. 1. 4 × 4 magic square (of even order).

Let A be the 3 × 3 magic square for example in Fig. 1, and B be the 4 × 4


magic square in Fig. 2. The product square A ∗ B has order 12, the product of
the orders of A and B. Let G be an abelian group and choose an element u of
G once and for all. Denote by A(G) the set of all square arrays of elements of
G, the size of the arrays being arbitrary. If A = (aij ), 0 ≤ i, j ≤ m − 1, and
B = (bkl ), 0 ≤ k, l ≤ n − 1 are elements of A(G) of size m × m and n × n
respectively, then A ∗ B will be the mn × mn matrix E = (eαβ ), (α, β)-the entry.
A set S closed under an associative operation is called a semigroup, and the
set be monoid if its operation with an identity element. The following are some
results [2].
Lemma 1. Let G be an abelian group. The set A(G) of al square arrays with
entries in G is a monoid with identity element u with respect to the operation ∗
defined by
eαβ = m2 (bkl + u) + aij (1)
and
(α, β) = m(k, l) + (i, j) (2)
Let S be a monoid with identity element of S that respect to an operation.
We say that S is left cancelleative for the other side. In this case, the entries of a
magic square of order n run from 0 to n2 − 1, and we take u = 0 bukan u = −1.
For A is m × m, B is n × n and C is p × p. If A ∗ C = B ∗ C then we must have
mp = np and thus m = n. Therefore, we have m2 (ckl −1)+aij = m2 (ckl −1)+bij
for 0 ≤ i, j ≤ m − 1 and 0 ≤ k, l ≤ n − 1, which implies that aij = bij for all
i, j. That means that A ∗ B = B8C, it implies A = B. If A ∗ B = A ∗ C then
we must have mn = mp and therefore n = p. It follows that m2 (bkl + 1) + aij =
m2 (ckl − 1) + aij for 0 ≤ i, j ≤ m − 1 and 0 ≤ k, l ≤ n − 1, which implies that
m2 (bkl − ckl = 0 for all k and l. It follows that bkl = ckl for all k, l, and equation
A ∗ B = A ∗ C implies B = C.
Lemma 2. Let G be an abelian group and let u be an element of G. Then the
monoid (A(G), ∗, u) is right cancellative.
Algebraic on Magic Square of Odd Order n 3

Lemma 3. Let G be an abelian group and let u be an element of G. Then the


monoid (A(G), ∗, u) is left cancellative if and only if the group G is torsion-free.

3 The Odd Order


Let we consider the magic square of od order n, n = 3, 5, 7, 9, . . .. All condition
(a.) - (b.) above give entries of a magic square of odd order n based on following
steps:
1. Set i = (n − 1)/2, j = 0, and k = 1.
2. Do while k ≤ n2
(a) If j = −1 Then
i. If i = n Then i = i − 1 and j = j + 2 Else j = n − 1
(b) If i = n Then i = 0
(c) If aij ≥ 0 Then j = j + 2 and i = i − 1
(d) aij = k
(e) j = j − 1, i = i + 1 and k = k + 1
3. End Do
For example, we obtain the sequential numbers from lines of n × n magic
squares:
n = 5, it is 17, 24, 1, 8, 15, 23, 5, 7, 14, 16, 4, 6, 13, 20, 22, 10, 12, 19, 21, 3, 11, 18, 25,
2, 9;
n = 7, it is 30, 39, 48, 1, 10, 19, 28, 38, 47, 7, 9, 18, 27, 29, 46, 6, 8, 17, 26, 35, 37, 5, 14,
16, 25, 34, 36, 45, 13, 15, 24, 33, 42, 44, 4, 21, 23, 32, 41, 43, 3, 12, 22, 31, 40, 49, 2, 11,
20; and
n = 9, it is 47, 58, 69, 80, 1, 12, 23, 34, 45, 57, 68, 7, 789, 9, 11, 22, 33, 44, 46, 67, 78, 8,
10, 21, 32, 43, 54, 56, 77, 7, 18, 20, 31, 42, 53, 55, 66, 6, 17, 19, 30, 41, 52, 63, 65, 76, 16,
27, 29, 40, 51, 62, 64, 75, 5, 26, 28, 39, 50, 61, 72, 74, 4, 15, 36, 38, 49, 60, 71, 73, 3, 14,
25, 37, 48, 59, 70, 81, 2, 13, 24, 35;
are magic squares of odd ordern n = 5, 7, 9.
If we modify condition (a.) of magic square so that the entries of a magic
square of odd order n run from 1 to n2 modulo n instead of from 1 to n2 , we get
a difference between a column (left side) and next column (to right side) is 2 in
modulo n and a difference betwen a row and next row from top to down is 1 in
modulo n. Therefore, we define function f : Zn × Zn → Zn or a binary operation
on Zn defined by f (r, c) = 2 + r + 2c, for all r, c ∈ Zn , r and c represent row and
column of magic square, respectively. For example, n = 3, 5, 7 and 9, we have
new squares likes Figs. 3, 4, 5 and 6. Each of this squares in Zn with f , n P = 3k,
n−1
k = 1, 3, 5, 7, 9, . . .. We obtain result of condition (d.) of a magic square, i=0
Pn−1
(we called it as sltdd or sums of left-top-down-diagonal ) is not equal to i=0
(we called it as slbud or sums of left-buttom-up-diagonal ) or other conditions (sr
= sums of row and sc = sums of column), see Table A in Appendix.
210
021
102
Fig. 3. 3 × 3 magic square in modulo 3.
4 M. K. M. Nasution

24130
30241
41302
02413
13024
Fig. 4. 5 × 5 magic square in modulo 5.
2461350
3502461
4613502
5024613
6135024
0246135
1350246
Fig. 5. 7 × 7 magic square in modulo 7.
246813570
357024681
468135702
570246813
681357024
702468135
813500246
024681357
135002468
Fig. 6. 9 × 9 magic square in modulo 9.
A set Zn with a binary operation f is not an associative operation, and then
(Zn , f ) is not a group. Let us have a procedure to product new magic square (it
is called New MS), may be, so that a set Zn with a binary operation satisfies all
condition of group. The procedure as follows:
1. Copy an−1,j to first column.
2. Copy a(n−1)/2,j to second column.
3. Copy a0,j to third column.
4. Set i = 3, x = 0, y = 0
5. Do While i < 0
(a) If (i modulo 2 = 0) Then
i. x = x + 1
ii. Copy axj to aij
(b) Else
i. y = y + 1
ii. Copy a(n−1)/2+y,j to aij
6. End Do
For example, for the entries of a pair of squares, we run 1 to n2 and 1 to
2
n modulo n, n = 3, 5, 7, 9, respectively, and we obtain some equivalent squares,
Fig. 6, 7, 8, 9.
Algebraic on Magic Square of Odd Order n 5

618 012
753 → 120
294 201
Fig. 6. 3 × 3 magic square or square in modulo 3.

15 1 17 8 24 01234
16 7 23 14 5 12340
22 13 4 20 6 → 2 3 4 0 1
3 19 10 21 12 34012
9 25 11 2 18 40123
Fig. 7. 5 × 5 magic square or square in modulo 5.

28 1 30 10 39 19 48 0123456
29 9 38 18 47 27 7 1234560
37 17 46 26 6 35 8 2345601
45 25 5 34 14 36 16 → 3 4 5 6 0 1 2
4 33 13 42 15 44 24 4560123
12 41 21 43 23 3 32 5601234
20 49 22 2 31 11 40 6012345
Fig. 8. 7 × 7 magic square or square in modulo 7.

45 1 47 12 58 23 69 34 80 012345678
46 11 57 22 68 33 79 34 9 123456780
56 21 67 32 78 43 8 54 10 234567801
66 31 77 42 7 53 18 55 20 345678012
76 41 6 52 17 63 19 65 30 → 4 5 6 7 8 0 1 2 3
5 51 16 62 27 64 29 75 40 567801234
15 61 26 72 28 74 39 4 50 678012345
25 71 36 73 38 3 49 14 60 780123456
35 81 37 2 48 13 59 24 70 801234567
Fig. 9. 9 × 9 magic square or square in modulo 9.

The squre of New MS represent a binary operation, g : Zn × Zn → Zn , or


g(a, b) = a + b for example, for all a, b ∈ Zn , and then we have exactly a set Zn
Pn−1 Pn−1
with g construct a simple group (G mod n) where i=0 ai,n−i−1 is 2 i=0 aii
Pn−1 Pn−1
or 2 j=0 aij ro 2 j=0 aij . Each New MS of n = 5, 7, 11, . . . satisfies conditions
Pn−1
(a.)-(d.) of magic square, except a part of condition (d.), i.e. i=0 ai,n−i−1 , but
for n = 3 and n = 9 two cases where all conditions of magic square are holded.
Therefore, there exist two simple group of Zn with g, n = 3, 9, we call them as
pure magic square.
Let M2 denote the set of all magic squares, include New MS of odd order
n = 3 and n = 9. The magic square A ∗ B formed from A is New MS n = 3 and
B is n = 34 and n = 4, see next figures.
6 M. K. M. Nasution

51 46 53 6 1 8 69 64 71
52 50 48 7 5 3 70 68 66
47 54 49 2 9 4 65 72 67
60 55 62 42 37 44 24 19 26
61 59 57 43 41 39 25 23 21
56 63 58 38 45 40 20 27 22
15 10 17 78 73 80 33 28 35
16 14 12 79 77 75 34 32 30
11 18 13 74 81 76 29 36 31
Fig. 10. 3 × 3 magic square in 3 × 3 magic square.

We locate the square in B which contains the number 1 and place a copy
of A in the corresponding square of the frame we have just constructed. Next
we locate the square in B containing 2 and in the corresponding the square, we
count out the next 9 numbers in the same pattern. It is the same to say that we
adds 9 for all of the entries of A and places the result in the box corresponding
to the position of the 2 in B. Next we find the 3 of B and we counts out the next
9 numbers in the corresponding place in the frame. Continuing in this way, we
eventually get the magic square completely by this method.

69 64 71 6 1 8 51 46 53
70 68 66 7 5 3 52 50 48
65 72 67 2 9 4 47 54 49
24 19 26 42 37 44 60 55 62
25 23 21 43 41 39 61 59 57
20 27 22 38 45 40 56 63 58
33 28 35 78 73 80 15 10 17
34 32 30 79 77 75 16 14 12
29 36 31 74 81 76 11 18 13
Fig. 10. 3 × 3 magic square in a modified 3 × 3 magic square.

53 46 51 8 1 6 71 64 69
48 50 52 3 5 7 66 68 70
49 54 47 4 9 2 67 72 65
62 55 60 44 37 42 26 19 24
57 59 61 39 41 43 21 23 25
58 63 56 40 45 38 22 27 20
17 10 15 80 73 78 35 28 33
12 14 16 75 77 79 30 32 34
13 18 11 76 81 74 31 36 29
Fig. 11. The modified 3 × 3 magic square in a 3 × 3 magic square.
Algebraic on Magic Square of Odd Order n 7

6 1 8 132 127 134 123 118 125 33 28 35


7 5 3 133 131 129 124 122 120 34 32 30
2 9 4 128 135 130 119 126 121 29 36 31
105 100 107 51 46 53 60 55 62 78 73 80
106 104 102 52 50 48 61 59 57 79 77 75
101 108 103 47 54 49 56 63 58 74 81 76
69 64 71 87 82 89 96 91 98 42 37 44
70 68 66 88 86 84 97 95 93 43 41 39
65 72 67 83 90 85 92 99 94 38 45 40
114 109 116 24 19 26 15 10 17 141 136 143
115 113 111 25 23 21 16 14 12 142 140 138
110 117 112 27 22 11 18 18 13 137 144 139
Fig. 12. The 3 × 3 magic square in a 4 × 4 magic square.

The product of two squares A*B be an order 12, it is the product of the
orders of A and B. It is convenient to represent an analytic expression for this
operation as (1) and (2) of Lemma 1. For n = 3 and 9 we can see easily that m
= n, a binary operation (1) to be

eαβ = n2 (bkl + u) + aij

For special case for n = 3 and n = 9 as new magic squares follow the Lemma 1,
2, and 3.

4 Conclusions

In the simple group Zn we can product a procedure to construc a new magic


square whereby they satisfies all conditions of magic square, mainly for n = 3
and 9, and these new magic squares so satisfy Lemma 1, 2 and 3.

References

1. Andres, W. S. 1960. Magic Squares and Cubes, New York: Dover.


2. Adler, A. and Li, S. Y. R. 1997. Magic n-cubes and prouhet sequences. American
Mathematical Montly, 84: 618-627.
8 M. K. M. Nasution

Appendix
Table A. Results of computation for all conditions of magic squares.

n n2 Case sr sc sltdd slbud


3 9 MS 15 15 15 15
Mod n 3 3 6 3
G mod n 3 3 3 6
New MS 15 15 15 15
5 25 MS 65 65 65 65
Mod n 10 10 10 10
G mod n 10 10 10 20
New MS 65 65 65 70
7 49 MS 175 175 175 175
Mod n 21 21 21 21
G mod n 21 21 21 42
New MS 175 175 175 189
9 81 MS 369 369 369 369
Mod n 36 36 45 36
G mod n 36 36 36 72
New MS 369 369 369 369
11 121 MS 671 671 671 671
Mod n 55 55 55 55
G mod n 55 55 55 110
New MS 671 671 671 715
···
99 9801 MS 485199 485199 485199 485199
Mod n 4851 4851 4851 4851
G mod n 4851 4851 4851 9702
New MS 485199 485199 485199 489951
···

You might also like