Latin Squares

Latin Squares
Jerzy Wojdyło
February 17, 2006
Definition and Examples

A Latin square is a square array in which
each row and each column consists of the
same set of entries without repetition.
a
February 17, 2006
a b
b a
a
b
c
b
c
a
c
a
b
Jerzy Wojdylo, Latin Squares
a
b
c
d
b
c
d
a
c
d
a
b
d
a
b
c
2
Existence
Do Latin squares exist for every nZ+?
 Yes.
 Consider the addition table (the Cayley
table) of the group Zn.
 Or, more generally, consider the
multiplication table of an n-element
quasigroup.

February 17, 2006
Jerzy Wojdylo, Latin Squares
3
Latin Squares and Quasigroups
A quasigroup is is a nonempty set Q with
operation · : Q  Q (multiplication)
such that in the equation
r·c=s
the values of any two variables determine
the third one uniquely.
 It is like a group, but associativity and the
unit element are optional.

February 17, 2006
Jerzy Wojdylo, Latin Squares
4
Latin Squares and Quasigroups

The uniqueness guarantees no repetitions of
symbols s in each row r and each column c.
·
0
1
2
3
February 17, 2006
0
0
3
2
1
1
2
1
3
0
2
3
0
1
2
3
1
2
0
3
Jerzy Wojdylo, Latin Squares
5
Operations on Latin Squares

Isotopism of a Latin square L is a
 permutation of its rows,
 permutation of its columns,
 permutation of its symbols.
(These permutations do not have to be the same.)
L is reduced iff its first row is [1, 2, …, n]
and its first column is [1, 2, …, n]T.
 L is normal iff its first row is [1, 2, …, n].

February 17, 2006
Jerzy Wojdylo, Latin Squares
6
Enumeration
How many Latin squares (Latin rectangles) are
there?
 If order  11
Brendan D. McKay, Ian M. Wanless, “The
number of Latin squares of order eleven”
2004(?) (show the table on page 5)

http://en.wikipedia.org/wiki/Latin_square#The_number_of_Latin_squares

Order 12, 13, … open problem.
February 17, 2006
Jerzy Wojdylo, Latin Squares
7
Orthogonal Latin Squares

Two nn Latin squares L=[lij] and M =[mij]
are orthogonal iff the n2 pairs (lij, mij) are all
different.
a
b
c
February 17, 2006
b
c
a
c
a
b
a
c
b
b
a
c
Jerzy Wojdylo, Latin Squares
c
b
a
8
Orthogonal LS - Useful Property

Theorem
Two Latin squares are orthogonal iff their
normal forms are orthogonal.
(You can symbols so both LS have the first row [1,
2, …, n])

No two 22 Latin squares are orthogonal.
1
2
February 17, 2006
2
1
Jerzy Wojdylo, Latin Squares
9
Orthogonal Latin Squares

This 44 Latin square does not have an
orthogonal mate.
1
2
3
4
2
3
4
1
3
4
1
2
4
1
2
3
February 17, 2006
1
Jerzy Wojdylo, Latin Squares
2
3
4
10
Orthogonal LS - History
1782 Leonhard Euler
 The problem of 36 officers, 6 ranks, 6
regiments.
His conclusion: No two 66 LS are
orthogonal.
 Additional conjecture: no two nn LS are
orthogonal, where n  Z+, n  2 (mod 4).
 1900 G. Tarry verified the case n = 6.

February 17, 2006
Jerzy Wojdylo, Latin Squares
11
Orthogonal LS – History (cd)
1960 R.C. Bose, S.S. Shrikhande, E.T.
Parker, Further Results on the Construction
of Mutually Orthogonal Latin Squares and
the Falsity of Euler's Conjecture, Canadian
Journal of Mathematics, vol. 12 (1960), pp.
189-203.
 There exists a pair of orthogonal LS for all
nZ+, with exception of n = 2 and n = 6.

February 17, 2006
Jerzy Wojdylo, Latin Squares
12
Mutually Orthogonal LS (MOLS)
A set of LS that are pairwise orthogonal is
called a set of mutually orthogonal Latin
squares (MOLS).
 Theorem
The largest number of nn MOLS is n1.

February 17, 2006
Jerzy Wojdylo, Latin Squares
13
Mutually Orthogonal LS (MOLS)
Proof (by contradiction)
Suppose we have n MOLS:

1 2 … n
1 2 … n
…
L1
February 17, 2006
1 2 … n
…
Li
1 2 … n
…
Lj
Jerzy Wojdylo, Latin Squares
Ln
14
MOLS
Theorem
If n = p, prime, then there are n1 nn-MOLS.
 Proof
Construction of Lk=[akij], k =1, 2, …, n1:
akij = ki + j (mod n). 
 Corollary
If n=pt, p prime, then there are n1 nn-MOLS.
 Open problem
If there are n1 nn-MOLS, then n = pt, p prime.

February 17, 2006
Jerzy Wojdylo, Latin Squares
15
Latin Rectangle
A pq Latin rectangle with entries in
{1, 2, …, n} is a pq matrix with entries in
{1, 2, …, n} with no repeated entry in a row
or column.
 (3,4,5) Latin rectangle
