TheInfoList

In
combinatorics Combinatorics is an area of mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geom ...
and in
experimental design The design of experiments (DOE, DOX, or experimental design) is the design of any task that aims to describe and explain the variation of information under conditions that are hypothesized to reflect the variation. The term is generally associ ...
, a Latin square is an ''n'' × ''n'' array filled with ''n'' different symbols, each occurring exactly once in each row and exactly once in each column. An example of a 3×3 Latin square is The name "Latin square" was inspired by mathematical papers by
Leonhard Euler Leonhard Euler ( ; ; 15 April 170718 September 1783) was a Swiss mathematician A mathematician is someone who uses an extensive knowledge of mathematics Mathematics (from Greek: ) includes the study of such topics as numbers ( and ) ...

(1707–1783), who used
Latin characters Latin script, also known as Roman script, is an alphabetic writing system based on the letters of the classical Latin alphabet, derived from a form of the Cumae alphabet, Cumaean Greek version of the Greek alphabet used by the Etruscan civilizat ...
as symbols, but any set of symbols can be used: in the above example, the alphabetic sequence A, B, C can be replaced by the
integer sequence An integer (from the Latin Latin (, or , ) is a classical language belonging to the Italic languages, Italic branch of the Indo-European languages. Latin was originally spoken in the area around Rome, known as Latium. Through the power ...
1, 2, 3. Euler began the general theory of Latin squares.

# History

The Korean mathematician
Choi Seok-jeong Choi Seok-jeong (; 1646–1715) was a Korean politician and mathematician in the Joseon period of Korea. He published the ''Gusuryak'' () in 1700, which is the first literature on the Latin square, predating Leonhard Euler by at least 67 years. He ...
was the first to publish an example of Latin squares of order nine, in order to construct a
magic square In recreational mathematics Recreational mathematics is mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and ...

in 1700, predating Leonhard Euler by 67 years.

# Reduced form

A Latin square is said to be ''reduced'' (also, ''normalized'' or ''in standard form'') if both its first row and its first column are in their natural order. For example, the Latin square above is not reduced because its first column is A, C, B rather than A, B, C. Any Latin square can be reduced by
permuting In mathematics, a permutation of a Set (mathematics), set is, loosely speaking, an arrangement of its members into a sequence or linear order, or if the set is already ordered, a rearrangement of its elements. The word "permutation" also refers ...
(that is, reordering) the rows and columns. Here switching the above matrix's second and third rows yields the following square: This Latin square is reduced; both its first row and its first column are alphabetically ordered A, B, C.

# Properties

## Orthogonal array representation

If each entry of an ''n'' × ''n'' Latin square is written as a triple (''r'',''c'',''s''), where ''r'' is the row, ''c'' is the column, and ''s'' is the symbol, we obtain a set of ''n''2 triples called the
orthogonal array In mathematics, an orthogonal array is a "table" (array) whose entries come from a fixed finite set of symbols (typically, ), arranged in such a way that there is an integer ''t'' so that for every selection of ''t'' columns of the table, all ordere ...

representation of the square. For example, the orthogonal array representation of the Latin square is : , where for example the triple (2, 3, 1) means that in row 2 and column 3 there is the symbol 1. Orthogonal arrays are usually written in array form where the triples are the rows, such as: The definition of a Latin square can be written in terms of orthogonal arrays: * A Latin square is a set of ''n''2 triples (''r'', ''c'', ''s''), where 1 ≤ ''r'', ''c'', ''s'' ≤ ''n'', such that all ordered pairs (''r'', ''c'') are distinct, all ordered pairs (''r'', ''s'') are distinct, and all ordered pairs (''c'', ''s'') are distinct. This means that the ''n''2 ordered pairs (''r'', ''c'') are all the pairs (''i'', ''j'') with 1 ≤ ''i'', ''j'' ≤ ''n'', once each. The same is true of the ordered pairs (''r'', ''s'') and the ordered pairs (''c'', ''s''). The orthogonal array representation shows that rows, columns and symbols play rather similar roles, as will be made clear below.

## Equivalence classes of Latin squares

Many operations on a Latin square produce another Latin square (for example, turning it upside down). If we permute the rows, permute the columns, and permute the names of the symbols of a Latin square, we obtain a new Latin square said to be '' isotopic'' to the first. Isotopism is an
equivalence relation In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities a ...
, so the set of all Latin squares is divided into subsets, called ''isotopy classes'', such that two squares in the same class are isotopic and two squares in different classes are not isotopic. Another type of operation is easiest to explain using the orthogonal array representation of the Latin square. If we systematically and consistently reorder the three items in each triple (that is, permute the three columns in the array form), another orthogonal array (and, thus, another Latin square) is obtained. For example, we can replace each triple (''r'',''c'',''s'') by (''c'',''r'',''s'') which corresponds to transposing the square (reflecting about its main diagonal), or we could replace each triple (''r'',''c'',''s'') by (''c'',''s'',''r''), which is a more complicated operation. Altogether there are 6 possibilities including "do nothing", giving us 6 Latin squares called the conjugates (also
parastrophe In mathematics, especially in abstract algebra, a quasigroup is an algebraic structure resembling a group (mathematics), group in the sense that "division (mathematics), division" is always possible. Quasigroups differ from groups mainly in that the ...
s) of the original square. Finally, we can combine these two equivalence operations: two Latin squares are said to be ''paratopic'', also ''main class isotopic'', if one of them is isotopic to a conjugate of the other. This is again an equivalence relation, with the equivalence classes called ''main classes'', ''species'', or ''paratopy classes''. Each main class contains up to six isotopy classes.

## Number

There is no known easily computable formula for the number of Latin squares with symbols . The most accurate upper and lower bounds known for large are far apart. One classic result is that $\prod_^n \left(k!\right)^\geq L_n\geq\frac.$ A simple and explicit formula for the number of Latin squares was published in 1992, but it is still not easily computable due to the exponential increase in the number of terms. This formula for the number of Latin squares is $L_n = n! \sum_^ (-1)^ \binom,$ where is the set of all matrices, is the number of zero entries in matrix , and is the
permanent Permanent may refer to: Art and entertainment *Permanent (film), ''Permanent'' (film), a 2017 American film *Permanent (Joy Division album), ''Permanent'' (Joy Division album) *Permanent (song), "Permanent" (song), by David Cook Other uses *Perm ...
of matrix . The table below contains all known exact values. It can be seen that the numbers grow exceedingly quickly. For each , the number of Latin squares altogether is times the number of reduced Latin squares . For each , each isotopy class contains up to Latin squares (the exact number varies), while each main class contains either 1, 2, 3 or 6 isotopy classes. The number of structurally distinct Latin squares (i.e. the squares cannot be made identical by means of rotation, reflection, and/or permutation of the symbols) for = 1 up to 7 is 1, 1, 1, 12, 192, 145164, 1524901344 respectively .

## Examples

We give one example of a Latin square from each main class up to order five.
$\begin 1 \end \quad \begin 1 & 2 \\ 2 & 1 \end \quad \begin 1 & 2 & 3 \\ 2 & 3 & 1 \\ 3 & 1 & 2 \end$
$\begin 1 & 2 & 3 & 4 \\ 2 & 1 & 4 & 3 \\ 3 & 4 & 1 & 2 \\ 4 & 3 & 2 & 1 \end \quad \begin 1 & 2 & 3 & 4 \\ 2 & 4 & 1 & 3 \\ 3 & 1 & 4 & 2 \\ 4 & 3 & 2 & 1 \end$
$\begin 1 & 2 & 3 & 4 & 5 \\ 2 & 3 & 5 & 1 & 4 \\ 3 & 5 & 4 & 2 & 1 \\ 4 & 1 & 2 & 5 & 3 \\ 5 & 4 & 1 & 3 & 2 \end \quad \begin 1 & 2 & 3 & 4 & 5 \\ 2 & 4 & 1 & 5 & 3 \\ 3 & 5 & 4 & 2 & 1 \\ 4 & 1 & 5 & 3 & 2 \\ 5 & 3 & 2 & 1 & 4 \end$
They present, respectively, the multiplication tables of the following groups: * – the trivial 1-element group *$\mathbb_2$ – the
binary Binary may refer to: Science and technology Mathematics * Binary number In mathematics and digital electronics Digital electronics is a field of electronics The field of electronics is a branch of physics and electrical engineeri ...
group *$\mathbb_3$
cyclic group In group theory The popular puzzle Rubik's cube invented in 1974 by Ernő Rubik has been used as an illustration of permutation group">Ernő_Rubik.html" ;"title="Rubik's cube invented in 1974 by Ernő Rubik">Rubik's cube invented in 1974 by Er ...

of order 3 *$\mathbb_2 \times \mathbb_2$ – the
Klein four-group In mathematics, the Klein four-group is a Group (mathematics), group with four elements, in which each element is Involution (mathematics), self-inverse (composing it with itself produces the identity) and in which composing any two of the three ...
*$\mathbb_4$ – cyclic group of order 4 *$\mathbb_5$ – cyclic group of order 5 * the last one is an example of a
quasigroup In mathematics, especially in abstract algebra, a quasigroup is an algebraic structure resembling a group (mathematics), group in the sense that "division (mathematics), division" is always possible. Quasigroups differ from groups mainly in that th ...
, or rather a loop, which is not associative.

# Transversals and rainbow matchings

A transversal in a Latin square is a choice of ''n'' cells, where each row contains one cell, each column contains one cell, and there is one cell containing each symbol. One can consider a Latin square as a complete
bipartite graph In the mathematical Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities ...

in which the rows are vertices of one part, the columns are vertices of the other part, each cell is an edge (between its row and its column), and the symbols are colors. The rules of the Latin squares imply that this is a proper
edge coloring In graph theory, an edge coloring of a Graph (discrete mathematics), graph is an assignment of "colors" to the edges of the graph so that no two incident edges have the same color. For example, the figure to the right shows an edge coloring of a ...

. With this definition, a Latin transversal is a matching in which each edge has a different color; such a matching is called a
rainbow matching In the mathematical discipline of graph theory, a rainbow matching in an Edge coloring, edge-colored graph is a Matching (graph theory), matching in which all the edges have distinct colors. Definition Given an edge-colored graph ''G'' = (''V'',''E ...

. Therefore, many results on Latin squares/rectangles are contained in papers with the term "rainbow matching" in their title, and vice versa. Some Latin squares have no transversal. For example, when ''n'' is even, an ''n''-by-''n'' Latin square in which the value of cell ''i'',''j'' is (''i''+''j'') mod ''n'' has no transversal. Here are two examples:$\begin 1 & 2 \\ 2 & 1 \end \quad \begin 1 & 2 & 3 & 4 \\ 2 & 3 & 4 & 1 \\ 3 & 4 & 1 & 2 \\ 4 & 1 & 2 & 3 \end$In 1967, H. J. Ryser conjectured that, when ''n'' is odd, every ''n''-by-''n'' Latin square has a transversal. In 1975, S. K. Stein and Brualdi conjectured that, when ''n'' is even, every ''n''-by-''n'' Latin square has a partial transversal of size ''n''−1. A more general conjecture of Stein is that a transversal of size ''n''−1 exists not only in Latin squares but also in any ''n''-by-''n'' array of ''n'' symbols, as long as each symbol appears exactly ''n'' times. Some weaker versions of these conjectures have been proved: * Every ''n''-by-''n'' Latin square has a partial transversal of size 2''n''/3. * Every ''n''-by-''n'' Latin square has a partial transversal of size ''n'' − sqrt(''n''). * Every ''n''-by-''n'' Latin square has a partial transversal of size ''n'' − 11 log(''n'').

# Algorithms

For small squares it is possible to generate permutations and test whether the Latin square property is met. For larger squares, Jacobson and Matthews' algorithm allows sampling from a uniform distribution over the space of ''n'' × ''n'' Latin squares.

# Applications

## Statistics and mathematics

*In the
design of experiments The design of experiments (DOE, DOX, or experimental design) is the design of any task that aims to describe and explain the variation of information under conditions that are hypothesized to reflect the variation. The term is generally associ ...
, Latin squares are a special case of ''row-column designs'' for two blocking factors. *In
algebra Algebra (from ar, الجبر, lit=reunion of broken parts, bonesetting, translit=al-jabr) is one of the areas of mathematics, broad areas of mathematics, together with number theory, geometry and mathematical analysis, analysis. In its most ge ...

, Latin squares are related to generalizations of
groups A group is a number of people or things that are located, gathered, or classed together. Groups of people * Cultural group, a group whose members share the same cultural identity * Ethnic group, a group whose members share the same ethnic identi ...
; in particular, Latin squares are characterized as being the
multiplication table In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...

s (
Cayley table Named after the 19th century British British may refer to: Peoples, culture, and language * British people, nationals or natives of the United Kingdom, British Overseas Territories, and Crown Dependencies. ** Britishness, the British identity a ...
s) of
quasigroup In mathematics, especially in abstract algebra, a quasigroup is an algebraic structure resembling a group (mathematics), group in the sense that "division (mathematics), division" is always possible. Quasigroups differ from groups mainly in that th ...
s. A binary operation whose table of values forms a Latin square is said to obey the .

## Error correcting codes

Sets of Latin squares that are
orthogonal In mathematics, orthogonality is the generalization of the notion of perpendicularity to the linear algebra of bilinear forms. Two elements ''u'' and ''v'' of a vector space with bilinear form ''B'' are orthogonal when . Depending on the bili ...
to each other have found an application as
error correcting codes In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and soft ...
in situations where communication is disturbed by more types of noise than simple
white noise In signal processing Signal processing is an electrical engineering Electrical engineering is an engineering discipline concerned with the study, design, and application of equipment, devices, and systems which use electricity, elect ...

, such as when attempting to transmit broadband Internet over powerlines.''Euler's revolution'', New Scientist, 24 March 2007, pp 48–51 Firstly, the message is sent by using several frequencies, or channels, a common method that makes the signal less vulnerable to noise at any one specific frequency. A letter in the message to be sent is encoded by sending a series of signals at different frequencies at successive time intervals. In the example below, the letters A to L are encoded by sending signals at four different frequencies, in four time slots. The letter C, for instance, is encoded by first sending at frequency 3, then 4, 1 and 2.
$\begin A\\ B\\ C\\ D\\ \end \begin 1 & 2 & 3 & 4 \\ 2 & 1 & 4 & 3 \\ 3 & 4 & 1 & 2 \\ 4 & 3 & 2 & 1 \\ \end \quad \begin E\\ F\\ G\\ H\\ \end \begin 1 & 3 & 4 & 2\\ 2 & 4 & 3 & 1\\ 3 & 1 & 2 & 4\\ 4 & 2 & 1 & 3\\ \end \quad \begin I\\ J\\ K\\ L\\ \end \begin 1 & 4 & 2 & 3\\ 2 & 3 & 1 & 4\\ 3 & 2 & 4 & 1\\ 4 & 1 & 3 & 2\\ \end$
The encoding of the twelve letters are formed from three Latin squares that are orthogonal to each other. Now imagine that there's added noise in channels 1 and 2 during the whole transmission. The letter A would then be picked up as: $\begin12 & 12 & 123 & 124\end$ In other words, in the first slot we receive signals from both frequency 1 and frequency 2; while the third slot has signals from frequencies 1, 2 and 3. Because of the noise, we can no longer tell if the first two slots were 1,1 or 1,2 or 2,1 or 2,2. But the 1,2 case is the only one that yields a sequence matching a letter in the above table, the letter A. Similarly, we may imagine a burst of static over all frequencies in the third slot: $\begin1 & 2 & 1234 & 4\end$ Again, we are able to infer from the table of encodings that it must have been the letter A being transmitted. The number of errors this code can spot is one less than the number of time slots. It has also been proven that if the number of frequencies is a prime or a power of a prime, the orthogonal Latin squares produce error detecting codes that are as efficient as possible.

## Mathematical puzzles

The problem of determining if a partially filled square can be completed to form a Latin square is
NP-complete In computational complexity theory Computational complexity theory focuses on classifying computational problem In theoretical computer science An artistic representation of a Turing machine. Turing machines are used to model general computi ...
. The popular
Sudoku Sudoku (; ja, 数独, sūdoku, digit-single; originally called Number Place) is a logic Logic is an interdisciplinary field which studies truth and reasoning Reason is the capacity of consciously making sense of things, applying logic ...
puzzles are a special case of Latin squares; any solution to a Sudoku puzzle is a Latin square. Sudoku imposes the additional restriction that nine particular 3×3 adjacent subsquares must also contain the digits 1–9 (in the standard version). See also
Mathematics of Sudoku #redirect Mathematics of Sudoku Sudoku puzzles can be studied mathematically to answer questions such as ''"How many filled Sudoku grids are there?"'', "''What is the minimal number of clues in a valid puzzle?''" and ''"In what ways can Sudoku g ...
. The more recent
KenKen KenKen and KenDoku are trademarked names for a style of arithmetic and logic puzzle invented in 2004 by Japanese math teacher Tetsuya Miyamoto,
puzzles are also examples of Latin squares.

## Board games

Latin squares have been used as the basis for several board games, notably the popular abstract strategy game Kamisado.

## Agronomic research

Latin squares are used in the design of agronomic research experiments to minimise experimental errors.

# Heraldry

The Latin square also figures in the arms of the
Statistical Society of Canada The Statistical Society of Canada (SSC) (french: Société statistique du Canada) is a professional organization whose mission is to promote the use and development of statistics and probability. Its objectives are * to make the general public aw ...
, being specifically mentioned in its
blazon In heraldry Heraldry () is a discipline relating to the design, display and study of armorial bearings (known as armory), as well as related disciplines, such as vexillology, together with the study of ceremony, Imperial, royal and noble rank ...

. Also, it appears in the logo of the
International Biometric Society The International Biometric Society (IBS) is an international professional and academic society promoting the development and application of statistical and mathematical theory and methods in the biosciences, including biostatistics. It sponsors th ...
.The International Biometric Society

# Generalizations

* A Latin rectangle is a generalization of a Latin square in which there are ''n'' columns and ''n'' possible values, but the number of rows may be smaller than ''n''. Each value still appears at most once in each row and column. * A Graeco-Latin square is a pair of two Latin squares such that, when one is laid on top of the other, each ordered pair of symbols appears exactly once. * A Latin hypercube is a generalization of a Latin square from two dimensions to multiple dimensions.

*
Block design In combinatorics, combinatorial mathematics, a block design is an incidence structure consisting of a set together with a Family of sets, family of subsets known as ''blocks'', chosen such that frequency of the elements satisfies certain condition ...
*
Combinatorial design Combinatorial design theory is the part of combinatorics, combinatorial mathematics that deals with the existence, construction and properties of set system, systems of finite sets whose arrangements satisfy generalized concepts of ''balance'' and ...
*
Eight queens puzzle The eight queens puzzle is the problem of placing eight chess Chess is a recreational and competitive board game played between two players. It is sometimes called Western or international chess to distinguish it from chess variant, related ...
*
Futoshiki , or More or Less, is a logic puzzle game from Japan. Its name means "inequality (mathematics), inequality". It is also spelled hutosiki (using Kunrei-shiki romanization). Futoshiki was developed by Tamaki Seto in 2001. The puzzle is played on ...
*
Magic square In recreational mathematics Recreational mathematics is mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and ...

* Problems in Latin squares *
Rook's graph In graph theory, a rook's graph is a graph that represents all legal moves of the Rook (chess), rook chess piece on a chessboard. Each vertex of a rook's graph represents a square on a chessboard, and each edge represents a legal move from one squ ...

, a graph that has Latin squares as its *
Sator Square The Sator Square (or Rotas Square) is a two-dimensional word square containing a five-word Latin palindrome. It features in early Christian as well as in magical contexts. The earliest example of the square dates from the ruins of Pompeii ...
* Vedic square *
Word square A word square is a special type of acrostic An acrostic is a (or other form of writing) in which the first letter (or syllable, or word) of each line (or , or other recurring feature in the text) spells out a word, message or the alphabet. The ...

* * * *