Magic Squares

advertisement
Magic Squares Report
Introduction
Chapter 1: The History of Magic Squares
Chapter 2: What is a Magic Square?
2.1: Odd Order
2.2: Doubly Even
2.3: Singly Even
Chapter 3: Variations on Magic Squares
3.1: Panmagic
3.2: Anti-Magic Squares
3.3: Franklin Squares
3.4: Latin Squares
3.4.1: Graeco-Latin Squares
Chapter 4: Applications of Magic Squares
4.1: Music
4.2: Sudoku
Conclusion
References
Introduction
This report aims to explore the possible applications of magic squares in everyday
life. In doing this, different types of magic squares will be investigated and the
methods used to construct them. How magic squares have evolved and where they
originally came from should also be considered. Also, variations on the basic magic
square will be looked at to see if these have any practical applications.
Chapter 1: The History of Magic Squares
The earliest magic square known dates from around 2800 B.C. in China. A Chinese
myth says that Emperor Yu found a tortoise with a pattern on its shell while walking
along the Yellow River. He called this unique diagram, Loh-Shu (Anderson, 2001).
The Loh-Shu Tortoise
(Fig 1.1)
However, the first recorded magic square was described as the scroll of the river Loh
or Loh-Shu by Fuh-Hi (Farrar, 1997 & Grogono, 2004). It is a 3x3 magic square with
symbols rather than numbers (See fig 1.2). The Chinese scholars of today have only
managed to trace the Loh-Shu back as far as the fourth century B. C. and from then
until the tenth century it was seen as a symbol of great significance. This Loh-Shu
was numerical, with the number of dots in each symbol representing a whole number
(See fig 1.2). The even numbers were thought to represent the female principle, yin,
and the odd numbers the male principle, yang. The 5 in the middle was thought to be
the earth, around which lie the other four elements; metal, 4 and 9, fire, 2 and 7,
water, 1 and 6 and wood 3 and 8 (Gardner, 1988).
The Loh-Shu Magic Square
(Fig 1.2)
There are also Greek writings relating to magic squares from around 1300 B.C.
(Farrar, 1997). It is thought that from China, magic squares were introduced to Indian
culture, and it was there that the first magic square of order four was discovered
(Swaney, 2000). In India, magic squares were used not only in the traditional
mathematical context, but also for other applications such as in recipes for making
perfume and also in medical work, with a third order magic square appearing as a
means of easing childbirth (Anderson, 2001).
Islamic and Arabic mathematicians were aware of magic squares, probably from the
Indians, by about the fifth century A.D. and are often attributed to using them in
astrology and predictions. Their magic squares were of larger order & they compiled a
list of magic squares up to order nine (Ballew, 2006). It was Islamic mathematicians
who first made simple rules for creating magic squares. In around 1300, the
Byzantine, Manual Moschopoulos, wrote a book based on the findings of Al-Buni, an
Arab mathematician, about magic squares. It was Moschopoulos who introduced
magic squares to Europe, where they were associated with divination, alchemy and
astrology (Anderson, 2001).
Since then, magic squares have been looked at in relation to planets and the sun, art
and religion. Also in the past, magic squares were important in African culture. They
held spiritual importance and were often inscribed on masks, clothes and religious
artefacts and were influential in house design and building (Anderson, 2001).
Chapter 2: What is a Magic Square?
A basic magic square of order n can be defined as an arrangement of numbers 1 to n 2
in an n n matrix, such that every row, column and diagonal add up to the same
number (Adler, 1996). The magic sum, or the number that each row, column and
diagonal add up to can be found by the formula


