SlideShare a Scribd company logo
1 of 6
Download to read offline
Semi-Magic Squares From
                Snake-Shaped Matrices
     Lohans de OLiveira Miranda, Instituto Antoine Lavoisier de Ensino,
                            Teresina-PI, Brasil

Lossian Barbosa Bacelar Miranda, Instituto Federal de Educa¸˜o Ciˆncia e
                                                           ca    e
                      Tecnologia do Piaui, Brasil

Abstract. Using snake-shaped matrices and reflections on their columns of
even order we present a method that generates a large class of semi-magic
squares.

Keywords: semi-magic squares, snake-shaped matrices, arithmetic progres-
sions.


1. Introduction
    Methods have been developed for the construction of magic rectangles
from snake-shaped matrices (see reference [1]), which consist of two steps.
In this paper we present an alternative method, which also makes use of
snake-shaped matrices, consisting of three steps. The first step is the same
as established in the literature and the second, slightly different. The third
is 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, but
applies to any rectangles with even numbers of rows and columns. To make
the construction three procedures (steps) can be used on the lines instead
of 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 aij
elements 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
t
and 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
                                                                   2
the 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 of
a snake-shaped matrix is equal to the magic constant. If all n columns of
                                                                2
an 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=1
c(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=1
c(n) + n , k ∈ I( n −1) , s ∈ I( n −k) .
       2          2              2


Proof (i): consider the snake-shaped matrix A = (aij )n×n that generates
A from the reflections of its n columns of even order. To this matrix we
                             2
have,

 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
n                                  n
and 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 of
even orders A = (aij )n×n can be transformed into a semi-magic square from
the swap of entries with the forms a(2k−1)j and a(2k)j , k ∈ I n , j ∈ In .
                                                                2
Proof. 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=1
and, therefore, to transform A into semi-magic square is sufficient swap el-
                                                                       n
ements with forms a(2k−1)j and a(2k)j , transferring n units of
                                                         2             j=1 a(2k)j
                     n
for the sum j=1 a(2k−1)j . This is equivalent to finding different numbers
                                          n
x1 , x2 , ..., xr ∈ Ωn = 1 + 4s; 0 ≤ s <     and diferents numbers y1 , ..., yk ∈
                                          2
                           n
Bn = 3 + 4s; 0 ≤ s <          such that (eventually there may be only elements
                           2
of 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
              n
provides ξ(n) 2 semi-magic squares. The following, we show that in any sit-
uation, (5) does not have empty solution.
                                                            s
Situation 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
                                                                         2
2s − 3 = n . The largest summand of the sum is 3 + 4(s − 1) = n + 5, which
           2
is less than 2n.
                                                                                            s
Situation 2 ( n is even). Direct observation gives us: 2s =
              2                                                                             i=1 [3   + 4(i −
                                                                                                        n
           s                                                    n
1)] −      i=1 [1   + 4(i − 1)],             s = 0. Since       2
                                                                    is even, we    have n =
                                                                                        2               i=1 [3
                                                                                                        4
                                                                                                                 +
                    n
4(i − 1)] − i=1 [1 + 4(i − 1)]. The largest summand is
                    4
                                                                                   3 + 4( n −
                                                                                          4
                                                                                                    1), which
is smaller than 2n.

Observation. The following list show ξ(n) and swaps for some values of
n.



                                                           3
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. Examples
i) 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
                                 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   07




Conclusion
    From snake-shaped matrix (procedure 1) we can construct a wide class of
semi-magic squares of any even orders disposing the numbers 1, 2, 3, · · · , n2
in the same sequence with orders increasing in n rows of odd order and de-
                                                   2
scending order in the n rows of even order and then effecting two procedures
                      2
are as follows: 2) make reflection (rotation of π radians) in each of columns
of even order (after procedures 1 and 2 rows of all odd orders have equal
sums c(n) − n ) and the rows of even orders sums equal to c(n) + n ); 3) swap
             2                                                      2
of elements with forms a(2k−1)j and a(2k)j , transferring n units of n a(2k)j
                                                          2           j=1
for the sum n a(2k−1)j .
                j=1


                                                                   5
