Self-complementary magic squares of doubly even orders

Self-complementary magic squares of doubly even orders

Discrete Mathematics 341 (2018) 1359–1362 Contents lists available at ScienceDirect Discrete Mathematics journal homepage: www.elsevier.com/locate/d...

313KB Sizes 0 Downloads 34 Views

Discrete Mathematics 341 (2018) 1359–1362

Contents lists available at ScienceDirect

Discrete Mathematics journal homepage: www.elsevier.com/locate/disc

Note

Self-complementary magic squares of doubly even orders Gek L. Chia Department of Mathematical and Actuarial Sciences, Universiti Tunku Abdul Rahman, Sungai Long, Malaysia

article

info

Article history: Received 30 October 2017 Received in revised form 7 February 2018 Accepted 7 February 2018 Available online 4 March 2018 Keywords: Magic square Self-complementary magic square Generalized Doubly Even Method

a b s t r a c t A magic square M in which the entries consist of consecutive integers from 1, 2, . . . , n2 is said to be self-complementary of order n if the resulting square obtained from M by replacing each entry i by n2 + 1 − i is equivalent to M (under rotation or reflection). We present a new construction for self-complementary magic squares of order n for each n ≥ 4, where n is a multiple of 4. © 2018 Elsevier B.V. All rights reserved.

1. Introduction A magic square of order n is a square array of integers from 1, 2, . . . , n2 such that the sum of entries in each row, column and diagonal is the same number, which is called the magic sum of the square. It is easy to see that the magic sum of an nth order magic square is n(n2 + 1)/2. Magic squares are probably among the earliest combinatorial objects known. A number of unsolved research problems on magic squares are available in [1]. Here we present an interesting construction for a special kind of magic squares that contain certain symmetry. Suppose M = (ai,j ) is a magic square of order n. We say that M is symmetrical if ai,j + an+1−i,n+1−j = n2 + 1 for all 1 ≤ i, j ≤ n. Note that if M is symmetrical of order n, then M + σ (M) = (n2 + 1)Jn where σ (M) is the 180-degree clockwise rotation on M and Jn is the n × n matrix with every entry equals 1. In view of this rotational property, a symmetrical magic square is also called a ro-symmetrical magic square in [2]. Let π (M) denote the 180-degree reflection on M along the central vertical of M. Then we say that M = (ai,j ) is refsymmetrical if M + π (M) = (n2 + 1)Jn . In this case we have ai,j + ai,n+1−j = n2 + 1 for all 1 ≤ i, j ≤ n. Equivalently we could take π (M) to be the 180-degree reflection on the central horizontal of M, in which case we have ai,j + an+1−i,j = n2 + 1 for all 1 ≤ i, j ≤ n instead. By replacing every entry x in M with n2 + 1 − x we obtain the complement of M which is also a magic square of order n. If M is equivalent to its complement (under rotation or reflection), we say that M is self-complementary. Incidentally, the Lo-Shu, one of the earliest combinatorial designs (see [3]) is an example of self-complementary magic square of order 3. The two magic squares of order 4 depicted in Fig. 1 are both self-complementary. Here M1 is ro-symmetrical while M2 is ref-symmetrical. Self-complementary magic squares were investigated in [2] where a characterization for self-complementary magic squares was presented. It was shown that (i) if n is odd, then M is self-complementary if and only if M is ro-symmetrical, and that (ii) if n is even, then M is self-complementary if and only if either M is ref-symmetrical or else M is ro-symmetrical; in the case that M is ro-symmetrical, n ≡ 0 (mod 4). E-mail address: [email protected]. https://doi.org/10.1016/j.disc.2018.02.010 0012-365X/© 2018 Elsevier B.V. All rights reserved.

1360

G.L. Chia / Discrete Mathematics 341 (2018) 1359–1362

Fig. 1. Self-complementary magic squares of order 4.

While there are several known methods of constructions for ro-symmetrical magic squares, not much is known about the construction for ref-symmetrical magic squares except for the construction given in [2]. The purpose of this note is to present a new method of constructing ref-symmetrical magic squares of doubly even order (see Theorem 1). An interesting part of this construction is that it converts a ro-symmetrical magic square M of doubly even order (obtained from a well-known construction called the Generalized Doubly Even Method (GDEM)) into a ref-symmetrical magic square of the same order. Basically M is partitioned into 4 × 4 sub-squares followed by an operation on these sub-squares which are then used as ingredient sub-squares to form a ref-symmetrical magic square (see Section 2). The GDEM construction is available in [4] (p. 199–200) and [3] (p. 527, Section 34.21). For ease of reference the GDEM construction is given below. Generalized Doubly Even Method: First, starting with the first row of the n × n square (where n ≡ 0 (mod 4)), fill the cells with 1, 2, . . . , n2 in the natural order. Next, partition the square into (n/4)2 4 × 4 sub-squares. Finally, replace each integer x which occurs in the main or back diagonal of each 4 × 4 sub-square with n2 + 1 − x. The magic square M1 as depicted in Fig. 1 is obtained by using the GDEM construction with n = 4. For n = 8, the GDEM construction yields the following ro-symmetrical magic square.

