Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

Semi-Magic Squares From Snake-Shaped Matrices

1 586 vues

Publié le

  • Identifiez-vous pour voir les commentaires

Semi-Magic Squares From Snake-Shaped Matrices

  1. 1. Semi-Magic Squares From Snake-Shaped Matrices Lohans de OLiveira Miranda, Instituto Antoine Lavoisier de Ensino, Teresina-PI, BrasilLossian Barbosa Bacelar Miranda, Instituto Federal de Educa¸˜o Ciˆncia e ca e Tecnologia do Piaui, BrasilAbstract. Using snake-shaped matrices and reflections on their columns ofeven order we present a method that generates a large class of semi-magicsquares.Keywords: semi-magic squares, snake-shaped matrices, arithmetic progres-sions.1. Introduction Methods have been developed for the construction of magic rectanglesfrom snake-shaped matrices (see reference [1]), which consist of two steps.In this paper we present an alternative method, which also makes use ofsnake-shaped matrices, consisting of three steps. The first step is the sameas established in the literature and the second, slightly different. The thirdis a problem of combining the solution of which provides a variety of semi-magic squares. Our approach is restricted to the squares of even order, butapplies to any rectangles with even numbers of rows and columns. To makethe construction three procedures (steps) can be used on the lines insteadof columns. Similar result is achieved by making it the second procedure(reflection) on the columns of odd order.2. Definitions and notations Consider a square matrix of even order A = (aij ) , n > 2, with aij ∈In2 = {1, 2, 3, ..., n2 } and such that aij = akl ⇔ i = k ∧ j = l. The aijelements are called entries. We denote the row of order k by (akj )j=1,2,...,n =[ak1 , ak2 , ..., akn ] and the column of order k by (ajk )j=1,2,...,n = [a1k , a2k , ..., ank ]t . n n n(n2 +1)If j=1 akj = i=1 ail = 2 , ∀k, l ∈ In2 , we say that A is a semi-magic n(n2 +1)square with the magic constant c(n) = 2 . The columns [a1k , a2k , ..., ank ]t 1
  2. 2. tand ank , a(n−1)k , ..., a1k are said reflected from each other and we call re-flection the procedure for changing aik by a(n−i+1)k for any i ∈ I n . We call 2the snake-shaped matrix the square matrix A = (aij )n×n defined by n(i − 1) + j if i = 1, 3, 5, ..., (n − 1) aij = (1) ni − (j − 1) if i = 2, 4, 6, ..., n Using (1) it is noticed that the sum of all the elements of any column ofa snake-shaped matrix is equal to the magic constant. If all n columns of 2an even order snake-shaped matrix suffer a reflection, we will have a snake-shaped matrix with reflected columns of even orders.3. Main Results The following are the main results.PROPOSITION 1. If A = (aij )n×n , n > 2 , is snake-shaped matrix with re-flected columns of even orders, then: (i) n a[(2k−1)+2s]j = n a(2k−1)j = j=1 j=1c(n) − n , k ∈ I( n −1) , s ∈ I( n −k) ; (ii) n a(2k+2s)j = n a(2k)j = 2 2 2 j=1 j=1c(n) + n , k ∈ I( n −1) , s ∈ I( n −k) . 2 2 2Proof (i): consider the snake-shaped matrix A = (aij )n×n that generatesA from the reflections of its n columns of even order. To this matrix we 2have, a[(2k−1)+2s] − a(2k−1)j = 2sn = a(2k+2s)j − a(2k)j , k ∈ I( n −1) , s ∈ I( n −k) 2 2 (2).If j ∈ In is an odd number, its follows from (2): a[(2k−1)+2s]j = a(2k−1)j + 2sn (3).After the reflection of the column of order j + 1 of A results: a(2k−1)(j+1) = a[(2k−1)+2s](j+1) + 2sn (4).Therefore, after reflection of the column of order j + 1, (3) and(4) provide a(2k−1)j + a(2k−1)(j+1) = a[(2k−1)+2s]j + a[(2k+1)+2s](j+1) , j =1, 3, 5, ..., (n−1). Since the columns of odd order are not altered by the reflec-tions of columns of even order results a(2k−1)j + a(2k−1)(j+1) = a[(2k−1)+2s]j +a[(2k−1)+2s](j+1) , j = 1, 3, 5, ..., (n−1), k ∈ I( n −1) , s ∈ I( n −k) from which follows 2 2 n n +1 +1 2 m=1 a(2k−1)(2m−1) + a(2k−1)2m = 2 m=1 a[(2k−1)+2s](2m−1) + a[(2k−1)+2s]2m 2
  3. 3. n nand then j=1 a[(2k−1)+2s]j = j=1 a(2k−1)j . Similarly proves (ii). n Sums of arithmetic progressions directly provide the identities 2 j=1 a1j = n n n 2 n3 n s=1 [1 2 + 2(s − 1)] + s=1 [n 2 + (2s − 1)] = 2 = c(n) − 2 and 2 j=1 a2j = n n n3 n s=1 [2n 2 − 2(s − 1)] + s=1 [(n 2 − 2)n + 2s] + n = 2 = c(n) + 2 .PROPOSITION 2. Every snake-shaped matrix with reflected columns ofeven orders A = (aij )n×n can be transformed into a semi-magic square fromthe swap of entries with the forms a(2k−1)j and a(2k)j , k ∈ I n , j ∈ In . 2Proof. Direct observation provides a(2k−1)(n−s) −a(2k)(n−s) = (−1)s (2s−1), k ∈I n , j ∈ In . From the Proposition 1 results n a(2k)j − n a(2k−1)j = n 2 j=1 j=1and, therefore, to transform A into semi-magic square is sufficient swap el- nements with forms a(2k−1)j and a(2k)j , transferring n units of 2 j=1 a(2k)j nfor the sum j=1 a(2k−1)j . This is equivalent to finding different numbers nx1 , x2 , ..., xr ∈ Ωn = 1 + 4s; 0 ≤ s < and diferents numbers y1 , ..., yk ∈ 2 nBn = 3 + 4s; 0 ≤ s < such that (eventually there may be only elements 2of Bn ): k r n yi − xi = ; 0<r+k ≤n (5) i=1 i=1 2 Let ξ(n) the number of different solutions for (5). The above method nprovides ξ(n) 2 semi-magic squares. The following, we show that in any sit-uation, (5) does not have empty solution. sSituation 1 ( n is odd). Direct observation gives us: 2 i=2 [3 + 4(i − 1)] − n s +3 i=1 [1 + 4(i − 1)] = 2s − 3, s ∈ {1, 2 }; 7 − (1 + 5) = 1. If s = / , then 2 22s − 3 = n . The largest summand of the sum is 3 + 4(s − 1) = n + 5, which 2is less than 2n. sSituation 2 ( n is even). Direct observation gives us: 2s = 2 i=1 [3 + 4(i − n s n1)] − i=1 [1 + 4(i − 1)], s = 0. Since 2 is even, we have n = 2 i=1 [3 4 + n4(i − 1)] − i=1 [1 + 4(i − 1)]. The largest summand is 4 3 + 4( n − 4 1), whichis smaller than 2n.Observation. The following list show ξ(n) and swaps for some values ofn. 3
  4. 4. 1) ξ(2) = 0. No swap.2) ξ(4) = 2; 3 − 1, 7 − 5.3) ξ(6) = 2; 3, (7+11)-(1+5+9).4) ξ(8) = 8; (3+7)-(1+5), (3+11)-(1+9), (3+15)-(1+13), (3+15)-(5+9),(7+11)-(1+13), (7+11)-(5+9), (7+15)-(5+13), (11+15)-(9+13).5) ξ(10) = 20; (3+7)-5, (3+7+11+15)-(1+13+17), (3+7+11+15)-(5+9+17),(3+7+11+19)-(5+13+17), (3+7+15+19)-(9+13+17), (3+11)-9, (3+11+19)-(1 +5+9+13), (3+15)-13, (3+15+19)-(1+5+9+17), (3+9)-17, (7+11)-13,(7+11+ 15)-(1+5+9+13), (7+11+19)-(1+5+9+17), (7+15)-17, (7+15+19)-(1+5+13+ 17), 11-(1+5), (11+15+19)-(1+9+13+17), 15-(1+9), 19-(1+13),19-(5+9).4. Examplesi) n=4: Ω4 = {1, 5 }, B4 = {3, 7 }. Here, 3-1=2 and 7-5=2.    01 15 06 12       08   10 03 13        09  07 14 04  01  15 06 12    16 02 11 05      08  10 03 13   →  09  07 11 05      01 15 06 12  16  02 14 04       08   10 03 13         16  02 11 05 01 02 03 04 01 15 03 13     09 07 14 04  08 07 06 05  → 08 10 06 12    →09 10 11 12 09 07 11 05    08 10 03 13   16 15 14 13 16 02 14 04    01 15 06 12         09 07 14 04       08  10 03 13     16  02 11 05  01  15 06 12    09 →  07 11 05   08  10 03 13    16  02 14 04       01   15 06 12    16 02 11 05        09 07 14 04 We have 3=3 and (7+11)-(1+5+9)=3.ii) n = 6 : Ω6 = {1, 5, 9} , B6 = {3, 7, 11}. 4
  5. 5.  01 35 03 33 08 31            12  26 10 28 05 30           13  23 15 21 20 19         24  14 22 16 17 18     01  35 03 33 08 31        25  11 27 09 32 07   12  26 10 28 05 30        13  36  02 34 04 29 06 23 15 21 20 19     →     24 14 22 16 17 18         25  01  35 03 33 08 31  11 27 09 29 07          12  26 10 28 05 30    36  02 34 04 32 06        13  23 15 21 20 19      24 14 22 16 17 18        01  35 03 33 08 31       36 02 34 04 29 06      12  26 10 28 05 30    25 11 27 09 32 07     13  23 15 21 17 19     24 →  14 22 16 20 18 01 35 03 33 08 31       25  11 27 09 29 07    12   36    26 10 28 05 30 02 34 04 32 06      24 14 22 16 17 18            13 23 15 21 20 19        01 35 03 33 08 31        25 11 27 09 32 07      12 26 10 28 05 30          36  02 34 04 29 06   24  14 22 16 17 18   →       13  23 15 21 20 19      01  35 03 33 08 31     25  11 27 09 29 07   12 26 10 28 05 30       36 02 34 04 32 06          24  14 22 16 17 18           13  23 15 21 20 19  01 02 03 04 05 06 01 35 03 33 05 31          36 02 34 04 29 06     12 11 10 09 08 07 12 26 10 28 08 30      25 11 27 09 32 07  13 14 15 16 17 18 13 23 15 21 17 19     → →24 23 22 21 20 19 24 14 22 16 20 18    12 26 10 28 05 30 25 26 27 28 29 30 25 11 27 09 29 07         01  35 03 33 08 31 36 35 34 33 32 31 36 02 34 04 32 06       13 23 15 21 20 19                24  14 22 16 17 18     12  26 10 28 05 30         25  11 27 09 32 07  01  35 03 33 08 31        36  02 34 04 29 06 13 23 15 21 20 19       →       24  14 22 16 17 18      25  12  26 10 28 05 30  11 27 09 29 07          01  35 03 33 08 31    36  02 34 04 32 06   13 23 15 21 20 19                24  14 22 16 17 18   12  26 10 28 05 30           36  02 34 04 29 06 01  35 03 33 08 31    25 11 27 09 32 07     13 23 15 21 17 19   →    24  14 22 16 20 18 12 26 10 28 05 30      25 11 27 09 29 07         01  35 03 33 08 31  36  02 34 04 32 06     24 14 22 16 17 18                13  23 15 21 20 19     12  26 10 28 05 30         25  11 27 09 32 07   01 35 03 33 08 31        36  02 34 04 29 06   24  14 22 16 17 18   →       13  23 15 21 20 19      12  26 10 28 05 30   25 11 27 09 29 07          01  35 03 33 08 31  36 02 34 04 32 06          24  14 22 16 17 18              13   23 15 21 20 19            36   02 34 04 29 06  25 11 27 09 32 07Conclusion From snake-shaped matrix (procedure 1) we can construct a wide class ofsemi-magic squares of any even orders disposing the numbers 1, 2, 3, · · · , n2in the same sequence with orders increasing in n rows of odd order and de- 2scending order in the n rows of even order and then effecting two procedures 2are as follows: 2) make reflection (rotation of π radians) in each of columnsof even order (after procedures 1 and 2 rows of all odd orders have equalsums c(n) − n ) and the rows of even orders sums equal to c(n) + n ); 3) swap 2 2of elements with forms a(2k−1)j and a(2k)j , transferring n units of n a(2k)j 2 j=1for the sum n a(2k−1)j . j=1 5
  6. 6. Acknowledgments We thank the students Oannes de Oliveira Miranda and Liuhan Oliveirade Miranda for discussions and suggestions.References [1] J. P. De Los Reyes, Ashish Das, Chand K. Midha and P. Vellaisamy. On a method to construct magic Rectangles of even order. New Delhi: Indian Statistical Institute, Delhi Centre, 2007. Available at http://www.isid.ac.in/∼statmath/2007/isid200709.pdf. 17/02/2012. [2] Leonhard Euler. On magic squares. Originally published as De quadratis magicis, Commentationes arithmeticae 2 (1849), 593-602. Translated from the Latin by Jordan Bell, 2004. Available at http://arxiv.org/pdf/math/0408230.pdf. 18/02/2012. [3] La Loubere, Simon de. A new historical relation of the king- dom of Siam. Ithaca, New York: Cornell University Li- brary. Print source: London, Tho. Horne. . . [and 2 others], 1693. Available at http://dlxs.library.cornell.edu/cgi/t/text/text- idx?c=sea;idno=sea130;view=toc;cc=sea. 29/2/2012. 6

×