Office Applications and Entertainment, Latin Squares

Vorige Pagina Volgende Pagina Index About the Author

1.0 Introduction

The main subject of this website is the construction of magic squares by means of elementary analytical methods.

Where the described methods appeared to be quite slow, the concept of construction by means of Latin - or Sudoku Comparable Squares - as used by other authors, has been introduced as a faster alternative.

The objective of this chapter is to formalize the concept and to illustrate that it has a wider application range as suggested above.

2.0 Definition and Terminology

A Latin Square of order n is an n x n square filled with n different symbols, each occurring only once in each row and only once in each column, as illustrated below for a 3 x 3 Latin Square.

0 1 2
1 2 0
2 0 1

The concept of Latin Squares was introduced by Leonard Euler (1707 - 1783), who used Latin Characters rather than integers.

A Latin Square is said to be normalized if both the first row (top) and the first column (left) are in natural sequence, as illustrated above. Any Latin Square can be normalized by permutation of the rows and columns.

Two Latin Squares A and B of the same order n with symbols {ai, i = 1 ... n} and {bi, i = 1 ... n) are said to be orthogonal if - when combined as illustrated below - all pairs of the resulting square C are distinct.

A
a1 a2 a3
a2 a3 a1
a3 a1 a2
B
b1 b3 b2
b2 b1 b3
b3 b2 b1
C
a1, b1 a2, b3 a3, b2
a2, b2 a3, b1 a1, b3
a3, b3 a1, b2 a2, b1

As Euler applied originally the symbols {A, B, C} and {α, β, γ} the resulting square C has been traditionally referred to as Greco-Latin Square or Euler Square.

In relation with the construction of Magic Squares, the pair (A, B) is normally referred to as a pair of Orthogonal Latin Squares.

If a Diagonal Latin Square A is orthogonal to its transposed T(A), the square A is referred to as a Self-Orthogonal Diagonal Latin Square or (SODLS).

Magic Squares can also be constructed based on pairs of Orthogonal Semi-Latin Squares, for which only (some of) the rows, columns or (broken) diagonals contain the n different integers 0 ... n.

3.0 Latin Squares (3 x 3)

Attachment 3.1.1 shows the 12 ea order 3 Latin Squares, which can be found based on the definition formulated in Section 2.0 above (ref. LatSqr3).

Euler Squares can be found, by selecting pairs of Latin Squares (A, B) while ensuring that the resulting square C contains 9 distinct pairs.

Attachment 3.1.2 shows the 72 ea resulting Euler Squares (ref. CnstrSqrs3a).

3.1 Magic Squares, Natural Numbers

(Semi) Magic Square M of order 3 with the integers 1 ... 9 can be written as M = A + 3 * B + [1] where the squares A and B contain only the integers 0, 1 and 2.

Consequently order 3 (Semi) Magic Squares can be based on pairs of Orthogonal Latin Squares (A, B), which is illustrated below for a Magic Square M.

A
2 0 1
0 1 2
1 2 0
B
1 2 0
0 1 2
2 0 1
M = A + 3 * B + 1
6 7 2
1 5 9
8 3 4

Attachment 3.1.3 shows the 72 ea (Semi) Magic Squares which can be constructed based on the 72 ea Euler Squares found in Section 3.0 above.

Attachment 3.1.4 shows the 8 ea valid pairs of Orthogonal Latin Squares (A, B) which result in a Magic Square M.

Note: Each of the 8 resulting Magic Squares M can be obtained from one of the others by rotation and/or reflection.

3.2 Magic Squares, Prime Numbers

When the elements {ai, i = 1 ... 3} and {bj, j = 1 ... 3) of a valid pair of Orthogonal Latin Squares (A, B) - as found in Section 3.1 above - comply with following conditions:

  • mij = ai + bj = prime for i = 1 ... 3 and j = 1 ... 3 (correlated)
  • a1 + a3 = 2 * a2 and b1 + b3 = 2 * b2                 (balanced)

the resulting square M = A + B will be an order 3 Prime Number Magic Square:

Sa = 39
25 1 13
1 13 25
13 25 1
Sb = 138
46 88 4
4 46 88
88 4 46
Sm = 177
71 89 17
5 59 113
101 29 47

Attachment 3.2.1 contains miscellaneous correlated balanced series {ai, i = 1 ... 3} and {bj, j = 1 ... 3).

Attachment 3.2.2 contains the resulting Prime Number Magic Squares and related Magic Sums (Sm).

3.3 Summary

The obtained results regarding the order 3 Latin - and related Magic Squares, as deducted and discussed in previous sections, are summarized in following table:

Attachment

Subject

Subroutine

Attachment 3.1.1

Latin Squares

LatSqr3

Attachment 3.1.2

Euler Squares

CnstrSqrs3a

Attachment 3.1.3

(Semi) Magic Squares

Attachment 3.1.4

Orthogonal Latin - and Magic Squares

-

Attachment 3.2.1

Correlated Balanced Series

-

Attachment 3.2.2

Prime Number Magic Squares

CnstrSqrs3b

Comparable methods as described above, can be used to construct order 4 Latin - and related (Pan) Magic Squares, which will be described in following sections.


Vorige Pagina Volgende Pagina Index About the Author