The Anti-Magic Square Project: Construction
Madachy asks "Are there any systematic methods by which antimagic
squares may be constructed?" It seems that up until now, no such method
was known. Here, we present several constructions discovered this summer.
Direct Product
We can use a Kronecker type matrix product to turn small squares into
larger squares. In what follows At will be used to denote
transpose of an array A. We will give just one example, since
this should be enough to give the reader the general idea from which to
write down a proof if so desired. The construction takes a negative
AMS(4), a MS(n) and some special 4 x 4 subsquares as ingredients to produce
an AMS(4n). We shall use the following AMS(4) in our example
A |
|
= |
|
| | | |
29 |
2 | 13 | 11 | 7 |
33 |
4 | 14 | 5 | 9 |
32 |
15 | 1 | 12 | 8 |
36 |
16 | 10 | 3 | 6 |
35 |
37 |
38 |
31 |
30 |
34 |
|
|
= |
|
| | | |
-5 |
2 | 13 | 11 | 7 |
-1 |
4 | 14 | 5 | 9 |
-2 |
15 | 1 | 12 | 8 |
+2 |
16 | 10 | 3 | 6 |
+1 |
3 |
4 |
-3 |
-4 |
0 |
|
The vector of relative row sums is at,
where a = (-1,-2,2,1).
The vector of relative column sums is
b = (3,4,-3,-4), and the differences along the
main and back diagonals are 0 and -5 respectively.
In addition to the above square we will need the following three squares,
each labelled with its differences.
B= |
| | | |
-8 |
13 | 2 | 5 | 10 |
-4 |
1 | 14 | 9 | 6 |
-4 |
16 | 3 | 8 | 11 |
+4 |
4 | 15 | 12 | 7 |
+4 |
0 |
0 |
0 |
0 |
8 |
|
| | |
| | |
C= |
| | | |
-17 |
9 | 2 | 13 | 6 |
-4 |
10 | 11 | 1 | 8 |
-4 |
12 | 7 | 15 | 4 |
+4 |
3 | 14 | 5 | 16 |
+4 |
0 |
0 |
0 |
0 |
17 |
|
| | |
| | |
D= |
| | | |
0 |
13 | 9 | 2 | 6 |
-4 |
1 | 10 | 11 | 8 |
-4 |
15 | 12 | 7 | 4 |
+4 |
5 | 3 | 14 | 16 |
+4 |
0 |
0 |
0 |
0 |
12 |
|
Let us write 0= (0,0,0,0) and p = (-4,-4,+4,+4).
If M is a matrix and n is a number let us agree that n+M and M+n
both indicate the matrix M with the number n added to each entry. This
is an abuse of notation, but it makes things easier to write down.
Starting with the MS(4) below
M= |
1 | 15 | 14 | 4 |
12 | 6 | 7 | 9 |
8 | 10 | 11 | 5 |
13 | 3 | 2 | 16 |
|
We form the Kronecker product
1 | 15 | 14 | 4 |
12 | 6 | 7 | 9 |
8 | 10 | 11 | 5 |
13 | 3 | 2 | 16 |
|
×
|
|
=
|
M+112 | M | M+80 |
M+32 | M+64 | M+96 |
M+48 | M+128 | M+16 |
|
The result is a magic square of order 12. Next we unplug subsquares and
plug in some of the squares we introduced above
to get the 12 x 12 square below, which is labelled with its
differences
| | |
-13 |
A+112 | Bt | Dt +80 |
at |
B+32 | A+64 | Bt +96 |
at+pt |
B+48 | B+128 | A+16 |
at+2pt |
b |
b+p |
b+2p |
0 |
Now it is a simple matter to check that the above square is a
negative AMS(12). The interested reader may at this point have some
fun in carrying out this construction in general so that it produces
a negative AMS(4n) for n >2.
When good squares turn bad: Magic -> Anti-Magic conversion
We have developed a probabilistic algorithm to change a magic square
into an antimagic one. The program starts with a magic square and performs
swaps of pairs of entries that do not interfere with each other as it attempts to make
an antimagic square. The success rate is quite high when the program is fed a magic
square that is a product of an MS(4) and an MS(n). See the list of
C programs written for this project.
Composed by
John Cormie
Updated: July 21 1999
Back to main