# Latin rectangle

In combinatorial mathematics, a Latin rectangle is an r × n matrix (where r ≤ n), using n symbols, usually the numbers 1, 2, 3, ..., n or 0, 1, ..., n − 1 as its entries, with no number occurring more than once in any row or column.
An n × n Latin rectangle is called a Latin square. Latin rectangles and Latin squares may also be described as the optimal colorings of rook's graphs, or as optimal edge colorings of complete bipartite graphs.
An example of a 3 × 5 Latin rectangle is:
    01234 34012 40321

## Normalization

A Latin rectangle is called normalized (or reduced) if its first row is in natural order and so is its first column.
The example above is not normalized.

## Enumeration

Let L(k, n) denote the number of normalized k × n Latin rectangles. Then the total number of k × n Latin rectangles is
    ${\frac {n!(n-1)!L(k,n)}{(n-k)!}}.$
A 2 × n Latin rectangle corresponds to a permutation with no fixed points. Such permutations have been called discordant permutations. An enumeration of permutations discordant with a given permutation is the famous problème des rencontres. The enumeration of permutations discordant with two permutations, one of which is a simple cyclic shift of the other, is known as the reduced problème des ménages.
The number of normalized Latin rectangles, L(k, n), of small sizes is given by
    k\n12345678 1 11111111 2 11311533092119 3 14461064357921673792 4 45665521293216420909504 5 5694081127040027206658048 6 940816942080335390189568 7 16942080535281401856 8 535281401856
When k = 1, that is, there is only one row, since the Latin rectangles are normalized there is no choice for what this row can be. The table also shows that L(n − 1, n) = L(n, n), which follows since if only one row is missing, the missing entry in each column can be determined from the Latin square property and the rectangle can be uniquely extended to a Latin square.

## Extendability

The property of being able to extend a Latin rectangle missing one row to a Latin square mentioned above, can be significantly strengthened. Namely, if r < n, then it is possible to append n − r rows to an r × n Latin rectangle to form a Latin square, using Hall's marriage theorem.

## Semi-Latin squares

A semi-Latin square is another type of incomplete Latin square. A semi-Latin square is an n × n array, L, in which some positions are unoccupied and other positions are occupied by one of the integers {0, 1, ..., n − 1}, such that, if an integer k occurs in L, then it occurs n times and no two k's belong to the same row or column. If m different integers occur in L, then L has index m.
For example, a semi-Latin square of order 5 and index 3 is:
    102 210 012 201 201
A semi-Latin square of order n and index m will have nm filled positions. The question arises, can a semi-Latin square be completed to a Latin square? Somewhat surprisingly, the answer is always.
Let L be a semi-Latin square of order n and index m, where m < n. Then L can be completed to a Latin square.
One way to prove this is to observe that a semi-Latin square of order n and index m is equivalent to an m × n Latin rectangle. Let L = ||a$_{ij}$|| be a Latin rectangle and S = ||b$_{ij}$|| be a semi-Latin square, then the equivalence is given by
    $b_{ij}=k{\text{ if and only if }}a_{kj}=i.$
For instance, the 3×5 Latin rectangle
    01234 34102 10423
is equivalent to this semi-Latin square of order 5 and index 3:
    021 201 021 102 120
since, for example, a$_{10}$ = 3 in the Latin rectangle so b$_{30}$ = 1 in the semi-Latin square.

## Applications

In statistics, Latin rectangles have applications in the design of experiments.