Acknowledgments
   We thank the students Oannes de Oliveira Miranda and Liuhan Oliveira
de 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

More Related Content

What's hot

Sisteme de ecuatii
Sisteme de ecuatiiSisteme de ecuatii
Sisteme de ecuatii
Herpy Derpy
 
Linearequationintwovariable 120626053452-phpapp02
Linearequationintwovariable 120626053452-phpapp02Linearequationintwovariable 120626053452-phpapp02
Linearequationintwovariable 120626053452-phpapp02
Vineet Mehta
 
Ann chapter-3-single layerperceptron20021031
Ann chapter-3-single layerperceptron20021031Ann chapter-3-single layerperceptron20021031
Ann chapter-3-single layerperceptron20021031
frdos
 
Table 1
Table 1Table 1
Table 1
butest
 
Chapter 9 differentiation
Chapter 9  differentiationChapter 9  differentiation
Chapter 9 differentiation
atiqah ayie
 

What's hot (20)

2003 Ames.Models
2003 Ames.Models2003 Ames.Models
2003 Ames.Models
 
Momentum sudut total
Momentum sudut totalMomentum sudut total
Momentum sudut total
 
Solved exercises double integration
Solved exercises double integrationSolved exercises double integration
Solved exercises double integration
 
Generarlized operations on fuzzy graphs
Generarlized operations on fuzzy graphsGenerarlized operations on fuzzy graphs
Generarlized operations on fuzzy graphs
 
STUDY MATERIAL FOR IIT-JEE on Complex number
STUDY MATERIAL FOR IIT-JEE on Complex numberSTUDY MATERIAL FOR IIT-JEE on Complex number
STUDY MATERIAL FOR IIT-JEE on Complex number
 
Estimation and Prediction of Complex Systems: Progress in Weather and Climate
Estimation and Prediction of Complex Systems: Progress in Weather and ClimateEstimation and Prediction of Complex Systems: Progress in Weather and Climate
Estimation and Prediction of Complex Systems: Progress in Weather and Climate
 
Sisteme de ecuatii
Sisteme de ecuatiiSisteme de ecuatii
Sisteme de ecuatii
 
A new class of a stable implicit schemes for treatment of stiff
A new class of a stable implicit schemes for treatment of stiffA new class of a stable implicit schemes for treatment of stiff
A new class of a stable implicit schemes for treatment of stiff
 
Linearequationintwovariable 120626053452-phpapp02
Linearequationintwovariable 120626053452-phpapp02Linearequationintwovariable 120626053452-phpapp02
Linearequationintwovariable 120626053452-phpapp02
 
Ann chapter-3-single layerperceptron20021031
Ann chapter-3-single layerperceptron20021031Ann chapter-3-single layerperceptron20021031
Ann chapter-3-single layerperceptron20021031
 
Table 1
Table 1Table 1
Table 1
 
Multilinear singular integrals with entangled structure
Multilinear singular integrals with entangled structureMultilinear singular integrals with entangled structure
Multilinear singular integrals with entangled structure
 
Lesson30 First Order Difference Equations Handout
Lesson30   First Order Difference Equations HandoutLesson30   First Order Difference Equations Handout
Lesson30 First Order Difference Equations Handout
 
Paraproducts with general dilations
Paraproducts with general dilationsParaproducts with general dilations
Paraproducts with general dilations
 
Week 10 - Trigonometry
Week 10 - TrigonometryWeek 10 - Trigonometry
Week 10 - Trigonometry
 
Integrated Math 2 Section 6-6
Integrated Math 2 Section 6-6Integrated Math 2 Section 6-6
Integrated Math 2 Section 6-6
 
Int Math 2 Section 6-6 1011
Int Math 2 Section 6-6 1011Int Math 2 Section 6-6 1011
Int Math 2 Section 6-6 1011
 
Cross product
Cross productCross product
Cross product
 
Lesson32 Second Order Difference Equations Slides
Lesson32   Second Order Difference Equations SlidesLesson32   Second Order Difference Equations Slides
Lesson32 Second Order Difference Equations Slides
 
Chapter 9 differentiation
Chapter 9  differentiationChapter 9  differentiation
Chapter 9 differentiation
 

Viewers also liked

