Magic Constant Paths


There are many paths that can sum to the magic constant. The minimum requirement is all rows, all columns, and the two main diagonals. Some other commonly referred to groups of paths are pandiagonal, bent diagonal, and zigzag.

The paths can be thought of as wave patterns of different heights from 0, (the rows and columns), to n, (the main diagonals).


There are many variables, including:

On which cell is the 'first' crest?
Does the 'first' crest point left, right, up, or down?
wave height
How many cells are on the path from trough to crest?
wave length
How many cells are there from crest to crest?
path length, segment length
How many cells are there from start to end?
For an entire path, (summing to the magic constant), this is n.
homogeneous or mixed
Do the waves of the path all have the same height?
How many paths are there?