2. The construction Let A = (ai,j ) denote a 4 × 4 matrix and define



a1 , 1 ⎢a1,2 ϕ (A) = ⎣ a1,3 a1,4

a2,2 a2,1 a2,4 a2,3

a3 , 3 a3 , 4 a3,1 a3,2



a4,4 a4,3 ⎥ . a4,2 ⎦ a4,1

Note that (i) the main diagonal sum of ϕ (A) is equal to the first column sum of A, (ii) the back diagonal sum of ϕ (A) is equal to the last column sum of A, and (iii) the ith column sum of ϕ (A) is equal to the ith row sum of A. Suppose that B = (bi,j ) is a 4 × 4 matrix. Define



a1,1 ⎢a1,2 α (A, B) = ⎣ a1,3 a1,4

a2 , 1 a2 , 2 a2 , 3 a2 , 4

b3,4 b3,3 b3,2 b3,1



b4,4 b4,3 ⎥ b4,2 ⎦ b4,1



a3 , 1 ⎢a3,2 and β (A, B) = ⎣ a3,3 a3,4

a4,1 a4,2 a4,3 a4,4

b1 ,4 b1 ,3 b1,2 b1,1



b2,4 b2,3 ⎥ . b2,2 ⎦ b2,1

Note that the ith column sum of α (A, B) is equal to the ith row sum of A for i = 1, 2 and is equal to the ith row sum of B for i = 3, 4. Likewise, the ith column sum of β (A, B) is equal to the (i + 2)th row sum of A if i = 1, 2, and is equal to the (i − 2)-th row sum of B if i = 3, 4. Let M be the ro-symmetrical magic square of order n obtained by using the GDEM construction. Partition M into 4 × 4 sub-matrices Ai,j where 1 ≤ i, j ≤ n/4. (I) Suppose n ≡ 0 (mod 8). Let ϕ (M) denote the n × n matrix whose (i, j)-entry is the 4 × 4 matrix (i) ϕ (Aj, i ) if 1 ≤ i ≤ n/4 and 1 ≤ j ≤ n/8, (ii) ϕ (Aj, n/4+1−i ) if 1 ≤ i ≤ n/4 and n/8 + 1 ≤ j ≤ n/4.

G.L. Chia / Discrete Mathematics 341 (2018) 1359–1362

1361

(II) Suppose n ≡ 4 (mod 8). Let m = (n + 4)/8 and let Bi = Ai,m where 1 ≤ i ≤ 2m − 1. Let ϕ (M) denote the n × n matrix whose (i, j)-entry is the 4 × 4 matrix (i) ϕ (Aj,i ) if 1 ≤ i ≤ 2m − 1 and 1 ≤ j ≤ m − 1, (ii) ϕ (Aj, 2m−i ) if 1 ≤ i ≤ 2m − 1 and m + 1 ≤ j ≤ 2m − 1, (iii) ϕ (Am, m ) if i = m = j, (iv) α (Bi , B2m−i ) if 1 ≤ i ≤ m − 1 and j = m, (v) β (Bi−m , B3m−i ) if m + 1 ≤ i ≤ 2m − 1 and j = m. Theorem 1. Let M be the magic square of order n obtained by using the GDEM. Then M is ro-symmetrical and ϕ (M) is a refsymmetrical magic square of order n. Example: (i) For n = 4, by applying the above construction to M1 , we obtain a ref-symmetrical magic square ϕ (M1 ) which turns out to be the magic square M2 depicted in Fig. 1. (ii) For n = 8, by applying the above construction to the magic square M3 , we obtain ϕ (M3 ) which is the ref-symmetrical magic square M4 depicted below. The resulting magic square for the case n = 12 is the square M5 .

3. The proof of Theorem 1 Since it is already known that M is ro-symmetrical (see [4] page 202), we shall only show that ϕ (M) is ref-symmetrical. Recall that the (i, j)-entry of M is Ai,j which is a 4 × 4 matrix. It is routine to check that the entries of Ai,j are given by



Ai,j

n2 − 4(in + j) + 4n + 4 ⎢ 4(in + j) − 3n − 3 =⎢ ⎣ 4(in + j) − 2n − 3 n2 − 4(in + j) + n + 4

4(in + j) − 4n − 2 n2 − 4(in + j) + 3n + 3 n2 − 4(in + j) + 2n + 3 4(in + j) − n − 2

4(in + j) − 4n − 1 n2 − 4(in + j) + 3n + 2 n2 − 4(in + j) + 2n + 2 4(in + j) − n − 1



n2 − 4(in + j) + 4n + 1 ⎥ 4(in + j) − 3n ⎥. ⎦ 4(in + j) − 2n 2 n − 4(in + j) + n + 1