вебинар юзабилити Windows8
вебинар юзабилити Windows8вебинар юзабилити Windows8
вебинар юзабилити Windows8
Julia Suvorova
 
The nature of learner language
The nature of learner languageThe nature of learner language
The nature of learner language
vitaarum
 
172 вебинар UXRussia
172 вебинар UXRussia172 вебинар UXRussia
172 вебинар UXRussia
Julia Suvorova
 
Internal structure of a leaf
Internal structure of a leafInternal structure of a leaf
Internal structure of a leaf
LEONARD_AKO
 
เรียงความ
เรียงความเรียงความ
เรียงความ
Jensutthida
 

Viewers also liked (14)

Healthcare Sabha 2017
Healthcare Sabha 2017Healthcare Sabha 2017
Healthcare Sabha 2017
 
Using IT in Community Service
Using IT in Community ServiceUsing IT in Community Service
Using IT in Community Service
 
вебинар юзабилити Windows8
вебинар юзабилити Windows8вебинар юзабилити Windows8
вебинар юзабилити Windows8
 
District 7030 Website Training 2012
District 7030 Website Training 2012District 7030 Website Training 2012
District 7030 Website Training 2012
 
Poetic Journeys
Poetic JourneysPoetic Journeys
Poetic Journeys
 
Healthcare Sabha 2016
Healthcare Sabha 2016Healthcare Sabha 2016
Healthcare Sabha 2016
 
Starbucks – leaving australia
Starbucks – leaving australiaStarbucks – leaving australia
Starbucks – leaving australia
 
The nature of learner language
The nature of learner languageThe nature of learner language
The nature of learner language
 
Committment
CommittmentCommittment
Committment
 
Conflict resolution
Conflict resolutionConflict resolution
Conflict resolution
 
172 вебинар UXRussia
172 вебинар UXRussia172 вебинар UXRussia
172 вебинар UXRussia
 
Internal structure of a leaf
Internal structure of a leafInternal structure of a leaf
Internal structure of a leaf
 
managing disciplinary problems
managing disciplinary problemsmanaging disciplinary problems
managing disciplinary problems
 
เรียงความ
เรียงความเรียงความ
เรียงความ
 

Similar to Semi-Magic Squares From Snake-Shaped Matrices

Chapter 9 computation of the dft
Chapter 9 computation of the dftChapter 9 computation of the dft
Chapter 9 computation of the dft
mikeproud
 

Similar to Semi-Magic Squares From Snake-Shaped Matrices (20)

FOUR-CORNER TRIANGLE ROTATION METHOD AND MAGIC SQUARES FROM THOSE OF THE LOHANS
FOUR-CORNER TRIANGLE ROTATION METHOD AND MAGIC SQUARES FROM THOSE OF THE LOHANSFOUR-CORNER TRIANGLE ROTATION METHOD AND MAGIC SQUARES FROM THOSE OF THE LOHANS
FOUR-CORNER TRIANGLE ROTATION METHOD AND MAGIC SQUARES FROM THOSE OF THE LOHANS
 
Math report
Math reportMath report
Math report
 
balakrishnan2004
balakrishnan2004balakrishnan2004
balakrishnan2004
 
A family of implicit higher order methods for the numerical integration of se...
A family of implicit higher order methods for the numerical integration of se...A family of implicit higher order methods for the numerical integration of se...
A family of implicit higher order methods for the numerical integration of se...
 
1108 ch 11 day 8
1108 ch 11 day 81108 ch 11 day 8
1108 ch 11 day 8
 
Dsp lecture vol 2 dft & fft
Dsp lecture vol 2 dft & fftDsp lecture vol 2 dft & fft
Dsp lecture vol 2 dft & fft
 
Signals and systems: part i solutions
Signals and systems: part i solutionsSignals and systems: part i solutions
Signals and systems: part i solutions
 
Computer science-formulas
Computer science-formulasComputer science-formulas
Computer science-formulas
 
Laplace transformation
Laplace transformationLaplace transformation
Laplace transformation
 
Mth3101 Advanced Calculus Chapter 2
Mth3101 Advanced Calculus Chapter 2Mth3101 Advanced Calculus Chapter 2
Mth3101 Advanced Calculus Chapter 2
 
