chapter 5:latin squares Flashcards

1
Q

DEF 1:

latin rectangle

A

Given nonempty finite sets P, Q and N, a Latin rectangle L is a system of elements Lij ∈ N
for i ∈ P and j ∈ Q such that

(a) For each i ∈ P, all the elements in the row L_i∗ are distinct. In more detail, if i ∈ P and j, j’ ∈ Q with j ≠ j’, then we must have L_ij ≠ L_{ij’} .
(b) For each j ∈ Q, all the elements in the column L_{∗j} are distinct. In more detail, if j ∈ Q and i, i’ ∈ P with i ≠ i’, then we must have Lij ≠ L_{i’j} .

In each row we have p entries from N which must all be different, and in each column we
have q entries from N which must all be different. This can only work if p, q ≤ n. Thus, if we fix N with
|N| = n, then the maximum possible size of a Latin rectangle is n × n.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

p and q

A

We will usually write p = |P| and q = |Q| and n = |N|.

Often (but not always) we will have P = {1, . . . , p}
or P = {0, . . . , p − 1} and similarly for P and Q.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

eg latin squares

A
[1 4 3 2]
[2 3 4 1]
[4 1 2 3]
[3 2 1 4] 
is a 4 × 4 Latin square.

[1 4 3]
[5 2 1 ]
is a 2 × 3 Latin rectangle.

An n × n Latin square is an n × n matrix in which every one
of the numbers 1, 2, . . . , n appears in each row and each column.
A p × q Latin rectangle with entries in {1, 2, . . . , n} is a p × q matrix whose entries
are from {1, 2, . . . , n} with no repeat in any row or column.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Definition 3. A Latin square

A

A Latin square of size n is a Latin rectangle with |P| = |Q| = |N| = n.

Note that in a Latin square each row contains n different entries taken from N, but |N| = n, so each row must contain each element of N precisely once. Similarly, each column must contain each element of N precisely once.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

example 4:
the matrix
[1 4 3]
[5 2 1]

A

gives a Latin rectangle with P = {1, 2} and Q = {1, 2, 3} and N = {1, 2, 3, 4, 5} so p = 2 and q = 3 and
n = 5.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Example 5. The matrix

[1 4 3 2]
[2 3 4 1]
[4 1 2 3]
[3 2 1 4]

A

gives a Latin square with P = Q = N = {1, 2, 3, 4} and p = q = n = 4.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Example 6:
Let G be any finite group, with |G| = n. Take P = Q = N = G and Lg,h = g ∗ h. I claim that
this is a Latin square.

A

Indeed, if L_{g,h} = L{g,h’} then g ∗ h = g ∗ h’ and we can multiply on the left by g^−1
to see that h = h’.

By the contrapositive, if h ≠ h’ then L_{g,h} ≠ L_{g,h’} . By a similar argument, if g ≠ g’
then
L_{g,h} ≠ L_{g’,h},
as required.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Example 7.

As a special case of the above, we can consider the group Z/n = {0, . . . , n − 1}, with addition
mod n as the group operation. This gives a Latin square with P = Q = N = {0, . . . , n − 1} and Lij = i + j
(mod n). For example, when n = 5 we get

A
[0 1 2 3 4]
[1 2 3 4 0]
[2 3 4 0 1]
[3 4 0 1 2]
[4 0 1 2 3]
This example shows that for any n, there is at least one n × n Latin square.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

THEOREM 8:

extending rectangle to latin square

A

Let L be a Latin rectangle with p < q = n (so L has the maximum possible width, but not the maximum possible height). Then L can be extended by adding extra rows to make an n × n Latin square

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

DEF 9:

multiplicity

excess

A

Let L be a Latin rectangle with parameters p, q, n. For k ∈ N we let L(k) denote the number
of occurrences of k in L, and we call this the multiplicity of k. We also put
E(k) = L(k) + n − p − q and call this the excess of k.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

EXAMPLE 10: For L=
[1 4 3]
[5 3 1]

A

we have (p, q, n) = (2, 3, 5) so n − p − q = −1 and

L(1) = 2 
L(2) = 0 
L(3) = 2 
L(4) = 1
L(5) = 1
E(1) = 1 
E(2) = −1 
E(3) = 1 
E(4) = 0
E(5) = 0.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

extending to latin square remark

A

Remark 11. The occurrences of k in L must appear in different rows, so L(k) can also be described as the
number of rows that contain k. Similarly, the occurrences of k in L must appear in different columns, so
L(k) can also be described as the number of columns that contain k.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

lemma 12:

maximum heights and width

A

Suppose that q = n, so that L has the maximum possible width. Then we have L(k) = p and
E(k) = 0 for all k. Similarly, if p = n (so that L has the maximum possible height) then L(k) = q and
E(k) = 0 for all k.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Example 13: Consider the following Latin rectangle, with p = 2 and q = n = 5:
L =
[1 2 4 5 3]
[5 1 2 3 4]

A

Recall that C[j] is the set of possibilities for position j in the next row. For example, in column 2 we already
have a 2 and a 1, so these are not allowed, so C[2] = N \ {2, 1} = {3, 4, 5}. We can display all the sets C[j]
as follows:

[ 1 2 4 5 3 ]
[ 5 1 2 3 4 ]
[234 345 135 124 125]

We have used abbreviated notation, e.g. 234 for {2, 3, 4}.) To make the new row, we must choose one element from the possibilities in each column, making sure that we never choose the same element twice.

Corollary 55 tells us that this is possible, but does not tell us exactly how to do it. However, in this case it
is not difficult: in each column we can just take the first choice that has not already been used. This gives
2, 3, 1, 4, 5 as the new row. We can write in this new row and display the possibilities for row 4 as follows:

[ 1 2 4 5 3]
[ 5 1 2 3 4]
[ 2 3 1 4 5]
[ 34 45 35 12 12]

Again, in each column we can take the first choice that has not already been used. This gives row 4 and
leaves only one possibility for row 5. We end up with the following Latin square:

[1 2 4 5 3]
[5 1 2 3 4]
[2 3 1 4 5]
[3 4 5 1 2]
[4 5 3 2 1]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Corollary 14:

maximum possible height, but not the
maximum possible width

A

Let L be a Latin rectangle with q < p = n (so L has the maximum possible height, but not the
maximum possible width). Then L can be extended by adding extra columns to make an n × n Latin square.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Now consider a Latin rectangle where both p and q are strictly less than n, so neither Theorem 8 nor
Corollary 14 is applicable. Can we still extend it to give an n × n Latin square?

A

no, loads of examples where not possible

17
Q

Example 15:
Take P = Q = {1, 2} and N = {1, 2, 3} and L =
[2 3]
[3 2]

We could try to extend this to a 3 × 3 Latin square

A

We could try to extend this to a 3 × 3 Latin square

[2 3 |a]
[3 2 |b]
_____
[c d |e]

To avoid a clash in row 1, we must take a = 1. To avoid a clash in row 2, we must also take b = 1. However,
this creates an unavoidable clash in column 3. Thus, it is impossible to extend L.

18
Q
Example 16. Take P = Q = {1, 2, 3, 4} and N = {1, . . . , 6} and
L =
[6 1 2 3]
[5 6 3 1]
[1 3 6 2]
[3 2 6 4]

extend to 6x6 latin square

A

It turns out that it is not possible to extend this to a 6 × 6 Latin square. It is a good exercise to prove this
directly. However, we will deduce it from a general theorem instead. We can list the multiplicity and excess
of the elements of N as follows:

[ k ][ 1][ 2][ 3][ 4][ 5 ][ 6]
[L(k)][ 3][3 ][4 ][1 ][ 1 ][ 4]
[E(k)][ 1 ][1 ][2 ][−1][−1][ 2]

It turns out that the key point is that some multiplicities are negative.

4 and 5 have negative excess so they are not plausible, so there cannot be any
extension to a 6 × 6 Latin square

19
Q

DEFINITION 17: latin rectangle plausible elements

A

Let L be a Latin rectangle. We say that an element k ∈ N is plausible if E(k) ≥ 0. More
precisely, we say that k is barely plausible if E(k) = 0, and very plausible if E(k) > 0.

20
Q

Proposition 18:

extension and plausibility

A

If L can be extended to an n × n Latin square, then every element k ∈ N is plausible for
L.

21
Q

Example 19:

Consider the following Latin rectangle with p = 4 and q = 5 and n = 7:
L =
[5 6 1 3 2]
[6 5 2 4 7]
[1 4 3 5 6]
[4 7 5 6 1]

The multiplicities and excesses are as follows:

A

The multiplicities and excesses are as follows:

[ k ][ 1][ 2][ 3][ 4][ 5 ][ 6][ 7]
[L(k)][ 3][2 ][2 ][3 ][3 ][ 4][ 2]
[E(k)][ 1 ][0][ 0][ 1 ][ 1][ 2][ 0]

We have E(k) ≥ 0 so all elements are plausible, so we might guess that L can be extended to a 7 × 7 Latin
square. However, Proposition 18 does not give us any guarantees about this. If we had found that E(k) < 0
for some k, then Proposition 18 would tell us that is definitely no extension. However, when E(k) ≥ 0 for
all k ..cont

22
Q

Lemma 20

plausible and adding extras

A

. Let L be a p×q Latin rectangle, where 0 < p < n and 0 < q ≤ n, and suppose that every k ∈ N
is plausible for L. Then we can add an extra row to obtain a (p + 1) × q Latin rectangle L’ such that every
k ∈ N is still plausible for L’

23
Q

theorem 21: plausible and extending thm

A

. Let L be a p × q Latin rectangle, and suppose that every k ∈ N is plausible for L. Then L
can be extended to an n × n Latin square.

24
Q

Example 22: We now show how to extend the the rectangle from Example 19. The process is controlled
by the following two tables.

Consider the following Latin rectangle with p = 4 and q = 5 and n = 7:
L =
[5 6 1 3 2]
[6 5 2 4 7]
[1 4 3 5 6]
[4 7 5 6 1]

The multiplicities and excesses are as follows:

A

[ k ][ 1][ 2][ 3][ 4][ 5 ][ 6][ 7]
[L(k)][ 3][2 ][2 ][3 ][3 ][ 4][ 2]
[E(k)][ 1 ][0][ 0][ 1 ][ 1][ 2][ 0]

and

[5 6 1 3 2  | 4{7}^1   4]
[6 5 2 4 7 |  {1}3^4  3]
[1 4 3 5 6  | {2}7^2  7]
[4 7 5 6 1  | 2{3}^3  2]
\_\_\_\_\_\_\_\_
[{2}37 12{3}  46{7} {1}27 3{4}5 | {5}6^6  6]
[{3}7 1{2} {4}6 2{7} 3{5} | 4{6}^5  1]
[{7} {1} {6} {2} {3} | {4}5^7  5]

values in {red}

In the left hand table, the top left block is the original matrix L. In the right hand table, the second row shows the excesses of 1, . . . , 7 in L; in particular, the numbers 2, 3 and 7 have E(k) = 0 so they are barely plausible. We want to add a new row, making sure that we include the barely plausible numbers 2, 3 and
7. The possibilities for columns 1, . . . , 6 are 237, 123, 467, 127 and 345, as shown in row 5 on the left. From these sets we choose 2, 3, 7, 1 and 4, as indicated by the bold entries in row 5. This gives a 5 × 5
Latin rectangle which we call L’. For the next step, we need to know the excesses for L’
, which we denote
by E’(k). As we saw in the proof of Lemma 20, we have E’(k) = E(k) if k appears in the new row, and
E’(k) = E(k) − 1 if k does not appear in the new row. The resulting values are shown in row 3 of the right hand table. In particular, 2, 3, 5 and 7 are barely plausible for L’. To get the potential entries for row 6, we simply take the sets of potential entries from row 5 and remove the bold ones, leaving 37, 12, 46, 27 and 35.
We must choose five distinct numbers, one from each of these sets, in such a way that the barely plausible
numbers 2, 3, 5 and 7 are included. We choose 3, 2, 4, 7, 5, as indicated by the bold entries in row 6. This
gives a 6 × 5 Latin rectangle which we call L”. The excesses for E” are again shown in the right hand table.
However, we do not really need them, because there is now only one possible way to fill in row 7, namely (7, 1, 6, 2, 3). This gives a 7×5 Latin rectangle. As this has the maximum possible height, we are back in the context of Corollary 14, and we do not need to keep track of excesses any more. To the right of the vertical bar, we have written the possible entries for column 7. As our first step (indicated by the superscript 1) we decide to try choosing 7 for the entry in row 1.

For the second step (indicated by the superscript 2) we consider row 3. The possible choices there are 2 and 7, but we already used 7 for row 1, so we must use 2 for
row 3. For the third step, we consider row 4. The possible choices there are 2 and 3, but we already used 2 for row 3, so we must use 3 for row 4. Continuing in the same way, we must use 1 in row 2, then 6 in row 6, then 5 in row 5, then 4 in row 7. This gives (7, 1, 2, 3, 5, 6, 4) as column 6, and leaves (4, 3, 7, 2, 6, 1, 5) as the
only possibility for column 7. We end up with the following Latin square:

[5 6 1 3 2 7 4]
[6 5 2 4 7 1 3]
[1 4 3 5 6 2 7]
[4 7 5 6 1 3 2]
[2 3 7 1 4 5 6]
[3 2 4 7 5 6 1]
[7 1 6 2 3 4 5]
25
Q

Example 23:

consider the following matrices
L=
[0 1 2]
[1 2 0]
[2 0 1] red entries

M =
[0 2 1]
[1 0 2]
[2 1 0]blue entries

 L ∗ M =
[00 12 21]
[11 20 02]
[22 01 10]
corresponding redblue entries
A

Both L and M are Latin squares. The matrix L ∗ M is formed by merging L and M in an obvious way: in
symbols, the entry (L∗M)ij is the ordered pair (Lij , Mij ). There are 9 possible pairs uv with u, v ∈ {0, 1, 2},
as follows:
(entries are red then Blue)
00, 01, 02,
10, 11, 12,
20, 21, 22.
It is not hard to check that each of these pair occurs precisely once in L ∗ M.

26
Q

DEF 24:

two Latin squares with the same sets

A

Let L and M be two n × n Latin squares, with the same sets P, Q and N. Let L ∗ M be the matrix with entries (L ∗ M)_ij = (L_ij , M_ij ) ∈ N^2 for each i ∈ P and j ∈ Q. We say that L and Mare orthogonal if each of the n^2 elements of N^2 occurs precisely once in L ∗ M.

Equivalently, L and M are
orthogonal if the entries in L ∗ M are all different.

27
Q
Example 25. Consider the following matrices:
L =
[1 2 3]
[3 1 2]
[2 3 1] all entries are red

M =
[1 a b]
[c d e]
[f g 2] all entries are blue

L ∗ M =
[11 2a 3b]
[3c 1d 2e]
[2f 3g 12] entries are red blue (rb)

try to find a,..,g such that m is a Latin square and is orthogonal to L

A

• L ∗ M must contain 13 (rb) somewhere, and this can only happen if d = 3 so that 13 (rb) appears as the
middle entry.

• In M, entry b lies in the same row as 1 and in the same column as 2, so it must be different from 1 and 2, so it must be equal to 3. By the same logic we also have f = 3.

• Now M is as shown on the left below. To make this a Latin square, each row must contain 1, 2 and 3, and each column must contain 1, 2 and 3. The only way to achieve this is to take a = c = 2 and e = g = 1, giving the matrix shown on the 2nd below.
M =
[1 a 3]
[c 3 e]
[3 g 2]
=
[1 2 3]
[2 3 1]
[3 1 2] all entries are blue
• We now have
L ∗ M =
[11 22 33] (rb entries)
[32 13 21]
[23 31 12]

Inspection shows that each of the 9 possible pairs 11, 12, 13, 21, 22, 23, 31, 32, 33 (rb) appears precisely once in L ∗ M, so we have succeeded in finding a Latin square that is orthogonal to L.

28
Q

theorem 33: mutually orthogonal Latin squares of size n

A

Suppose we have a list L^1, . . . , L^r of mutually orthogonal Latin squares of size n. Then
r ≤ n − 1.

29
Q

proposition 34:

Prime p Latin Square

A

Let p be a prime. For 0 < u < p define L^u_ij = i + uj (mod p). Then L^u is a Latin square
(with P = Q = N = Z/p). Moreover, L^u and L^v are orthogonal if u ≠ v (so we have a list of p − 1 mutually
orthogonal Latin squares of size p).

30
Q

Remark 35.

A

Now consider a number n that is a prime power, say n = p^v
for some prime number p and
some v > 1. In this case the ring Z/n is not a field, but there is a more complicated way to define a field F
with |F| = n. We will not discuss the construction here, but it can be found in most books on field theory.
Now suppose that u ∈ F with u ≠ 0 (so there are n − 1 possible choices for u). We can again define a Latin
square L^u with P = Q = N = F by L^u_ij = i + uj, and we again find that L^u and L^v are orthogonal when
u ≠ v. Thus, we have a list of n − 1 mutually orthogonal Latin squares of size n.

31
Q

thm 36

The first number that is not a prime or prime power is 6. This case is already hard.

A

Theorem 36. There are not even two mutually orthogonal Latin squares of size 6.