As such, the action of ϕ on Ai,j yields the following 4 × 4 matrix n2 − 4(in + j) + 4n + 4 ⎢ 4(in + j) − 4n − 2 ϕ (Ai,j ) = ⎣ 4(in + j) − 4n − 1 n2 − 4(in + j) + 4n + 1



n2 − 4(in + j) + 3n + 3 4(in + j) − 3n − 3 4(in + j) − 3n n2 − 4(in + j) + 3n + 2

n2 − 4(in + j) + 2n + 2 4(in + j) − 2n 4(in + j) − 2n − 3 n2 − 4(in + j) + 2n + 3

n2 − 4(in + j) + n + 1 4(in + j) − n − 1 ⎥ 4(in + j) − n − 2 ⎦ 2 n − 4(in + j) + n + 4



with constant column sum 2n2 + 2. Moreover the main diagonal sum and the back diagonal sum are both equal to 2n2 + 2. These observations on the column sum, main diagonal sum and back diagonal sum are also true for the matrices ϕ (Aj,i ) and ϕ (Aj,n/4+1−i ).

1362

G.L. Chia / Discrete Mathematics 341 (2018) 1359–1362

For each i = 1, 2, . . . , m − 1, the column sum of α (Bi , B2m−i ) is equal to 2n2 + 2. Likewise, for each i = m + 1, m + 2, . . . , 2m − 1, the column sum of β (Bi−m , B3m−i ) is equal to 2n2 + 2. Note that the (i, j)-entry of ϕ (M) is ϕ (Aj,i ) if 1 ≤ i ≤ n/4 and 1 ≤ j ≤ ⌊n/8⌋, and is equal to ϕ (Aj,n/4+1−i ) if 1 ≤ i ≤ n/4 and ⌈n/8⌉ ≤ j ≤ n/4. It thus follows that the each column of ϕ (M) has the same constant sum (2n2 + 2) × (n/4) = n(n2 + 1)/2. Moreover each diagonal (main or back) also has the same constant sum n(n2 + 1)/2. To show that it is ref-symmetrical, it remains to show that the sum of entries in the (r , s) and (r , n + 1 − s) positions of ϕ (M) is n2 + 1 for any 1 ≤ r , s ≤ n from which it follows readily that each row has the same constant sum n(n2 + 1)/2. Consider the (i, j)-entry and the (i, n/4 + 1 − j)-entry of ϕ (M) where 1 ≤ i ≤ n/4 and 1 ≤ j ≤ ⌊n/8⌋. Recall that these entries are ϕ (Aj,i ) and ϕ (An/4+1−j, n/4+1−i ) respectively. Let π denote the central vertical reflection on ϕ (M). It is routine to check that ϕ (Aj,i ) + π (ϕ (An/4+1−j, n/4+1−i )) = (n2 + 1)J4 for any i = 1, 2, . . . , n/4 and any j = 1, 2, . . . , ⌊n/8⌋. It follows that ϕ (M) is ref-symmetrical when n ≡ 0 (mod 8). Now consider the case n ≡ 4 (mod 8). Recall that m = (n + 4)/8 and that Bi = Ai,m . Since M is a ro-symmetrical magic square of order n, we have Bi + σ (B2m−i ) = (n2 + 1)J4 where σ (M) denotes the 180-degree clockwise rotation on M. This implies that α (Bi , B2m−i ) + π (α (Bi , B2m−i )) = (n2 + 1)J4 and β (Bi , B2m−i ) + π (β (Bi , B2m−i )) = (n2 + 1)J4 . Also, it is easy to see that ϕ (Am, m ) + π (ϕ (Am, m )) = (n2 + 1)J4 . It follows that ϕ (M) is refsymmetrical when n ≡ 4 (mod 8). This completes the proof. □ Note that, in the construction (II), the matrices α (Bi , B2m−i ) and β (Bi , B3m−i ), i = 1, 2, . . . , m − 1, can be permuted arbitrarily giving rise to different ref-symmetrical magic squares of order n (since each of these matrices has the same constant column sum 2n2 + 2). References [1] G. Abe, Unsolved problems on magic squares, Discrete Math. 127 (1994) 3–13. [2] G.L. Chia, Angeline P.L. Lee, Self-complementary magic squares, Ars Combin. 114 (2014) 449–460. [3] J.M. Kudrle, S.B. Menard, Magic square, in: C.J. Colbourn, J.H. Dinitz (Eds.), The CRC Handbook of Combinatorial Designs, second ed., CRC Press, Boca Raton, FL, 2007, pp. 524–528. [4] W.W. Rouse Ball, H.S.M. Coxeter, Mathematical Recreations and Essays, twelvth ed., University of Toronto Press, 1974.

Further reading [1] W.H. Benson, O. Jacoby, New Recreations with Magic Squares, Dover Publications Inc., 1976. [2] Magic squares –from Wolfram Mathworld, http://mathworld.wolfram.com/MagicSquare.html.