Imc2016 day2-solutions
Imc2016 day2-solutionsImc2016 day2-solutions
Imc2016 day2-solutions
 
Calculo integral - Larson
Calculo integral - LarsonCalculo integral - Larson
Calculo integral - Larson
 
Decimation in time and frequency
Decimation in time and frequencyDecimation in time and frequency
Decimation in time and frequency
 
Chapter 9 computation of the dft
Chapter 9 computation of the dftChapter 9 computation of the dft
Chapter 9 computation of the dft
 
Question answers Optical Fiber Communications 4th Edition by Keiser
Question answers Optical Fiber Communications 4th Edition by KeiserQuestion answers Optical Fiber Communications 4th Edition by Keiser
Question answers Optical Fiber Communications 4th Edition by Keiser
 
Lohans’ magic squares and the Gaussian elimination method
Lohans’ magic squares and the Gaussian elimination methodLohans’ magic squares and the Gaussian elimination method
Lohans’ magic squares and the Gaussian elimination method
 
Some Dynamical Behaviours of a Two Dimensional Nonlinear Map
Some Dynamical Behaviours of a Two Dimensional Nonlinear MapSome Dynamical Behaviours of a Two Dimensional Nonlinear Map
Some Dynamical Behaviours of a Two Dimensional Nonlinear Map
 
IIT Jam math 2016 solutions BY Trajectoryeducation
IIT Jam math 2016 solutions BY TrajectoryeducationIIT Jam math 2016 solutions BY Trajectoryeducation
IIT Jam math 2016 solutions BY Trajectoryeducation
 
Solution of Differential Equations in Power Series by Employing Frobenius Method
Solution of Differential Equations in Power Series by Employing Frobenius MethodSolution of Differential Equations in Power Series by Employing Frobenius Method
Solution of Differential Equations in Power Series by Employing Frobenius Method
 
Manual solucoes ex_extras
Manual solucoes ex_extrasManual solucoes ex_extras
Manual solucoes ex_extras
 

More from Lossian Barbosa Bacelar Miranda

QUADRADO MÁGICO GRAVITACIONAL DE MADEIRA COM MECANISMO DE TROCAS DE LINHAS E ...
QUADRADO MÁGICO GRAVITACIONAL DE MADEIRA COM MECANISMO DE TROCAS DE LINHAS E ...QUADRADO MÁGICO GRAVITACIONAL DE MADEIRA COM MECANISMO DE TROCAS DE LINHAS E ...
QUADRADO MÁGICO GRAVITACIONAL DE MADEIRA COM MECANISMO DE TROCAS DE LINHAS E ...
Lossian Barbosa Bacelar Miranda
 

More from Lossian Barbosa Bacelar Miranda (20)

QUADRADO MÁGICO GRAVITACIONAL DE MADEIRA COM MECANISMO DE TROCAS DE LINHAS E ...
QUADRADO MÁGICO GRAVITACIONAL DE MADEIRA COM MECANISMO DE TROCAS DE LINHAS E ...QUADRADO MÁGICO GRAVITACIONAL DE MADEIRA COM MECANISMO DE TROCAS DE LINHAS E ...
QUADRADO MÁGICO GRAVITACIONAL DE MADEIRA COM MECANISMO DE TROCAS DE LINHAS E ...
 
Actions of Groups of Magic Squares and Hypercubes - Algebraic-geometry Theo...
Actions of Groups of Magic Squares and Hypercubes  -  Algebraic-geometry Theo...Actions of Groups of Magic Squares and Hypercubes  -  Algebraic-geometry Theo...
Actions of Groups of Magic Squares and Hypercubes - Algebraic-geometry Theo...
 
Construction of Magic Squares by Swapping Rows and Columns.pdf
Construction of Magic Squares by Swapping Rows and Columns.pdfConstruction of Magic Squares by Swapping Rows and Columns.pdf
Construction of Magic Squares by Swapping Rows and Columns.pdf
 
New Information on the Generalized Euler-Tricomi Equation
New Information on the Generalized Euler-Tricomi Equation New Information on the Generalized Euler-Tricomi Equation
New Information on the Generalized Euler-Tricomi Equation
 
