Wednesday, June 6, 2007

MS9. MAGIC SQUARES

Other Methods:
We conclude this part with a few methods which are more of academic interest as they yield one or just a few squares. Cosider the picture below (dashes have been used to fill up empty spaces):
- - - - - - - - 01 - - - - - - - -
- - - - - - - 06 - 02 - - - - - - -
- - - - - - 11 - 07 - 03 - - - - - -
- - - - - 16 - 12 - 08 - 04 - - - - -
- - - - 21 - 17 - 13 - 09 - 05 - - - -
- - - - - -22 - 18 - 14 - 10 - - - - -
- - - - - - - 23 - 19 - 15 - - - - - -
- - - - - - - - 24 - 20 - - - - - - -
- - - - - - - - - 25 - - - - - - - - -
Now we have to simply move the numbers, which are outside the main square, 5
steps to the empty spaces to get the following 5x5 square.
11 24 07 20 03
04 12 25 08 16
17 05 13 21 09
10 18 01 14 22
23 06 19 02 15
This method is attributed to Bachet de Meziriac. Same principle holds good for constuction of higher order odd squares. We now have a look at a 6x6 square. Write numbers from 1 to 36 in their natural order as shown below:
01 02 03 04 05 06
07 08 09 10 11 12
13 14 15 16 17 18
19 20 21 22 23 24
25 26 27 28 29 30
31 32 33 34 35 36
Replace 2,3,4,5 by 35,34,3,32 respectively; 7 & 25 by 30 & 12; 13 & 19 by 24 & 13; 9 & 10 by 28 & 27; 12 & 30 by 7 & 25; 18 & 24 by 19 & 18; 17 & 23 by 14 & 20; 27 & 28 by 9 & 10; 32, 3, 34, 35 by 2, 4, 33, 5 respectively, giving a 6x6 square as under:
01 35 34 03 32 06
30 08 28 27 11 07
24 23 15 16 14 19
13 17 21 22 20 18
12 26 09 10 29 25
31 02 04 33 05 36
Note that diagonal numbers were not changed. Since 6/2 is odd a 6x6 square needs quite a few changes making it cumbersome, however, it is easier to construct a 8x8 square this way. Write the numbers 1 to 64 in their natural order as shown below:
01 02 03 04 05 06 07 08
09 10 11 12 13 14 15 16
17 18 19 20 21 22 23 24
25 26 27 28 29 30 31 32
33 34 35 36 37 38 39 40
41 42 43 44 45 46 47 48
49 50 51 52 53 54 55 56
57 58 59 60 61 62 63 64_
Now divide by 2 vertical and 2 horizontal lines so that in each corner there is a 2x2 square and in the center a 4x4 square. Within these 5 squares inter-change all pairs of numbers symmetrically opposite. Outside the 5 squares no change is required. The resulting square will thus be as under:
64 63 03 04 05 06 58 57
56 55 11 12 13 14 50 49
17 18 46 45 44 43 23 24
25 26 38 37 36 35 31 32
33 34 30 29 28 27 39 40
41 42 22 21 20 19 47 48
16 15 51 52 53 54 10 09
08 07 59 60 61 62 02 01
Well we can go the other way round too. Keep the 4 corner 2x2 squares and the central 4x4 square as they are and reverse the other 4x2 squares in rows 3, 4, 5 & 6 and columns 1 & 2 and 7 & 8 and the rows 1 & 2 and 7 & 8 in columns 3, 4, 5 & 6 to form the new square. I will illustrate this by 12x12 cell, but before that please note that this method is valid for all squares which are multiples of 4. So if the square is 4nx4n, we take the corner cells of the order nxn and the central cell of the order 2nx2n for reversal. Alternately we retain the 4 corner nxn squares and central 2nx2n squares unchanged and reverse the squares, as seen below for the 12x12 square.
001 002 003 141 140 139 138 137 136 010 011 012
013 014 015 129 128 127 126 125 124 022 023 024
025 026 027 117 116 115 114 113 112 034 035 036
108 107 106 040 041 042 043 044 045 099 098 097
096 095 094 052 053 054 055 056 057 087 086 085
084 083 082 064 065 066 067 068 069 075 074 073
072 071 070 076 077 078 079 080 081 063 062 061
060 059 058 088 089 090 091 092 093 051 050 049
048 047 046 100 101 102 103 104 105 039 038 037
109 110 111 033 032 031 030 029 028 118 119 120
121 122 123 021 020 019 018 017 016 130 131 132
133 134 135 009 008 007 006 005 004 142 143 144
It will be noticed that here too we can generate a large number of squares very easily. It will be noticed that pairs of numbers have same total, which can be interchanged without affecting the diagonal totals. A few examples:2+95=3+94, 2+83=3+82, 84+109=85+110, etc. More, work out yourself. It will also be seen that it can be done in 8x8 square too.

No comments: