• No results found

Latin Squares

In document Lecture Notes Combinatorics (Page 140-145)

In the following we consider a structure that seems unrelated to designs at first, but the final Theorem will establish an interesting connection to affine planes.

A Latin square of order n≥ 1 is an n × n array filled with numbers from the cyclic group Zn={0, . . . , n − 1} such that each row and each column contains each number from Zn exactly once. Consider for instance the following two Latin squares

A =

1 0 2 3 0 1 3 2 2 3 1 0 3 2 0 1

B =

1 0 3 2 3 2 1 0 0 1 2 3 2 3 0 1 .

We denote the set of positions containing the number i in a Latin square L by L(i), in the example above we have for instance B(3) ={(1, 3), (2, 1), (3, 4), (4, 2)}.

Another way to think about Latin squares is to say that they are a partition L(0)∪ . . . ∪ L(n − 1) of [n] × [n] such that each set L(i) are a set of positions such that rooks (from the game chess) placed onto those positions cannot attack each other. Every solution to a Sudoku puzzle is a Latin square with n = 9, although the reverse is not true: Latin squares do not respect the constraint for the 3× 3 boxes.

There are many ways to transform a Latin square to similar Latin squares:

You could permute the rows or columns or “rename” the numbers (swap A(1) and A(0) for instance). At least the latter operation seems uninteresting as renaming numbers yields the same partition, just with different labels. To capture the idea of “entirely different Latin squares, we propose the notion of orthogonality defined in the following.

Let A, B be Latin squares of order n with entries A = (aij)i,j, B = (bij)i,j. The juxtaposition of A and B is the n× n array where each position simply contains the corresponding numbers of A and B, i.e.

A⊗ B = ((aij, bij))i,j with entries in Zn× Zn.

For instance, with A and B from the example above we get

A⊗ B =

(1,1) (0,0) (2,3) (3,2) (0,3) (1,2) (3,1) (2,0) (2,0) (3,1) (1,2) (0,3) (3,2) (2,3) (0,0) (1,1) .

We say A, B are orthogonal if A⊗ B contains each pair from Zn× Zn exactly once. The two Latin squares above are not orthogonal because some pairs occur twice (e.g. (2, 0)) and, necessarily, some pairs therefore occur not at all (e.g.

(1, 3)).

An example for two Latin squares A and C with A orthogonal to C is

A =

1 0 2 3 0 1 3 2 2 3 1 0 3 2 0 1

, C =

1 0 2 3 3 2 0 1 0 1 3 2 2 3 1 0

, A⊗ C =

(1,1) (0,0) (2,2) (3,3) (0,3) (1,2) (3,0) (2,1) (2,0) (3,1) (1,3) (0,2) (3,2) (2,3) (0,1) (1,0) . Note that this notion of orthogonality has little to do with geometric notions orthogonality you may be familiar with. Observe the following:

• If A is orthogonal to B, then B is orthogonal to A.

• If A is orthogonal to B, then “renaming” numbers in A or B (for instance replace every 0 with a 1 and vice versa) preserves orthogonality.

Remark. For n∈ {2, 6} there are no two orthogonal Latin squares of order n.

For n = 2 this is easy to see since the only Latin squares with n = 2 are L1= 0 1

1 0 and L2= 1 0 0 1 .

They are not orthogonal to each other nor to themselves (only for n = 1 can a Latin square be orthogonal to itself). For n = 6 the argument is non-trivial.

For n∈ N \ {2, 6}, a pair of orthogonal Latin squares of order n exists. The proof of this is highly non-trivial, in fact it took over a hundred years to show that there is a pair of orthogonal Latin squares of order 10.

Our goal in the following is to construct a large set A1, . . . , Ak of Latin squares of order n that are MOLS (mutually orthogonal Latin squares), meaning Ai is orthogonal to Aj for i6= j.

Theorem 6.16. Let n be a positive integer, r∈ [n − 1] non-zero and co-prime ton, i.e. gcd(n, r) = 1. Then Lrn = (r· i + j (mod n))i,j is a Latin square.