Novas Informações Sobre a Equação Generalizada de Euler-Tricomi
Novas Informações Sobre a Equação Generalizada de Euler-TricomiNovas Informações Sobre a Equação Generalizada de Euler-Tricomi
Novas Informações Sobre a Equação Generalizada de Euler-Tricomi
 
Novas Informações Sobre a Equação de Euler-Tricomi
Novas Informações Sobre a Equação de Euler-TricomiNovas Informações Sobre a Equação de Euler-Tricomi
Novas Informações Sobre a Equação de Euler-Tricomi
 
One solution for many linear partial differential equations with terms of equ...
One solution for many linear partial differential equations with terms of equ...One solution for many linear partial differential equations with terms of equ...
One solution for many linear partial differential equations with terms of equ...
 
UMA MESMA SOLUÇÃO PARA MUITAS EQUAÇÕES DIFERENCIAIS PARCIAIS LINEARES DE ORDE...
UMA MESMA SOLUÇÃO PARA MUITAS EQUAÇÕES DIFERENCIAIS PARCIAIS LINEARES DE ORDE...UMA MESMA SOLUÇÃO PARA MUITAS EQUAÇÕES DIFERENCIAIS PARCIAIS LINEARES DE ORDE...
UMA MESMA SOLUÇÃO PARA MUITAS EQUAÇÕES DIFERENCIAIS PARCIAIS LINEARES DE ORDE...
 
Functions and Methods of Construction of Magic Squares
Functions and Methods of Construction of Magic SquaresFunctions and Methods of Construction of Magic Squares
Functions and Methods of Construction of Magic Squares
 
Sequences of New Methods of Construction of Doubly Even Magic Squares
Sequences of New Methods of Construction of Doubly Even Magic SquaresSequences of New Methods of Construction of Doubly Even Magic Squares
Sequences of New Methods of Construction of Doubly Even Magic Squares
 
Cota Inferior para o Número de Quadrados Mágicos Advindos dos Duais dos Quadr...
Cota Inferior para o Número de Quadrados Mágicos Advindos dos Duais dos Quadr...Cota Inferior para o Número de Quadrados Mágicos Advindos dos Duais dos Quadr...
Cota Inferior para o Número de Quadrados Mágicos Advindos dos Duais dos Quadr...
 
The Four Pandiagonal Magic Squares of Nagarjuna
 The Four Pandiagonal Magic Squares of Nagarjuna The Four Pandiagonal Magic Squares of Nagarjuna
The Four Pandiagonal Magic Squares of Nagarjuna
 
Generalization of Dürer's Magic Square and New Methods for Doubly Even Magic ...
Generalization of Dürer's Magic Square and New Methods for Doubly Even Magic ...Generalization of Dürer's Magic Square and New Methods for Doubly Even Magic ...
Generalization of Dürer's Magic Square and New Methods for Doubly Even Magic ...
 
Arithmetic Progressions and the Construction of Doubly Even Magic Squares and...
Arithmetic Progressions and the Construction of Doubly Even Magic Squares and...Arithmetic Progressions and the Construction of Doubly Even Magic Squares and...
Arithmetic Progressions and the Construction of Doubly Even Magic Squares and...
 
