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 117 33
4 14 59 32
15 1 128 36
16 10 36 35
37 38 31 30 34
=
-5
2 13 117 -1
4 14 59 -2
15 1 128 +2
16 10 36 +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 510 -4
1 14 96 -4
16 3 811 +4
4 15 127 +4
0 0 0 0 8
C=
-17
9 2 136 -4
10 11 18 -4
12 7 154 +4
3 14 516 +4
0 0 0 0 17
D=
0
13 9 26 -4
1 10 118 -4
15 12 74 +4
5 3 1416 +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 144
12 6 79
8 10 115
13 3 216

We form the Kronecker product

1 15 144
12 6 79
8 10 115
13 3 216
×
8 1 6
3 5 7
4 9 2
=
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