1
n n 2  1 (Ball, 1959). In general,
2
magic squares remain magic if the same positive integer is added to each number in
the square or each number in the original square is multiplied by the same number
(Kraitchik, 1960).
A basic 4x4 magic square
(Fig 2.1)
2.1: Odd Order
An odd order magic square is of the form, n  2m  1. There are several methods of
generating such magic squares for m  1 . With the most common being the known as
the Siamese or staircase method (see fig 2.1.1). In this method the numbers are written
in ascending numerical order as an upward diagonal to the right. When a filled square
is reached the next number is placed vertically below its predecessor. This method
was devised by De la Loubère when the 1 is placed in the middle column of the top
row (Ball, 1959). If the 1 lies in the middle column on the row directly above the
middle row it is known as the method of Bachet de Méziriac (Kraitchik, 1960).
The Siamese or staircase method for generating odd order magic squares
(Fig 2.1.1)
2.2: Doubly Even
A doubly even magic square is in the form n  4m . One method of constructing this
type of magic square, for m  1 , is the cross method (See fig 2.2.1). By writing all the
numbers in order from the top left of a square to the bottom right, then drawing a
cross through every 4x4 square, or sub-square of a larger square, and swapping the
numbers along the diagonals of the cross, will yield a magic square.
The cross method for generating doubly even magic squares
(Fig 2.2.1)
2.3: Singly Even
A singly even magic square is of the form 4m  2 , when m  1 . One method of
construction is that of Ralph Strachey, to divide the square up into equal quarters. For
example, in a 6x6 square, this will give four 3x3 squares. Each of these can then be
formed using De la Loubère’s method for odd order squares (Ball, 1959).
8
1
6
26 19 24
3
5
7
21 23 25
4
9
2
22 27 20
35 28 33 17 10 15
30 32 34 12 14 16
31 36 29 13 18 11
Strachey Method
(Fig 2.3.1)
Another method for generating singly even magic squares was found by J. H. Conway
and is called the LUX method. Create m  1 rows of L followed by one row of U and
then m 1 rows of X at the bottom. Then swap the middle U with the L directly above
it. The rows of letters form an odd order square, so starting at the top middle L, put in
the numbers working through the letters using the De la Loubère method (Weisstein,
2003).
LUX method
(Fig 2.3.2)
Chapter 3: Variations on Magic Squares
There are many variations of magic squares such as border squares, magic stars,
cubes, rectangles and other shapes, alphamagic squares, reversible and complimentary
magic squares among others. It was felt that looking into Franklin squares, Latin
squares and panmagic squares would give the most insight to possible applications.
3.1: Panmagic Squares
Panmagic squares, also known as pandiagonal and diabolic squares, have the same
properties as normal magic squares except that all the broken diagonals of the square
must also equal the magic sum (Ball, 1959), therefore the square must be magic along
all rows, columns, the two full diagonals and all broken diagonals (See Fig 3.1.1).
Panmagic squares do not exist for order 3 or for order 4m  2 , where m is any integer.
The Siamese method for generating odd order magic squares will produce panmagic
squares for order 6m  1 when using vector (2, 1) and break vector (1, -1) (Weisstein,
2006). Where the vector is the number of cells moved across and down respectively.
The break vector is how the pattern changes when a filled cell is reached again.
Broken diagonals
(Fig 3.1.1)
3.2: Antimagic Squares
An antimagic square is the complete opposite of a magic square in that all the rows,
columns and diagonals equal different values. They contain the same numbers, 1 to
n 2 , just in a different arrangement. Antimagic squares of order 1, 2 and 3 are
impossible to create (Weisstein, 2002).
(Fig 3.2.1)
Examples of antimagic squares
3.3: Franklin Squares
Benjamin Franklin produced several magic squares during the mid 1700’s, many of
which were only partial Latin squares since their diagonal totals did not add up to the
magic sum. However, they had other properties which made them of interest to
mathematicians.
260
260
292
52
61
4
13
20
29
36
45
260
14
3
62
51
46
35
30
19
260
53
60
5
12
21
28
37
44
260
11
6
59
54
43
38
27
22
260
55
58
7
10
23
26
39
42
260
9
8
57
56
41
40
25
24
260
50
63
2
15
18
31
34
47
260
16
1
64
49
48
33
32
17
260
260 260 260 260 260 260 260 260 228
Franklin’s original 8x8 square
(Fig 3.3.1)
130
130
52
61
4
13
20
29
36
45
260
14
3
62
51
46
35
30
19
260
53
60
5
12
21
28
37
44
260
11
6
59
54
43
38
27
22
260
55
58
7
10
23
26
39
42
260
9
8
57
56
41
40
25
24
260
50
63
2
15
18
31
34
47
260
16
1
64
49
48
33
32
17
228
130
Franklin’s original 8x8 square
(Fig 3.3.2)
As fig 3.3.1 shows, Franklin was interested in looking at bendy rows which also sum
to the same constant as each row and column. From fig 3.3.2, it is clear that in an 8x8
Franklin square, all the half rows and half columns and any 2x2 sub-square within it
total half of the magic sum (Morris, 2005).
When considering Franklin’s 16x16 square (see fig 3.3.3), the bendy rows and
columns and any half rows or colums add up to half the row or column total, but there
are no sub-squares which do. This is because half a row would be 8 cells, no subsquare can contain 8 cells because there is no value for n such that n 2  8 .
2168
2040 199
216
231
248
7
24
39
56
71
88
103
120
135
152
167
184 2040
57
38
25
6
249
230
217
198
185
166
153
134
121
102
89
70
197
218
229
250
5
26
37
58
69
90
101
122
133
154
165
186 2040
59
36
27
4
251
228
219
196
187
164
155
132
123
100
91
68
200
215
232
247
8
23
40
55
72
87
104
119
136
151
168
183 2040
54
41
22
9
246
233
214
201
182
169
150
137
118
105
86
73
202
213
234
245
10
21
42
53
74
85
106
117
138
149
170
181 2040
52
43
20
11
244
235
212
203
180
171
148
139
116
107
84
75
204
211
236
243
12
19
44
51
76
83
108
115
140
147
172
179 2040
50
45
18
13
242
237
210
205
178
173
146
141
114
109
82
77
206
209
238
241
14
17
46
49
78
81
110
113
142
145
174
177 2040
48
47
16
15
240
239
208
207
176
175
144
143
112
111
80
79
195
220
227
252
3
28
35
60
67
92
99
124
131
156
163
188 2040
61
34
29
2
253
226
221
194
189
162
157
130
125
98
93
66
193
222
225
254
1
30
33
62
65
94
97
126
129
158
161
190 2040
63
32
31
0
255
224
223
192
191
160
159
128
127
96
95
64
2040
2040
2040
2040
2040
2040
2040
2040
2040
2040 2040 2040 2040 2040 2040 2040 2040 2040 2040 2040 2040 2040 2040 2040 2040 1912
Franklin’s original 16x16 square
(Fig 3.3.3)
3.4: Latin Squares
A Latin square differs from a normal magic square in that it is an n n matrix
containing only the numbers 1 to n rather than 1 to n 2 . They are written in such a
way that each row and column contain every number only once. Latin squares can be
formed for any order, for example there is one Latin square of order 1, two of order 2
(See fig 3.4.1), twelve of order 3 (See fig 3.4.2) and 576 of order 4 (Weisstein, 2006).
Latin squares of order 2
(Fig 3.4.1)
Latin squares of order 3
(Fig 3.4.2)
3.4.1: Graeco Latin Squares
Graeco Latin squares are so called because it is customary to use Latin letters as the
symbols in one square and Greek letters for the symbols of a second square. They are
also known as Euler squares and exist for all n , except n  2 and n  6 (Beezer,
1995).
A Graeco-Latin square of order 10
(Fig 3.4.3)
Chapter 4: Applications of Magic Squares
Modern day applications of magic squares are difficult to find. There seems to be
some sort of link between magic squares and music and the Latin squares along with
the Greaco Latin squares are used in the popular puzzle, Sudoku. Apart from that,
other applications found were from mathematicians in history which no longer apply.
4.1: Music
The main area of the application of magic squares to music is in rhythm, rather than
notes. Indian musicians seem to have applied them to their music and they seem to be
useful in time cycles and additive rhythm. In this case it is not the usual magic
properties of a square that are important, but the relationship of the central number to
the total sum of all the numbers in the magic square. This is because for rhythm,
consecutive numbers 1 to n 2 are not used to fill the cells of the n n magic square.
This relationship is:
The total sum of the magic square’s numbers = central number x 9.
This is important to music as it shows the size of the magic square, which is how
many pulses or sub-divisions there are in the sequence, this will indicate how and
where to apply it.
3 5
7
5 8
11
7 11 15
Magic Square for Rhythm
(Fig 4.1.1)
Using fig 4.1.1 as an example, 8x9=72 gives the size of the magic square. This can
therefore be applied to a piece of music with 18 crotchet beats since 18x4=72. Rests
can also be added between the first and second or second and third rows to create a
feeling of the music building towards a cadence. By choosing different values for the
rests, the same magic square can create many different musical passages (Dimond,
2006).
4.2: Sudoku
Sudoku was first introduced in 1979 and became popular in Japan during the 1980’s
(Pegg & Weisstein, 2006). It has recently become a very popular puzzle in Europe,
but it is actually a form of Latin square. A Sudoku square is a 9x9 grid, split into 9
3x3 sub-squares. Each sub-square is filled in with the numbers 1 to n where n  9 , so
that the 9x9 grid becomes a Latin square. This means each row and column contain
the numbers 1 to 9 only once. Therefore each row, column and sub-square will sum to
the same amount.
An Example of a Sudoku Square
(Fig 4.2.1)
Conclusion
Mathematicians today do not need to speculate and attach meaning to magic squares
to make them important, as has been done in the past with Chinese and other myths.
The squares were thought to be mysterious and magic, although now it is clear that
they are just ways of arranging numbers and symbols using certain rules. They can be
applied to music and Sudoku as has been discussed but are mainly of interest in
mathematics for their “magic” properties rather than their practical applications.
References
Adler,
A.
(1996).
What
is
a
magic
square?
[online].
Available
http://mathforum.org/alejandre/magic.square/adler/adler.whatsquare.html
from
[Accessed
7th December 2006].
Anderson,
D.
L.
(2001).
Magic
Squares
[online].
Available
from
http://illuminations.nctm.org/LessonDetail.aspx?id=L263 [Accessed 6th Dcember
2006].
Ball, W. W. R. (1959). Mathematical recreations and essays. London. Macmillan &
Co Ltd.
Ballew,
P.
(2006).
Magic
squares
[online].
Available
from
http://www.pballew.net/magsquar.html [Accessed 7th December 2006].
Beezer,
R.
(1995).
Graeco-Latin
squares
[online].
Available
from
http://buzzard.ups.edu/squares.html [Accessed 5th December 2006].
Dimond,
J.
(2006).
Magic
squares
[online].
Available
from
http://www.jonathandimond.com/downloadables/Magic%20Squares.pdf [Accessed 8th
December 2006].
Farrar, M. S. (1997). History of magic squares [online]. Available from
http://www.markfarrar.co.uk/msqhst01.htm [Accessed 6th December 2006].
Gardner, M. (1988). Time travel and other mathematical bewilderments. New York.
W. H. Freeman and Company.
Grogono, A. W. (2004). A mini-history of magic squares [online]. Available from
http://www.grogono.com/magic/history.php [Accessed 6th December 2006].
Kraitchik, M. (1960). Mathematical Recreations. London. George Allen & Unwin
Ltd.
Morris,
D.
(2005).
Franklin
squares
primer
[online].
http://www.bestfranklinsquares.com/franklinsquaresprimer2.html
Available
from
[Accessed
8th
December 2006].
Pegg, E. Jnr. & Weisstein, E. W. (2006). Sudoku [online]. Available from
http://mathworld.wolfram.com/Sudoku.html [Accessed 5th December 2006].
Swaney, M. (2000). Mark Swaney on the history of magic squares [online]. Available
from http://www.ismaili.net/mirrors/Ikhwan_08/magic_squares.html [Accessed 7th
December 2006].
Weisstein,
E.
W.
(2002).
Antimagic
Square
http://mathworld.wolfram.com/AntimagicSquare.html
[online].
[Accessed
Available
8th
from
December
2006].
Weisstein,
E.
W.
(2003).
Magic
Square
[online].
Available
from
http://mathworld.wolfram.com/MagicSquare.html [Accessed 7th December 2006].
Weisstein,
E.
W.
(2006).
Latin
square
[online].
Available
from
http://mathworld.wolfram.com/LatinSquare.html [Accessed 5th December 2006].
Weisstein,
E.
W.
(2006).
Panmagic
square
[online].
Available
from
http://mathworld.wolfram.com/PanmagicSquare.html [Accessed 8th December 2006].
Download