Monday, May 14, 2007

MS7. MAGIC SQUARES

Auxiliary Square Method.

Magic squares of odd order and doubly even order can be easily constructed by a method which uses 2 auxiliary squares. It, at one go, generates a large number of squares of the given order. Form two auxiliary squares, one with A,B,C,D,.....and the other with a,b,c,d,.... These are to be constructed like any other magic square in as much as each of the alphabets appears once and once only in each row, each column and each diagonal. However the two squares should not be identical. The two squares are to be merged ensuring that each A's gets associated with each a's once and once only. This would ensure that each "a" gets associated with each "A" etc.,. Given below are 4x4 order squares for illustration:-
A D B C ----- a b c d
D A C B ----- c d a b
B C A D ----- d c b a
C B D A ----- b a d c

Aa Db Bc Cd
Cc Bd Da Ab
Dd Ac Cb Ba
Bb Ca Ad Dc

Aa is now to be read as A+a, Bb as B+b, etc., Now A can be given any of the four numbers 0, 4, 8, 12 and a any of the numbers 1, 2, 3, 4. (in general 0, n, 2n, 3n, and 1, 2, 3, 4, ....) B and b can be given any of the remaining 3, C and c can be given one of the remaining 2, and D and d the last numbers. It will be noticed that, automatically, we have all the required numbers from 1 to 16. This can give us 4!x4!/4 = 144 squares. One such square with A = 12, B = 8, C = 0, D = 4, a = 1, b = 2, c = 3, & d = 4, is generated below as an ex:-
13 06 11 04
03 12 05 14
08 15 02 09
10 01 16 07
For a 5x5 order square we have
Aa Dc Be Eb Cd
Bb Ed Ca Ac De
Cc Ae Db Bd Ea
Dd Ba Ec Ce Ab
Ee Cb Ad Da Bc
with a,b,c,d,e having values 1,2,3,4&5, and A, B,C,D,&E having values from 0,5,10,15 &20. This method immediately yields 5!x5! /4 = 3600 squares.

Here is an 8x8 order square by the auxiliary square method.
Cc Ga Hg De Fh Bf Ad Eb
Fg Be Ac Ea Cd Gb Hh Df
Bh Ff Ed Ab Gc Ca Dg He
Gd Cb Dh Hf Bg Fe Ec Aa
Ef Ah Bb Fd Da Hc Ge Cg
Db Hd Gf Ch Ee Ag Ba Fc
Ha Dc Ce Gg Af Eh Fb Bd
Ae Eg Fa Bc Hb Dd Cf Gh
It will yield 8!x8!/4 squares.

No comments: