The Anti-Magic Square Project: File Area
Computers were very helpful in achieving the goals of this project especially
in the areas of enumeration and construction. All programs written and used
in this project are made available here in the hope that they may be used to
expand what is known about Anti-Magic squares. I'm certain there are many
other patterns beyond the ones described on this site -- Use these programs to
find your own!
Release Information
I've tried to document each program sufficiently at the beginning of the
source code. If you have any questions, please feel free to
contact me.
All code made available here is released into the public domain by the author.
SQlib Functions
Almost all programs revolve around the data type SQ_square_t
and functions like SQ_something
.
SQlib is basically a matrix manipulation library in C. In order to run any
program on this page you'll need to compile in the SQlib code. In UNIX use:
cc myprog.c sq.c sqio.c sqmagic.c -o myprog
The Source Code
- SQlib - Files essential to compile all programs
sq.c,
sq.h;
sqio.c,
sqio.h;
sqmagic.c,
sqmagic.h;
- viewsq.c -
Displays .sqr files in a readable way.
- ms.c - Backtracking program to generate all magic squares of any order
- ams.c - Backtracking Program to generate AMS(n)
- ams2.c -
Similar to ams except makes low order squares.
- ams3.c -
Similar to ams2 except makes low order squares with consecutive broken-diagonals.
- mkodd.c -
Implements both odd order constructions
- jprod.c -
Do a Kroneker type matrix multiplication
- pmagic.c -
Will attempt to change a suitible magic square into an Anti-Magic one.
- showsums.c -
Prints out the border sums of a square, sorted or unsorted.
- tview.c -
Prints out specified broken diagonals of an input square.
- base-n.c -
Breaks down a square into it's high and low order squares base n.
Composed by John Cormie Updated: July 21 1999
Back to main