To clarify how Lrn looks, consider the example n = 5 and r = 2. “Going right” corresponds to +1 and going down corresponds to +2 which gives

L25=

3 4 0 1 2 0 1 2 3 4 2 3 4 0 1 4 0 1 2 3 1 2 3 4 0 .

Proof. We have to show that each row and column contains each number exactly once. For rows this is clear, since the i-th row contains r·i+1, r·i+2, . . . , r·i+n, which traverses all numbers modulo n. The column j contains r + j, 2r + j, . . . , n· r + j, all modulo n. Assume two of those numbers are identical, say i1· r + j ≡ i2· r + j we conclude (i1− i2)· r ≡ 0 (mod n). Since gcd(n, r) = 1 (meaning r has an inverse modulo n) we actually had i1 = i2. So no column contains a number twice and Lrn really is a Latin square of order n.

Theorem 6.17. Ifn is prime, then L1n, . . . , Lnn−1 aren− 1 MOLS of order n.

Proof. Since n is prime, gcd(n, i) = 1 for all i ∈ [n − 1] so by Theorem 6.16 L1n, . . . , Ln−1n are Latin squares of order n.

Now consider two of those squares Lrnand Lsn with r6= s. We need to show that they are orthogonal, so suppose some pair of numbers from Zn×Znappears in Lrn⊗ Lsn in positions (i, j) and (k, l). By definition of Lrn and Lsn this gives the identity:

(r· i + j, s · i + j) = (r · k + l, s · k + l).

So r· (i − k) = l − j = s · (i − k) which implies (r − s)(i − k) = 0. The numbers modulo n form a field and a product can only be zero if one of the factors is zero. Since r 6= s we obtain i = k and therefore also l = j. In particular we showed that the same pair cannot appear in distinct positions and of Lrn⊗ Lsn, so Lrn is orthogonal to Lsn as desired.

Remark. For a prime power n = pk there is a field Fn={α0= 0, α1, . . . , αn−1} of order n. For it we can define Lαnr = (αr· αi+ αj)i,j and generalize Theorem 6.16 and Theorem 6.17 accordingly.

Lemma 6.18. For anyn≥ 2 there are at most n − 1 MOLS of order n.

Proof. Assume we have a set A1, . . . , Ak of MOLS. As orthogonality is not affected by “renaming” the numbers in a Latin square, we may assume without loss of generality that each Ai has 0 1 2 . . . n− 1 as its first row. Now consider the entry at position (2, 1). If A is orthogonal to B then a21 6= b21 because all pairs (0, 0), . . . , (n− 1, n − 1) already appear in row 1 of A ⊗ B. So the entries in (2, 1) must be mutually distinct. They must also be non-zero since the first column of each Ai already contains zero in position (1, 1). Therefore, we started with at most k≤ n − 1 Latin squares.

And now for the theorem that establishes the connection to designs. We will only prove the equivalence of (i) and (iv), but we will do so constructively.

Theorem 6.19. For n≥ 2 each of the following is equivalent:

(i) There existn− 1 mutually orthogonal Latin squares of order n.

(ii) There exists a finite field of ordern.

(iii) n is a prime power, i.e. n = pk.

(iv) There exists a(v = n2, k = n, λ = 1)-design (an affine plane).

Proof. (i)⇒ (iv). Let A1, . . . , An−1 be n− 1 MOLS of order n. We need to construct a (v = n2, k = n, λ = 1)-design. Recall (from Corollary 6.4) that the number of blocks in such a design is necessarily|B| = n(n + 1) and from Theorem 6.15 that the design is necessarily resolvable, so it splits into n + 1 parallel classes of n disjoint blocks each (this resolution will be apparent).

The points of the design are [n]× [n], so the set of positions in Latin squares of order n.

Recall how each Latin square A is a partition of the positions [n]× [n] = A(0)∪. . .∪A(n−1) where A(i) are the positions containing number i ∈ Zn. These will be blocks of the design. In addition, each row R(i) ={(i, j) | j ∈ [n]} and each column C(j) = {i, j) | i ∈ [n]} is a block. So in total the blocks are:

B = {Ar(s)| r ∈ [n − 1], s ∈ Zn} ∪ {R(i) | i ∈ [n]} ∪ {C(j) | j ∈ [n]}.

We need to show that each pair of distinct points (i, j) and (k, l) appears in exactly one block. We first show that they are contained in at most one block.

Case 1: i = k. Both points are contained in the i-th row so both are in R(i). They cannot be contained in the same column (otherwise they would not be distinct) and they are not both contained in any Ar(s) since that would mean that the Latin square Ar contains the number s twice in the i-th row. In particular, no block other than R(i) contains both points.

Case 2: j = l. Similar to Case 1, the points are contained in C(j) and in no other block.

Case 3: i6= k, j 6= l. The points are not in the same row or column so in no R(i) or C(j). But assume (for contradiction) that we have (i, j), (k, l) ∈ Ar(s)∩ At(u) for (r, s) 6= (t, u). Since the blocks orig-inating from the same Latin square are disjoint (since those blocks form a partition), we have r 6= t. So in Ar there is the number s in both positions (i.e. at (i, j) and (k, l)) and in At there is u in both positions. This means Ar⊗ Athas (s, u) in both positions, con-tradicting the fact that Ar and At are orthogonal. So each pair of positions is contained in at most one block.

To see that each pair of positions is contained in at least one block we double count the set:

S = {((i, j), (k, l), B) | B ∈ B, (i, j) 6= (k, l), B contains (i, j) and (k, l)}.

Firstly, |S| = X

(i,j)6=(k,l)

{B | B contains (i, j) and (k, l)}

≤ X

(i,j)6=(k,l)

1 =

n2 2



. (uses “at most one”)

Secondly, |S| =X

B

{((i, j), (k, l)) | (i, j) 6= (k, l), B contains (i, j) and (k, l)}

=X

B

|B|

2



= (n2+ n)

n 2



=

n2 2

 .

So we realize that the “≤” is actually an equality so in particular each pair of points is contained in exactly one block.

(iv)⇒ (i) Assume we have a (v = n2, k = n, λ = 1)-design. As argued before (Corollary 6.4), there are |B| = (n + 1) · n blocks in total. Since affine planes are resolvable by Theorem 6.15 we get n + 1 parallel classes B = B1∪ . . . ∪ Bn+1 consisting of n blocks each. We use two of these parallel classesB1andB2to find “coordinates” for the n2points and the remaining n− 1 parallel classes to define MOLS.

We label the blocks fromB1 and B2 asB1 ={R(1), R(2), . . . , R(n)} and B2 = {C(1), C(2), . . . , C(n)}. For i, j ∈ [n], we know that every pair of blocks R(i) and C(j) intersects in exactly one point pij: Because of t = 2 and λ = 1, they cannot intersect in two points and because of the claim from the proof of Theorem 6.15 they cannot be disjoint. This means that the blocks fromB1and B2 intersect as shown in Figure 44 so

C(1) C(2) C(3) C(4) C(5)

R(1) R(2) R(3) R(4) R(5)

Figure 44: The two different parallel classesB1 andB2 intersect like this when arranging the points accordingly.

we can interpret the blocks R(i) as rows and C(j) as columns (i, j∈ [n]).

To simplify notation, identify the point point pij of the design with the position (i, j)∈ [n] × [n] in Latin squares. Then for each l ∈ {3, . . . , n + 1}

we interpret the n blocks Bl(0), Bl(2), . . . , Bl(n− 1) of the parallel class Bl as a Latin square where the positions containing a number r ∈ Zn are given by Bl(r). This really is a valid Latin square since each Bl(r) intersects each R(i) and C(j) in exactly one point so each number occurs in exactly one row and column.

It is also easy to verify that the n− 1 Latin squares we get from B3 to Bn+1 are mutually orthogonal, since for any distinct s, t∈ {3, . . . , n + 1}

and r1, r2∈ Zn we know that|Bs(r1)∩ Bt(r2)| = 1 which just means that the pair (r1, r2)∈ Zn× Zn occurs exactly once in the juxtaposition of the Latin square forBs andBt.

In document Lecture Notes Combinatorics (Page 140-145)