1 3 4 5

3 5 1 2
5 1 3 4
February 17, 2006
Jerzy Wojdylo, Latin Squares
16
Completion Problems

When can a pq Latin rectangle with entries
in {1, 2, …, n} be completed to a nn Latin
square?
1 3 4 5
1 2 3 4
3 5 1 2
4 3 1 2
5 1 3 4
February 17, 2006
Jerzy Wojdylo, Latin Squares
17
Completion Problems

The good:
February 17, 2006
1
2
3
4
4
3
1
2
2
1
4
3
3
4
2
1
Jerzy Wojdylo, Latin Squares
18
Completion Problems

The bad:
1 3 4 5
3 5 1 2
5 1 3 4
Where to put “2” in the last column?
February 17, 2006
Jerzy Wojdylo, Latin Squares
19
Completion Theorems
Theorem
Let p < n. Any pn Latin rectangle with
entries in {1, 2, …, n} can be completed to
a nn Latin square.
 The proof uses Hall’s marriage theorem or
transversals to complete the bottom n  p
rows. The construction fills one row at a
time.

February 17, 2006
Jerzy Wojdylo, Latin Squares
20
Completion Theorems

Theorem
Let p, q < n. A pq Latin rectangle R with
entries in {1, 2, …, n} can be completed to
a nn Latin square iff R(t), the number of
occurrences of t in R, satisfies
R(t)  p + q  n
for each t with 1  t  n.
February 17, 2006
Jerzy Wojdylo, Latin Squares
21
Completion Theorems
From last slide: R(t)  p + q  n.
Let t = 5.
6 1 2 3
Then R(5) = 1
5 6 3 1
and
1 3 6 2
p+qn = 4+46 = 2.
3 2 4 6
But 1  2, so R cannot
be completed to a Latin
square.

February 17, 2006
Jerzy Wojdylo, Latin Squares
22
Completion Problems

The ugly (?)
a. k. a. sudoku
February 17, 2006
9
7
2
1
6 5
7 4
1
8 9
4
2
8
5 9
1
2
3
6
4 5
1
2
7
4 1
2
3 2
9
8 5
6
5
7
Jerzy Wojdylo, Latin Squares
23
Completion Problems

The ugly (?)
a. k. a. sudoku
February 17, 2006
9
8
6
2
1
7
5
3
4
6
7
1
3
9
4
8
2
6
3
4
2
6
8
5
7
1
9
4
1
8
7
2
6
3
9
5
Jerzy Wojdylo, Latin Squares
6
3
9
8
5
1
4
7
2
7
2
5
9
3
4
1
6
8
2
9
4
5
7
3
6
8
1
1
6
7
9
4
8
2
5
3
8
5
3
1
6
2
9
4
7
24
Sudoku

History:
 http://en.wikipedia.org/wiki/Sudoku
 Robin Wilson, The Sudoku Epidemic,
MAA Focus, January 2006.
 http://sudoku.com/
 Google (2/15/2006)
about 20,300,000 results for sudoku.
February 17, 2006
Jerzy Wojdylo, Latin Squares
25
Mathematics of Sudoku
Bertram Felgenhauer and Frazer Jarvis:
 There are 6,670,903,752,021,072,936,960
Sudoku grids.
 Ed Russell and Frazer Jarvis:
 There are 5,472,730,538 essentially
different Sudoku grids.
 http://www.afjarvis.staff.shef.ac.uk/sudoku/

February 17, 2006
Jerzy Wojdylo, Latin Squares
26
Uniqueness of Sudoku Completion

Maximal
number
of givens
while solution
is not unique:
81  4 = 77.
February 17, 2006
?
?
?
?
Jerzy Wojdylo, Latin Squares
27
Uniqueness of Sudoku Completion
Minimal number of givens which force a
unique solution – open problem.
 So far:
 the lowest number yet found for the
standard variation without a symmetry
constraint is 17,
 and 18 with the givens in rotationally
symmetric cells.

February 17, 2006
Jerzy Wojdylo, Latin Squares
28
Example of Small Sudoku
1
4
2
5
8
1
3
5
February 17, 2006
4
3
7
9
4
1
8
2
6
Jerzy Wojdylo, Latin Squares
29
Example of Small Sudoku
6
4
1
9
5
7
3
8
2
February 17, 2006
9
8
2
3
6
4
1
5
7
3
7
5
2
8
1
9
6
4
7
5
9
6
2
3
4
1
8
8
1
6
5
4
9
7
2
3
4
2
3
1
7
8
5
9
6
5
9
8
4
3
6
2
7
1
Jerzy Wojdylo, Latin Squares
1
3
7
8
9
2
6
4
5
2
6
4
7
1
5
8
3
9
30
More Small Sudoku Grids
Sudoku grids with 17 givens
http://www.csse.uwa.edu.au/~gordon/sudok
umin.php
 Need help solving sudoku? Try:
http://www.sudokusolver.co.uk/

February 17, 2006
Jerzy Wojdylo, Latin Squares
31
The End