Arithmetic Progressions and the Construction of Doubly Even Magic Squares (Fo...
Arithmetic Progressions and the Construction of Doubly Even Magic Squares (Fo...Arithmetic Progressions and the Construction of Doubly Even Magic Squares (Fo...
Arithmetic Progressions and the Construction of Doubly Even Magic Squares (Fo...
 
Arithmetic Progressions and the Construction of Doubly Even Magic Squares
Arithmetic Progressions and the Construction of Doubly Even Magic SquaresArithmetic Progressions and the Construction of Doubly Even Magic Squares
Arithmetic Progressions and the Construction of Doubly Even Magic Squares
 
Princípios básicos da matemática do movimento - PDF
Princípios básicos da matemática do movimento - PDFPrincípios básicos da matemática do movimento - PDF
Princípios básicos da matemática do movimento - PDF
 
O pêndulo matemático e as funções elípticas copy
O pêndulo matemático e as funções elípticas copyO pêndulo matemático e as funções elípticas copy
O pêndulo matemático e as funções elípticas copy
 
Questionário de ads. 10. 2012
Questionário de ads. 10. 2012Questionário de ads. 10. 2012
Questionário de ads. 10. 2012
 
Princípios básicos da matemática do movimento
Princípios básicos da matemática do movimentoPrincípios básicos da matemática do movimento
Princípios básicos da matemática do movimento
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

Semi-Magic Squares From Snake-Shaped Matrices

  • 1. Semi-Magic Squares From Snake-Shaped Matrices Lohans de OLiveira Miranda, Instituto Antoine Lavoisier de Ensino, Teresina-PI, Brasil Lossian Barbosa Bacelar Miranda, Instituto Federal de Educa¸˜o Ciˆncia e ca e Tecnologia do Piaui, Brasil Abstract. Using snake-shaped matrices and reflections on their columns of even order we present a method that generates a large class of semi-magic squares. Keywords: semi-magic squares, snake-shaped matrices, arithmetic progres- sions. 1. Introduction Methods have been developed for the construction of magic rectangles from snake-shaped matrices (see reference [1]), which consist of two steps. In this paper we present an alternative method, which also makes use of snake-shaped matrices, consisting of three steps. The first step is the same as established in the literature and the second, slightly different. The third is 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, but applies to any rectangles with even numbers of rows and columns. To make the construction three procedures (steps) can be used on the lines instead of 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 aij elements 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. t and 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 2 the 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 of a snake-shaped matrix is equal to the magic constant. If all n columns of 2 an 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=1 c(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=1 c(n) + n , k ∈ I( n −1) , s ∈ I( n −k) . 2 2 2 Proof (i): consider the snake-shaped matrix A = (aij )n×n that generates A from the reflections of its n columns of even order. To this matrix we 2 have, 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. n n and 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 of even orders A = (aij )n×n can be transformed into a semi-magic square from the swap of entries with the forms a(2k−1)j and a(2k)j , k ∈ I n , j ∈ In . 2 Proof. 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=1 and, therefore, to transform A into semi-magic square is sufficient swap el- n ements with forms a(2k−1)j and a(2k)j , transferring n units of 2 j=1 a(2k)j n for the sum j=1 a(2k−1)j . This is equivalent to finding different numbers n x1 , x2 , ..., xr ∈ Ωn = 1 + 4s; 0 ≤ s < and diferents numbers y1 , ..., yk ∈ 2 n Bn = 3 + 4s; 0 ≤ s < such that (eventually there may be only elements 2 of 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 n provides ξ(n) 2 semi-magic squares. The following, we show that in any sit- uation, (5) does not have empty solution. s Situation 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 2 2s − 3 = n . The largest summand of the sum is 3 + 4(s − 1) = n + 5, which 2 is less than 2n. s Situation 2 ( n is even). Direct observation gives us: 2s = 2 i=1 [3 + 4(i − n s n 1)] − i=1 [1 + 4(i − 1)], s = 0. Since 2 is even, we have n = 2 i=1 [3 4 + n 4(i − 1)] − i=1 [1 + 4(i − 1)]. The largest summand is 4 3 + 4( n − 4 1), which is smaller than 2n. Observation. The following list show ξ(n) and swaps for some values of n. 3
  • 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. Examples i) 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. 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 07 Conclusion From snake-shaped matrix (procedure 1) we can construct a wide class of semi-magic squares of any even orders disposing the numbers 1, 2, 3, · · · , n2 in the same sequence with orders increasing in n rows of odd order and de- 2 scending order in the n rows of even order and then effecting two procedures 2 are as follows: 2) make reflection (rotation of π radians) in each of columns of even order (after procedures 1 and 2 rows of all odd orders have equal sums c(n) − n ) and the rows of even orders sums equal to c(n) + n ); 3) swap 2 2 of elements with forms a(2k−1)j and a(2k)j , transferring n units of n a(2k)j 2 j=1 for the sum n a(2k−1)j . j=1 5
  • 6. Acknowledgments We thank the students Oannes de Oliveira Miranda and Liuhan Oliveira de 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