Hubbry Logo
Latin squareLatin squareMain
Open search
Latin square
Community hub
Latin square
logo
8 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Latin square
Latin square
from Wikipedia

Displaying a 7 × 7 Latin square, this stained-glass window at Gonville and Caius College, Cambridge, honored Ronald Fisher, whose Design of Experiments discussed Latin squares. The Sir Ronald Fisher window was removed in 2020 because of Fisher's connection with eugenics.[1]

In combinatorics and in experimental design, 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

A B C
C A B
B C A

The name "Latin square" was inspired by mathematical papers by Leonhard Euler (1707–1783), who used Latin characters as symbols,[2][3] 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 1, 2, 3. Euler began the general theory of Latin squares.[4]

History

[edit]

The Korean mathematician Choi Seok-jeong was the first to publish an example of Latin squares of order nine, in order to construct a magic square in 1700, predating Leonhard Euler by 67 years.[5]

Counting

[edit]

This account follows McKay, Meynert & Myrvold (2007, p. 100).[6]

The counting of Latin squares has a long history, but the published accounts contain many errors. Euler in 1782,[7] and Cayley in 1890,[8] both knew the number of reduced Latin squares up to order five. In 1915, MacMahon[9] approached the problem in a different way, but initially obtained the wrong value for order five. M.Frolov in 1890,[10] and Tarry in 1901,[11][12] found the number of reduced squares of order six. M. Frolov gave an incorrect count of reduced squares of order seven. R.A. Fisher and F. Yates,[13] unaware of earlier work of E. Schönhardt,[14] gave the number of isotopy classes of orders up to six. In 1939, H. W. Norton found 562 isotopy classes of order seven,[15] but acknowledged that his method was incomplete. A. Sade, in 1951,[16] but privately published earlier in 1948, and P. N. Saxena[17] found more classes and, in 1966, D. A. Preece noted that this corrected Norton's result to 564 isotopy classes.[18] However, in 1968, J. W. Brown announced an incorrect value of 563,[19] which has often been repeated. He also gave the wrong number of isotopy classes of order eight. The correct number of reduced squares of order eight had already been found by M. B. Wells in 1967,[20] and the numbers of isotopy classes, in 1990, by G. Kolesova, C.W.H. Lam and L. Thiel.[21] The number of reduced squares for order nine was obtained by S. E. Bammel and J. Rothstein,[22] for order 10 by B. D. McKay and E. Rogoyski,[23] and for order 11 by B. D. McKay and I. M. Wanless.[24]

Reduced form

[edit]

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.[25] 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 (that is, reordering) the rows and columns. Here switching the above matrix's second and third rows yields the following square:

A B C
B C A
C A B

This Latin square is reduced; both its first row and its first column are alphabetically ordered A, B, C.

Properties

[edit]

Orthogonal array representation

[edit]

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 n2 triples called the orthogonal array representation of the square. For example, the orthogonal array representation of the Latin square

1 2 3
2 3 1
3 1 2

is

{ (1, 1, 1), (1, 2, 2), (1, 3, 3), (2, 1, 2), (2, 2, 3), (2, 3, 1), (3, 1, 3), (3, 2, 1), (3, 3, 2) },

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

r c s
1 1 1
1 2 2
1 3 3
2 1 2
2 2 3
2 3 1
3 1 3
3 2 1
3 3 2

The definition of a Latin square can be written in terms of orthogonal arrays:

  • A Latin square is a set of n2 triples (r, c, s), where 1 ≤ r, c, sn, 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 n2 ordered pairs (r, c) are all the pairs (i, j) with 1 ≤ i, jn, 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

[edit]

Many operations on a Latin square produce another Latin square (for example, turning it upside down).

If we permute the rows, permute the columns, or 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, 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.

A stronger form of equivalence exists. Two Latin squares L1 and L2 of side n with common symbol set S that is also the index set for the rows and columns of each square are isomorphic if there is a bijection g: SS such that g(L1(i, j)) = L2(g(i), g(j)) for all i, j in S.[26] An alternate way to define isomorphic Latin squares is to say that a pair of isotopic Latin squares are isomorphic if the three bijections used to show that they are isotopic are, in fact, equal.[27] Isomorphism is also an equivalence relation and its equivalence classes are called isomorphism classes.

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 parastrophes) of the original square.[28]

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.[28] Each main class contains up to six isotopy classes.

Number of n × n Latin squares

[edit]

There is no known easily computable formula for the number Ln of n × n Latin squares with symbols 1, 2, ..., n. The most accurate upper and lower bounds known for large n are far apart. One classic result[29] is that

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 Ln of n × n Latin squares is where Bn is the set of all n × n {0, 1}-matrices, σ0(A) is the number of zero entries in matrix A, and per(A) is the permanent of matrix A.[30]

The table below contains all known exact values. It can be seen that the numbers grow exceedingly quickly. For each n, the number of Latin squares altogether (sequence A002860 in the OEIS) is n! (n − 1)! times the number of reduced Latin squares (sequence A000315 in the OEIS).

The numbers of Latin squares of various sizes
n reduced Latin squares of size n
(sequence A000315 in the OEIS)
all Latin squares of size n
(sequence A002860 in the OEIS)
1 1 1
2 1 2
3 1 12
4 4 576
5 56 161,280
6 9,408 812,851,200
7 16,942,080 61,479,419,904,000
8 535,281,401,856 108,776,032,459,082,956,800
9 377,597,570,964,258,816 5,524,751,496,156,892,842,531,225,600
10 7,580,721,483,160,132,811,489,280 9,982,437,658,213,039,871,725,064,756,920,320,000
11 5,363,937,773,277,371,298,119,673,540,771,840 776,966,836,171,770,144,107,444,346,734,230,682,311,065,600,000
12 1.62 × 1044
13 2.51 × 1056
14 2.33 × 1070
15 1.50 × 1086

For each n, each isotopy class (sequence A040082 in the OEIS) contains up to (n!)3 Latin squares (the exact number varies), while each main class (sequence A003090 in the OEIS) contains either 1, 2, 3 or 6 isotopy classes.

Equivalence classes of Latin squares
n main classes

(sequence A003090 in the OEIS)

isotopy classes

(sequence A040082 in the OEIS)

structurally distinct squares

(sequence A264603 in the OEIS)

1 1 1 1
2 1 1 1
3 1 1 1
4 2 2 12
5 2 2 192
6 12 22 145,164
7 147 564 1,524,901,344
8 283,657 1,676,267
9 19,270,853,541 115,618,721,533
10 34,817,397,894,749,939 208,904,371,354,363,006
11 2,036,029,552,582,883,134,196,099 12,216,177,315,369,229,261,482,540

The number of structurally distinct Latin squares (i.e. the squares cannot be made identical by means of rotation, reflection, and permutation of the symbols) for n = 1 up to 7 is 1, 1, 1, 12, 192, 145164, 1524901344 respectively (sequence A264603 in the OEIS).

Examples

[edit]

We give one example of a Latin square from each main class up to order five.

They present, respectively, the multiplication tables of the following groups:

  • {0} – the trivial 1-element group
  • – the binary group
  • cyclic group of order 3
  • – the Klein four-group
  • – cyclic group of order 4
  • – cyclic group of order 5
  • the last one is an example of a quasigroup, or rather a loop, which is not associative.

Orthogonal pairs

[edit]

Two Latin squares of the same order n are called orthogonal if, by overlaying them, one gets every ordered pair (a,b) of symbols where a is a symbol in the first square and b is one in the second square. Orthogonal pairs and more generally sets of pairwise orthogonal Latin squares are important in design theory and finite geometry.

Transversals and rainbow matchings

[edit]

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 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. 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.

Therefore, many results on Latin squares/rectangles are contained in papers with the term "rainbow matching" in their title, and vice versa.[31]

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:In 1967, H. J. Ryser conjectured that, when n is odd, every n-by-n Latin square has a transversal.[32]

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.[33]

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.[32]

Some weaker versions of these conjectures have been proved:

  • Every n-by-n Latin square has a partial transversal of size 2n/3.[34]
  • Every n-by-n Latin square has a partial transversal of size n − sqrt(n).[35]
  • Every n-by-n Latin square has a partial transversal of size n − 11 log2
    2
    (n).[36]
  • Every n-by-n Latin square has a partial transversal of size n − O(log n/loglog n).[37]
  • Every large enough n-by-n Latin square has a partial transversal of size n −1.[38] (Preprint)

Algorithms

[edit]

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.[39]

Applications

[edit]

Statistics and mathematics

[edit]

Error correcting codes

[edit]

Sets of Latin squares that are orthogonal to each other have found an application as error correcting codes in situations where communication is disturbed by more types of noise than simple white noise, such as when attempting to transmit broadband Internet over powerlines.[42][43][44]

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.

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

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:

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

[edit]
Construction of Ramanujan's birthday magic square from a 4×4 Latin square with distinct diagonals and day (D), month (M), century (C) and year (Y) values, and Ramanujan's birthday example

The problem of determining if a partially filled square can be completed to form a Latin square is NP-complete.[45]

The popular Sudoku 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.

The more recent KenKen and Strimko puzzles are also examples of Latin squares.

Board games

[edit]

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

Agronomic research

[edit]

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

Heraldry

[edit]

The Latin square also figures in the arms of the Statistical Society of Canada,[47] being specifically mentioned in its blazon. Also, it appears in the logo of the International Biometric Society.[48]

Generalizations

[edit]
An order-4 Latin cube exploded
  • 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.

See also

[edit]

Notes

[edit]

References

[edit]

Further reading

[edit]
[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
![{\displaystyle {\begin{bmatrix}1&2&3\\2&3&1\\3&1&2\end{bmatrix}}}float-right A Latin square of order n is an n × n array filled with n different symbols, each occurring exactly once in each row and exactly once in each column. The concept was formalized and popularized by Leonhard Euler in the late , who explored their properties in relation to combinatorial problems such as the "36 officers problem," conjecturing impossibilities for certain orders that later proved partially incorrect. Latin squares underpin orthogonal arrays and mutually orthogonal sets, essential in finite geometries, , and , while their enumeration grows superexponentially with n, with exact counts known only up to n=11. In statistics, adapted them for experimental design to control two blocking factors, minimizing nuisance variation in agricultural trials and beyond. Variants like Sudoku puzzles extend Latin squares with additional positional constraints, highlighting their recreational and pedagogical value.

Fundamentals

Definition

A Latin square of order nn is an n×nn \times n array whose entries are symbols from a set SS of nn distinct elements, such that each symbol in SS appears exactly once in every row and exactly once in every column. This ensures that the rows (or columns) form permutations of the symbol set SS. The symbols need not be numbers; they can be any distinguishable objects, though conventionally labeled as 11 through nn or letters of an alphabet. For n=1n=1, the trivial Latin square consists of a single entry. Order 2 yields two non-isomorphic Latin squares, both cyclic shifts or their transposes. Higher orders produce exponentially more, with the number of Latin squares of order nn denoted LnL_n, growing super-exponentially.

Reduced form and normalization

A reduced Latin square of order nn, also known as a normalized or standard form Latin square, uses symbols 1 through nn with the first row in natural order 1, 2, \dots, n and the first column similarly ordered 1, 2, \dots, n from top to bottom. This canonical representation fixes the labeling of rows, columns, and symbols in specific positions to standardize the structure. Any Latin square can be isotoped to reduced form by permuting rows to position a chosen row first, relabeling symbols to order that row as 1 to nn, permuting columns to align the first row in sequence, and rearranging subsequent rows to sort the first column. Isotopisms preserve the Latin property, ensuring every under row, column, and symbol permutations contains exactly one , though distinct reduced squares may still be isotopic. Reduction aids enumeration by partitioning the set of all Latin squares. The total count LnL_n satisfies Ln=n!(n1)!rnL_n = n!(n-1)! r_n, where rnr_n denotes the number of reduced Latin squares of order nn. This relation holds because each reduced square expands to n!(n1)!n!(n-1)! distinct Latin squares via symbol (n!n! ways) and of the rows after the first ((n1)!(n-1)! ways), with column adjustments maintaining the fixed first row order. For small nn, r1=1r_1 = 1, r2=1r_2 = 1, r3=1r_3 = 1, r4=4r_4 = 4, and r5=56r_5 = 56, reflecting increasing complexity in constructing such squares.

Historical Development

Origins in combinatorics

The combinatorial origins of Latin squares trace to puzzles involving constrained arrangements in the late 17th century. In 1694, French mathematician Jacques Ozanam presented a problem in Récréation mathématique requiring the arrangement of 16 court playing cards into a 4×4 grid such that each row and each column contains exactly one card of each suit and one of each rank (king, queen, jack, ace). This construction is mathematically equivalent to a pair of orthogonal Latin squares of order 4, where one square encodes suits and the other ranks, demonstrating an early recognition of the structure's utility in ensuring balanced permutations without explicit formal definition. Leonhard Euler formalized and expanded these ideas in the , naming the objects "carrés latins" in his 1782 memoir Recherches sur une nouvelle espèce de quarrés magiques. Euler defined Latin squares as n×n arrays filled with n symbols, each appearing once per row and column, and explored their combinatorial properties, including the existence of orthogonal pairs that superimpose to form Graeco-Latin squares. He constructed such pairs for orders not congruent to 2 modulo 4 and applied them to derivations. A pivotal combinatorial challenge arose from Euler's 1782 "36 officers problem," which sought to arrange 36 officers—representing 6 ranks and 6 regiments—into a 6×6 formation where each row and column includes one officer of every rank and every regiment. This requires two of order 6, posing a question of existence that Euler conjectured impossible for orders of the form 4k+2, framing Latin squares within enumerative and existential . The problem underscored the tension between construction methods and non-existence proofs, influencing subsequent studies in . Early enumerations by Euler included counts for small orders: 1 for n=2, 12 for n=3, and 576 for n=4, derived via systematic checks, highlighting the rapid growth in combinatorial complexity. These efforts established Latin squares as tools for modeling balanced incomplete block designs and scheduling, with roots in actions rather than algebraic structures initially.

Euler's conjectures and resolutions

Leonhard Euler introduced the thirty-six officers problem in 1779, challenging the arrangement of 36 officers representing six ranks and six regiments into a 6×6 grid where each row and column includes exactly one officer per rank and one per regiment. This arrangement equates to two orthogonal of order 6, with one square encoding ranks and the other regiments. Euler concluded after extensive attempts that no solution exists for order 6. Euler extended this observation into a broader in 1782, asserting that no pair of orthogonal Latin squares exists for any order n2(mod4)n \equiv 2 \pmod{4}, encompassing n=6,10,14,n=6, 10, 14, and higher such values, while allowing existence for other n3n \geq 3 except powers of 2 under certain conditions. The conjecture stemmed from Euler's failed constructions and partial enumerations, positing a structural incompatibility for these orders. Gaston Tarry verified the impossibility for n=6n=6 in 1900 through exhaustive manual enumeration of derangements and permutations, confirming no orthogonal pair exists despite the existence of Latin squares of that order. This aligned with Euler's specific case but left the general claim unproven. The conjecture was refuted in 1959 when R. C. Bose, S. S. Shrikhande, and E. T. Parker constructed orthogonal pairs for n=10,14,18,n=10, 14, 18, and 2222, using finite geometry and orthogonal arrays to bypass earlier limitations. Their methods, detailed in subsequent works, demonstrated existence for all n2(mod4)n \equiv 2 \pmod{4} except n=2n=2 (trivially impossible) and n=6n=6, resolving the conjecture negatively while affirming the exceptional status of order 6.

Enumeration history and milestones

The enumeration of Latin squares originated with Leonhard Euler's manual counts in 1782, determining the numbers of reduced Latin squares (with the first row fixed as 1 to n in order) for orders 2 to 5 as 1, 1, 4, and 56, respectively. These figures were independently verified by in 1890 using distinct methods. In 1890, M. Frolov extended the effort to order 6, correctly enumerating 9408 reduced Latin squares of that order, though his count for order 7 proved erroneous. Gaston Tarry confirmed Frolov's result for order 6 through exhaustive manual enumeration completed by 1901, a laborious process involving over 14 million cases to also disprove the existence of orthogonal mates for order 6. P. R. McMahon applied an alternative recursive approach around the same era, reproducing the counts up to order 6 but replicating Frolov's error for order 7. The first complete and accurate enumeration of reduced Latin squares of order 7, totaling 16,942,080, was achieved by A. Sade in the mid-20th century, marking a key milestone amid prior incomplete efforts like those of G. H. Norton. Subsequent advances relied on computational methods; for instance, enumerations for orders 8 through 11 were obtained via systematic computer searches in the late 20th and early 21st centuries, with the order-11 count finalized around yielding over 10^{15} reduced squares. These efforts highlighted recurring challenges, including and historical discrepancies, underscoring the need for verification through independent algorithms.

Core Properties

Orthogonality and mutually orthogonal Latin squares

Two Latin squares L1L_1 and L2L_2 of order nn are orthogonal if the n2n^2 ordered pairs (L1(i,j),L2(i,j))(L_1(i,j), L_2(i,j)) for i,j=1,,ni,j=1,\dots,n comprise each possible ordered pair from the symbol sets exactly once. This condition ensures that superimposing the squares yields a permutation of all symbol combinations without repetition. A set of rr Latin squares of order nn forms a collection of (MOLS) if every distinct pair in the set is orthogonal. The maximum size rr of such a set, denoted N(n)N(n), satisfies N(n)n1N(n) \leq n-1 for all n2n \geq 2, with equality holding precisely when an affine plane of order nn exists. When nn is a , N(n)=n1N(n) = n-1, and explicit constructions arise from the Fn\mathbb{F}_n. One such construction defines the kk-th square (for k=0,1,,n2k=0,1,\dots,n-2) by Lk(i,j)=i+kjL_k(i,j) = i + k j (with L0(i,j)=jL_0(i,j) = j), where indices and operations are over Fn\mathbb{F}_n; follows because for distinct k,k,\ell, the equation i+kj=ai + k j = a and i+j=bi + \ell j = b solves uniquely for i,ji,j via field arithmetic, ensuring all pairs (a,b)(a,b) appear once. For example, order n=3n=3 (with F3={0,1,2}\mathbb{F}_3 = \{0,1,2\}) yields two MOLS: [012120201],[012201120]\begin{bmatrix} 0 & 1 & 2 \\ 1 & 2 & 0 \\ 2 & 0 & 1 \end{bmatrix}, \quad \begin{bmatrix} 0 & 1 & 2 \\ 2 & 0 & 1 \\ 1 & 2 & 0 \end{bmatrix}
Add your contribution
Related Hubs
User Avatar
No comments yet.