1 Introduction

A Latin square of order n is an \(n \times n\) matrix containing n symbols such that each row and each column contains one copy of each symbol. Unless otherwise specified, we use \(\mathbb {Z}_n\) as the symbol set and also use \(\mathbb {Z}_n\) to index the rows and columns. Where convenient (such as when embedding a Latin square inside a larger one), we consider \(\mathbb {Z}_n\) to be the set of integers \(\{0,\dots ,n-1\}\) rather than a set of congruence classes. For a Latin square \(L=[L_{ij}]\), we define \(E(L)=\{(i,j,L_{ij}) : i,j \in \mathbb {Z}_n\}\) to be the set of entries. The set of all entries in a row, all entries in a column or all entries containing a given symbol is called a line. In particular, a Latin square of order n contains exactly 3n lines. We say a line \(\ell \) is represented by an entry \({\mathbf {e}}\) whenever \({\mathbf {e}} \in \ell \). For a set of entries \({\mathscr {C}}\subseteq E(L)\), we say \(\ell \) is represented by \({\mathscr {C}}\) whenever \(|{\mathscr {C}}\cap \ell | \geqslant 1\), and we say it is represented \(|{\mathscr {C}}\cap \ell |\) times by \({\mathscr {C}}\). If \({\mathscr {C}}\cap \ell =\{{\mathbf {e}}\}\), we say that \(\ell \) is uniquely represented by \({\mathbf {e}}\). We define a c-cover as a c-subset of E(L) in which every line is represented. In order for a Latin square of order n to have a c-cover, we must have \(c \geqslant n\).

A partial transversal of deficit d is an \((n-d)\)-subset of E(L) in which every line is represented at most once. Since an entry (rcs) in a partial transversal uniquely represents three lines (its row, column and symbol), a partial transversal of deficit d represents exactly \(3(n-d)\) lines. A transversal is a partial transversal of deficit 0. Figure 1 gives examples of a partial transversal, a transversal and a cover.

In a Latin square L, we say a cover \({\mathscr {C}}\) of L is minimal if, for all \({\mathbf {e}} \in {\mathscr {C}}\), the set \({\mathscr {C}}\setminus \{{\mathbf {e}}\}\) is not a cover. If \({\mathscr {C}}\) is not minimal, then it has a redundant entry \({\mathbf {e}} \in {\mathscr {C}}\) for which \({\mathscr {C}}\setminus \{{\mathbf {e}}\}\) is also a cover. We also say \({\mathscr {C}}\) is minimum if every cover of L has size at least \(|{\mathscr {C}}|\) (for any subset of the entries, size means the number of entries involved). We say a partial transversal T of L is maximal if, for all \({\mathbf {e}} \in E(L) \setminus T\), the set \(T \cup \{{\mathbf {e}}\}\) is not a partial transversal. We stress that the maximality of a partial transversal T is always relative to the whole Latin square L, even when we locate T inside some proper subset of E(L).

Fig. 1
figure 1

A Latin square of order \(n=4\) where we highlight a partial transversal of deficit 1 (left), a transversal (middle), and an \((n+1)\)-cover (right)

There are many tantalising open questions regarding transversals [21]. One of the more famous problems is Brualdi’s Conjecture, which asserts that every Latin square possesses a near transversal, that is, a partial transversal of deficit 1. The current best result in this direction is due to Shor and Hatami [12] who showed that every Latin square has a partial transversal of deficit \(O(\log ^2n)\). There are a great many Latin squares that do not possess transversals [5], although no such example of odd order is known. In fact, Ryser [19] conjectured that there is no transversal-free Latin square of odd order. In this paper, we introduce the notion of covers with the primary aim of using them to facilitate the study of transversals.

Pippenger and Spencer [17] showed a very powerful and general result that includes covers of Latin squares as a special case. They showed that as \(n\rightarrow \infty \), the entries of a Latin square of order n can be decomposed into \(n-o(n)\) covers. In particular, this means that all Latin squares have a cover of size \(n+o(n)\). A better upper bound on the size of the smallest cover is given in Corollary 1.

A Latin square L of order n is equivalent to a tripartite 3-uniform hypergraph with n vertices in each part (corresponding respectively to rows, columns and symbols) and \(n^2\) hyperedges (corresponding to the entries of L). In this framework, a cover of L is precisely an edge cover (a set of hyperedges whose union covers the vertex set) of this hypergraph. Alternatively, L can be considered as an n-uniform hypergraph of order \(n^2\) with edges that are precisely the 3n lines of L; a cover of L is precisely a vertex cover (a set of vertices that intersects every edge) of this hypergraph. This relationship with hypergraph covers is one justification for our choice of terminology.

Another reason for our terminology is the connection to covering codes. Writing each entry of L as a codeword of length 3 over an alphabet of size n, we obtain a maximal distance separable code (the connection between Latin squares and MDS codes was described by McWilliams and Sloane [15] as “one of the most fascinating chapters in all of coding theory”). By extending the alphabet to \(Q=\mathbb {Z}_n \cup \{\infty \}\), a cover \({\mathscr {C}}\subseteq E(L)\) of a Latin square L of order n is, in the sense of [3], a special case of a 2-cover in \(Q^3\) of the set \(\{(i,\infty ,\infty ) : i \in \mathbb {Z}_n\} \cup \{(\infty ,j,\infty ) : j \in \mathbb {Z}_n\} \cup \{(\infty ,\infty ,k) : k \in \mathbb {Z}_n\}\). It has the additional property that \({\mathscr {C}}\) is contained in E(L) for some Latin square L, which implies codewords in \({\mathscr {C}}\) do not contain \(\infty \).

A Latin square L of order n also has a natural representation as an \(n^2\)-vertex graph, called a Latin square graph which we denote \(\Gamma _L\), with vertex set E(L) and an edge between two distinct entries whenever they share a row, column or symbol. An example is shown in Fig. 2. The graph \(\Gamma _L\) is thus the union of 3n cliques of size n (one for each line), and a cover in L is equivalent to a selection of vertices in \(\Gamma _L\) in which each of these cliques has at least one representative. A cover of L does not necessarily map to a vertex cover of \(\Gamma _L\) (the example in Fig. 2 is not a vertex cover of \(\Gamma _L\)).

Fig. 2
figure 2

Converting between a Latin square L and the equivalent Latin square graph \(\Gamma _L\), with an \((n+1)\)-cover highlighted in both. Edge colours are added to indicate the relationship between neighbouring entries (dotted for the same row, dashed for the same column and solid for the same symbol) (Color figure online)

Any cover of L maps to a dominating set of \(\Gamma _L\). In fact, any cover of L corresponds to a 3-dominating set of \(\Gamma _L\), i.e., any entry outside the 3-dominating set has 3 or more neighbours inside the 3-dominating set [13, Sec. 7.1] (see also [6]). The converse is not true, i.e., not every 3-dominating set is a cover: a 3-dominating set (actually a 4-dominating set) is formed in \(\Gamma _L\) by the entries with symbols 0 and 1 in any Latin square L of order \(n \geqslant 2\). Yet, when \(n \geqslant 3\), this 4-dominating set does not cover the symbol 2. A cover therefore corresponds to a special kind of 3-dominating set, where each n-clique (arising from each line in the Latin square) has a representative in the cover.

Let L be a Latin square of order \(n \geqslant 3\). The domination number of \(\Gamma _L\), i.e., the size of the smallest dominating set of \(\Gamma _L\), denoted \(\gamma (\Gamma _L)\), is less than n: to form an \((n-1)\)-entry dominating set, select all but one of the entries with symbol 0. In fact, \(\gamma (\Gamma _L)\) will likely be smaller than \(n-1\), since any maximal partial transversal corresponds to a dominating set in \(\Gamma _L\). However, for a 3-dominating set of cardinality a to exist in \(\Gamma _L\), we must have

$$\begin{aligned}a\, 3(n-1) \geqslant 3(n^2-a)\end{aligned}$$

since each of the a entries in the 3-dominating set dominates at most \(3(n-1)\) vertices, and there are \(n^2-a\) entries dominated at least 3 times each. This implies that \(a \geqslant n\), implying the 3-domination number of \(\Gamma _L\), denoted \(\gamma _3(\Gamma _L)\), is strictly greater than the domination number, i.e., \(\gamma _3(\Gamma _L)>\gamma (\Gamma _L)\). (In fact, \(\gamma _3(G)>\gamma (G)\) holds for all graphs G with minimum degree at least 3 [13, Cor. 7.2].)

For each Latin square L there are six conjugate squares obtained by uniformly permuting the three coordinates in E(L). An isotopism of L is a permutation of its rows, permutation of its columns and permutation of its symbols. The resulting square is said to be isotopic to L. The isotopism class of L is the set of Latin squares isotopic to L. The autotopism group of L is the group of isotopisms that map L to itself. The species of L is the set of squares that are isotopic to some conjugate of L.

A theme in our work is to explore a loose kind of duality between covers and partial transversals. In Sect. 2 we demonstrate some relationships between the size of maximum partial transversals and the size of minimum covers, and between the numbers of these objects. In Sect. 3 we look at the other end of the spectrum, namely small maximal partial transversals and large minimal covers. Here we find less of a connection. We show that Latin squares of a given order have little variation in the size of their largest minimal covers, but can vary significantly in the size of their smallest maximal partial transversals. In Sect. 4 we summarise our achievements and discuss possible directions for future research.

2 Covers and partial transversals

In this section, we explore some basic relationships between covers and partial transversals. We first consider how to turn a partial transversal into a cover. Throughout, we will use \(\small \bullet \) in an entry when its value is irrelevant to our argument. For example, \((i,j,\small \bullet )\) is the entry in row i and column j, while \((\small \bullet ,\small \bullet ,k)\) is an arbitrary entry with symbol k.

Theorem 1

In a Latin square L of order \(n \geqslant 2\), any partial transversal T of deficit d is contained in an \((n+\lceil d/2 \rceil )\)-cover. Moreover, if T is maximal, then the smallest cover containing T has size \(n+\lceil d/2 \rceil \).

Proof

We begin assuming T is maximal, in which case any entry in \(E(L) \setminus T\) covers at most two previously uncovered lines. Let \(r_1,\dots ,r_d\), \(c_1,\dots ,c_d\) and \(s_1,\dots ,s_d\) denote, respectively, the rows, columns and symbols that are unrepresented in T. Start by setting \({\mathscr {C}}= T\). Then for \(i\in \{1,\dots ,\lfloor d/2\rfloor \}\) we add \((r_{2i-1},c_{2i-1},\small \bullet )\), \((r_{2i},\small \bullet ,s_{2i-1})\) and \((\small \bullet ,c_{2i},s_{2i})\) to \({\mathscr {C}}\). Finally, if d is odd we add \((r_d,c_d,\small \bullet )\) and \((\small \bullet ,\small \bullet ,s_d)\) to \({\mathscr {C}}\). This produces a cover of size \(n-d+\lceil 3d/2\rceil =n+\lceil d/2\rceil \). As we covered the maximum possible number of uncovered lines at each step, no smaller cover contains T.

If T is not maximal, then the above approach gives a cover \({\mathscr {C}}\) of size at most \(n+\lceil d/2 \rceil \), since there may be duplication among the entries that are added. Assuming \(n\geqslant 2\), we can simply add entries from \(E(L) \setminus {\mathscr {C}}\) until we have a cover of size \(n+\lceil d/2 \rceil \). \(\square \)

Since Shor and Hatami [12] have shown the existence of a partial transversal with small deficit, we immediately get:

Corollary 1

Every Latin square of order n has a cover of size \(n+O(\log ^2 n)\).

We now consider how to turn a cover into a partial transversal.

Theorem 2

Let L be Latin square of order \(n \geqslant 1\). Any \((n+a)\)-cover of L contains a partial transversal of deficit 2a.

Proof

Let R, C and S respectively be n-subsets of an \((n+a)\)-cover \({\mathscr {C}}\) in which each row, column and symbol is (necessarily uniquely) represented. Note that \(T = R \cap C \cap S\) is a partial transversal of L. Since \(|{\mathscr {C}}|=n+a\) and \(|{\mathscr {C}}\setminus R|=|{\mathscr {C}}\setminus C|=|{\mathscr {C}}\setminus S|=a\),

$$T = R \cap C \cap S={\mathscr {C}}\setminus \big ( ({\mathscr {C}}\setminus R) \cup ({\mathscr {C}}\setminus C) \cup ({\mathscr {C}}\setminus S) \big )$$

has size at least \(n-2a\), so has deficit at most 2a. Finally, if T has a smaller deficit, we can delete entries to obtain deficit exactly 2a. \(\square \)

For any \((n+1)\)-cover of a Latin square L, the corresponding \(n+1\) vertices of the Latin square graph \(\Gamma _L\) induce a subgraph with 3 edges. (This is an example of a partial Latin square graph [10]. A partial Latin square is an \(n \times n\) matrix containing at most n symbols, possibly with some empty cells, such that each row and each column contains at most one copy of each symbol. Alternatively, a partial Latin square can be viewed as a set of triples where no two triples agree in more than one coordinate.) Ignoring isolated vertices and edge colours, there are only 5 such graphs, which we denote \(G_1,\ldots ,G_5\), depicted in Fig. 3. We will refer to these graphs as being the graph induced by the cover (specifically, this terminology ignores isolated vertices). Taking a conjugate of L permutes the edge colours in the graph induced by a cover, which does not change the type of graph according to our classification.

Fig. 3
figure 3

Top row: The five possible non-isomorphic subgraphs induced by an \((n+1)\)-cover of a Latin square graph. Middle row: Depicting how the subgraphs \(G_1,\ldots ,G_5\) can arise in a cover. Bottom row: An example of a Latin square that simultaneously contains different covers that induce the five graph structures, \(G_1,\ldots ,G_5\) (Color figure online)

A consequence of Theorem 1 is that any Latin square of order \(n \geqslant 2\) with a partial transversal of deficit 1 has an \((n+1)\)-cover. Thus, if Brualdi’s Conjecture is true, then all Latin squares of order \(n \geqslant 2\) have an \((n+1)\)-cover. A converse of this statement is not immediate since we cannot always delete 2 entries from an \((n+1)\)-cover to give a partial transversal of deficit 1; see Fig. 3 (under graph \(G_1\)) for an example. However, Theorems 1 and 2 imply that a Latin square L of order \(n \geqslant 2\) has a partial transversal of deficit 2 if and only if it has an \((n+1)\)-cover. We now extend this observation to minimum covers.

Theorem 3

Let L be a Latin square of order \(n \geqslant 2\). The minimum size of a cover of L is \(n+a\) if and only if the minimum deficit of a partial transversal of L is either 2a or \(2a-1\).

Proof

First suppose that L has an \((n+a)\)-cover and no smaller cover. By Theorem 2, there is a partial transversal of deficit 2a. If L has a partial transversal of deficit at most \(2a-2\), then Theorem 1 implies there is a cover of size at most \(n+a-1\), which we are assuming is not the case. Hence, the minimum deficit of a partial transversal is either 2a or \(2a-1\).

For the converse, suppose the minimum deficit of a partial transversal is either 2a or \(2a-1\). By Theorem 1, there is an \((n+a)\)-cover. If there is a cover of size at most \(n+a-1\), then Theorem 2 implies there is a partial transversal of deficit at most \(2a-2\), which we are assuming is not the case. \(\square \)

For the \(a=0\) case in Theorem 3, a transversal of a Latin square of order n is also an n-cover. For the \(a=1\) case, cyclic group tables of even order are examples for which the minimum size of a cover is \(n+1\) and the minimum deficit of a partial transversal is 1. Brualdi’s Conjecture implies the minimum size of a cover of an order-n Latin square is n or \(n+1\).

Figure 3 also includes an example of a Latin square of order 5 in which all five of the possible induced subgraphs are achieved by different \((n+1)\)-covers. We make the following observations about deleting vertices from the graphs in Fig. 3.

  • For graph \(G_4\), we can delete one vertex to create an edgeless graph, so deleting the corresponding entry from the \((n+1)\)-cover gives a transversal. Thus \((n+1)\)-covers that induce \(G_4\) are not minimal, unlike the other four graphs (\(G_1\), \(G_2\), \(G_3\) and \(G_5\)).

  • For graphs \(G_2,\ldots ,G_5\), we can delete two vertices to create an edgeless graph, and deleting the corresponding entries from the \((n+1)\)-cover gives a near-transversal.

  • For graph \(G_1\), we must delete at least 3 vertices to create an edgeless graph.

  • For any vertex v of any of the five graphs \(G_1,\ldots ,G_5\), it is possible to delete 3 or fewer vertices to create an edgeless graph without deleting v. Thus when \(n \geqslant 2\), every entry in an \((n+1)\)-cover belongs to a partial transversal of deficit 2.

We define \(q_i=q_i(L)\) to be the number of \((n+1)\)-covers that induce \(G_i\) in a Latin square L. Across all species of order \(n \leqslant 8\), we found all \((n+1)\)-covers. Table 1 lists the average number (rounded off) of \((n+1)\)-covers that induce each graph across these species. Table 1 also gives the least number of \((n+1)\)-covers found of each of the 5 types. It is interesting to note that for each n, the number of all \((n+1)\)-covers is fairly consistent across the Latin squares of order n (in the sense that the range is small compared to the average). This is not true, for example, for the number of transversals.

Table 1 The number of \((n+1)\)-covers that induce \(G_i\), averaged over species of Latin square of order n

Theorems 2 and 3 leave open some possibilities, e.g., a Latin square might have two minimum covers that differ in terms of the smallest deficit of the partial transversals that they contain. The following theorem gives some restrictions in this context.

Theorem 4

Let L be a Latin square of order \(n\geqslant 2\) in which the minimum deficit of a partial transversal is d. Then:

  1. 1.

    the minimum size of a cover of L is \(n+\lceil d/2 \rceil \),

  2. 2.

    any partial transversal T of deficit d is contained in a minimum cover of L,

  3. 3.

    any minimum cover contains a partial transversal of deficit d if d is even, or deficit \(d+1\) if d is odd, and

  4. 4.

    if d is even, any minimum cover that contains an entry \({\mathbf {e}}\) contains a minimum-deficit partial transversal that contains \({\mathbf {e}}\).

Proof

If L has a cover of size less than \(n+\lceil d/2 \rceil \), then Theorem 2 implies it has a partial transversal of deficit less than d, contradicting the assumption that d is the minimum deficit. So any cover has size at least \(n+\lceil d/2 \rceil \), and Theorem 1 implies T is contained in some cover of size \(n+\lceil d/2 \rceil \).

Theorem 3 implies that any \((n+\lceil d/2 \rceil )\)-cover contains a partial transversal of deficit \(2\lceil d/2 \rceil \) or \(2\lceil d/2 \rceil -1\). When d is odd, these equal \(d+1\) and d, respectively, and we can delete an entry from a partial transversal of deficit d to obtain one of deficit \(d+1\). When d is even, Theorem 2 implies the cover contains a partial transversal of deficit d, and we can ensure \({\mathbf {e}}\) belongs to this partial transversal by choosing \({\mathbf {e}} \in R \cap C \cap S\) in the proof of Theorem 2. \(\square \)

Fig. 4
figure 4

Minimum covers of the Cayley table of \(\mathbb {Z}_8\) that induce graphs isomorphic to \(G_1\), \(G_2\), \(G_3\) and \(G_5\), respectively. For the three right-most covers, we can delete 2 entries from the highlighted cover to give a partial transversal of deficit 1, but we must delete at least 3 entries from the left-most cover to obtain a partial transversal, which will have deficit at least 2

Fig. 5
figure 5

A minimum cover \({\mathscr {C}}\) of the Cayley table of \(\mathbb {Z}_{10}\), where \({\mathscr {C}}\) does not contain a partial transversal of deficit 1, and each partial transversal of deficit 2 in \({\mathscr {C}}\) is maximal within the Latin square

Theorem 4 implies nothing consequential when \(d=0\). Cyclic groups of even order have minimum deficit \(d=1\), and are thus a convenient example to verify that the conditions of Theorem 4 cannot be tightened. To date, we only have examples of Latin squares where the minimum deficit of a partial transversal is \(d \in \{0,1\}\), with Brualdi’s Conjecture implying that this is always the case, so we cannot inspect \(d \geqslant 2\) cases. By inspecting cyclic group tables of even order, we make the following observations:

  • A minimum cover might not contain a partial transversal of minimum deficit d, but instead have one of deficit \(d+1\). Figure 4 gives an example of this; we give four covers of the Cayley table of \(\mathbb {Z}_8\), one of which contains no partial transversal of deficit 1.

  • A minimum cover might contain two maximal partial transversals, one of deficit d and one of deficit \(d+1\). The cover that induces \(G_2\) in Fig. 4 has this property.

  • A minimum cover might contain no partial transversals of minimum deficit d, with the partial transversals of deficit \(d+1\) it contains all being maximal. For the the Cayley table of \(\mathbb {Z}_{10}\), Fig. 5 shows an 11-cover that contains no partial transversals of deficit 1, and the 8 partial transversals of deficit 2 it contains are maximal.

Given the five possible graph structures of \((n+1)\)-covers in Fig. 3, we can enumerate the number of partial transversals of deficit d they contain, which we do in Table 2. The terms in Table 2 are derived as follows: For each way we can delete \(b+1\) vertices from the graph \(G_i\) to form an edgeless graph, we can form a partial transversal of deficit d by deleting them along with a further \(d-b\) entries that are not involved in \(G_i\). Each partial transversal of deficit d generated this way is distinct. Generally, these are not maximal partial transversals, but they are maximal partial transversals when \(d=0\), or when \(d=1\) for graphs other than \(G_4\).

Table 2 The number of distinct partial transversals of deficit d within an \((n+1)\)-cover that induces the subgraph \(G_i\)

Table 2 shows that the number of partial transversals of deficit d in an \((n+1)\)-cover depends significantly on its structure, e.g., when \(d=2\), the number varies from \(\Theta (1)\) to \(\Theta (n^2)\). We therefore do not anticipate a simple relationship between the number of partial transversals and the number of \((n+1)\)-covers in general. However, we have the following results for \((n+1)\)-covers.

Theorem 5

Let T be a maximal partial transversal of deficit d in a Latin square L of order \(n \geqslant 3\).

  1. 1.

    If \(d=0\), then T belongs to exactly \(n^2-n\) distinct \((n+1)\)-covers, none of which are minimal.

  2. 2.

    If \(d=1\), then T belongs to exactly \(3(n-1)\) distinct \((n+1)\)-covers, each of which is minimal.

  3. 3.

    If \(d=2\), then T belongs to exactly 8 distinct \((n+1)\)-covers.

  4. 4.

    If \(d\geqslant 3\), then T does not belong to any \((n+1)\)-cover.

Proof

The \(d=0\) case is trivial, so we begin with the case \(d=1\). Assume row i, column j and symbol k are unrepresented by T. Since T is maximal, \((i,j,k) \not \in E(L)\), so to extend it to an \((n+1)\)-cover, we must add entries of the form

  • \((i,j,\small \bullet )\) and \((\small \bullet ,\small \bullet ,k)\),

  • \((i,\small \bullet ,k)\) and \((\small \bullet ,j,\small \bullet )\), excluding \((i,j,\small \bullet )\), or

  • \((\small \bullet ,j,k)\) and \((i,\small \bullet ,\small \bullet )\), excluding \((i,j,\small \bullet )\) and \((i,\small \bullet ,k)\).

This gives \(3n-3\) distinct ways to extend T to an \((n+1)\)-cover. Each cover induces a graph of type \(G_2\), \(G_3\) or \(G_5\) (cf. Fig. 3). In particular, as \(G_4\) does not arise, the \((n+1)\)-covers are minimal.

Now assume \(d=2\). Assume rows i and \(i'\), columns j and \(j'\) and symbols k and \(k'\) are unrepresented by T. Since T is maximal, there are no entries of the form (xyz) with \(x \in \{i,i'\}\), \(y \in \{j,j'\}\) and \(z \in \{k,k'\}\). One \((n+1)\)-cover has the form \(T \cup \{(i,j,\small \bullet ),(i',\small \bullet ,k),(\small \bullet ,j',k')\}\), and we obtain all others by some combination of swapping i and \(i'\), swapping j and \(j'\), and/or swapping k and \(k'\).

When \(d \geqslant 3\), Theorem 1 implies that T does not extend to an \((n+1)\)-cover. \(\square \)

In the \(d=2\) case of Theorem 5, the 8 distinct \((n+1)\)-covers may or may not be minimal depending on the structure of L. For example, when \(n=3\), they are all non-minimal (since Latin squares of order 3 have no minimal 4-covers).

Theorem 6

Let L be a Latin square of order \(n \geqslant 3\). Let \(p_{\text {max}}\) be the number of maximal partial transversals of deficit 1 in L. Let \(q_{\text {min}}\) be the number of minimal \((n+1)\)-covers in L. Then \(q_{\text {min}}= q_1 + q_2 + q_3 + q_5\) and

$$\begin{aligned} 0 \leqslant \frac{2(q_{\text {min}}-q_1)}{3n-4} \leqslant p_{\text {max}}\leqslant \frac{2(q_{\text {min}}-q_1)}{3n-6} \leqslant \frac{2q_{\text {min}}}{3n-6}. \end{aligned}$$
(1)

If t is the number of transversals in L, then the number p of (not necessarily maximal) partial transversals of deficit 1 of L and the number q of (not necessarily minimal) \((n+1)\)-covers of L satisfy

$$\begin{aligned} p \leqslant \frac{2q+n(n-4)t}{3n-6}. \end{aligned}$$
(2)

Proof

The theorem is easily checked when \(n=3\) since \(p_{\text {max}}=q_{\text {min}}=q_1=0\) in this case, so assume \(n \geqslant 4\). Theorem 5 implies that each maximal partial transversal T of deficit 1 embeds in exactly \(3(n-1)\) distinct minimal \((n+1)\)-covers. Moreover, in the proof of Theorem 5, we observed that these \((n+1)\)-covers are of type \(G_2\), \(G_3\) or \(G_5\), which contain exactly 2, 3 and 3 maximal partial transversals of deficit 1, respectively. Thus,

$$\begin{aligned} 3(n-1)p_{\text {max}}= 2q_2 + 3q_3 + 3q_5. \end{aligned}$$
(3)

We also know

$$\begin{aligned}q_{\text {min}}= q_1 + q_2 + q_3 + q_5\end{aligned}$$

since \((n+1)\)-covers are minimal if and only if they do not induce \(G_4\). Hence

$$\begin{aligned} 3(n-1)p_{\text {max}}= 2q_{\text {min}}-2q_1 + q_3 + q_5. \end{aligned}$$
(4)

Let T be a maximal partial transversal of L of deficit 1. Up to isotopism of L, we may assume that \(T=\{(i,i,i) : i \in \mathbb {Z}_n \setminus \{z\}\}\), where \(z=n-1\), and \(L_{zz}=0\). Define r such that \(L_{rz}=z\) and define c such that \(L_{zc}=z\). Among the \(3(n-1)\) distinct minimal \((n+1)\)-covers containing T, we have the following three families:

$$\begin{aligned}&\big \{T \cup \{(z,z,0),(i,j,z)\} : i,j \in \mathbb {Z}_n \setminus \{0,z\} \big \},\\&\big \{T \cup \{(r,z,z),(z,j,k)\} : j,k \in \mathbb {Z}_n \setminus \{r,z\} \big \}, \text { and}\\&\big \{T \cup \{(z,c,z),(i,z,k)\} : i,k \in \mathbb {Z}_n \setminus \{c,z\} \big \}. \end{aligned}$$

Each family accounts for at least \(n-4\) distinct minimal \((n+1)\)-covers containing T and inducing \(G_2\). Since there are \(3(n-1)\) minimal \((n+1)\)-covers containing T, there can be at most 9 that do not induce \(G_2\), and hence either induce \(G_3\) or \(G_5\). We note that T is contained in at least 3 distinct minimal \((n+1)\)-covers that do not induce \(G_2\), corresponding to the three choices of two entries from \(\{(r,z,z),(z,c,z),(z,z,0)\}\). This means there are between 3 and 9 distinct \((n+1)\)-covers that induce \(G_3\) or \(G_5\) and contain T. Also, recall that each \((n+1)\)-cover that induces \(G_3\) or \(G_5\) contains exactly 3 maximal partial transversals of deficit 1. This gives \( 3p_{\text {max}}\leqslant 3q_3 + 3q_5 \leqslant 9p_{\text {max}}\) or simply \(p_{\text {max}}\leqslant q_3 + q_5 \leqslant 3 p_{\text {max}}\), which we substitute into (4) to obtain (1).

The number p of (not necessarily maximal) partial transversals of deficit 1 of L is \(p=p_{\text {max}}+nt\) and the number q of (not necessarily minimal) \((n+1)\)-covers of L is \(q=q_{\text {min}}+q_4=q_{\text {min}}+n(n-1)t\). Combining this with (1), we get (2). \(\square \)

Our next result is motivated by the work of Belyavskaya and Russu (see [7, p. 179]) who showed that Cayley tables of certain groups do not have maximal partial transversals of deficit 1, in which case \(p_{\text {max}}=q_2=q_3=q_5=0\). This is an obstacle to finding a non-trivial lower bound on \(p_{\text {max}}\) that is only a function of \(q_{\text {min}}\) and n.

Lemma 1

Let L be the Cayley table of an abelian group \({\mathscr {G}}\) of order n. If the Sylow 2-subgroups of \({\mathscr {G}}\) are trivial or non-cyclic then L has no maximal partial transversal of deficit 1 (and hence has no \((n+1)\)-cover inducing \(G_2\), \(G_3\) or \(G_5\)). On the other hand, if the Sylow 2-subgroups of \({\mathscr {G}}\) are non-trivial and cyclic then L has no transversal (and hence has no \((n+1)\)-cover inducing \(G_4\)).

Proof

Let \(X_{\mathscr {G}}\) denote the sum of the elements of \({\mathscr {G}}\). It is well-known (see, for example, [7, p. 9]) that \(X_{\mathscr {G}}\) is the identity if the Sylow 2-subgroups of \({\mathscr {G}}\) are trivial or non-cyclic and is otherwise equal to the unique element of order 2 in \({\mathscr {G}}\). In the latter case there are no transversals in L ( [7, p. 8]) as claimed, so we concentrate on the former case. Suppose T is a partial transversal of deficit 1 in L and that r, c and s are respectively the row, column and symbol that are not represented in T. Then \(-s=X_{\mathscr {G}}-s=(X_{\mathscr {G}}-r)+(X_{\mathscr {G}}-c)=-r-c\) because L is the Cayley table of \({\mathscr {G}}\). As \(s=r+c\), we see immediately that T is not maximal, from which the result follows. \(\square \)

Table 3 gives the value of \(q_i\) for the Cayley table of \(\mathbb {Z}_n\). The zeroes in Table 3 are all explained by Lemma 1, except that \(q_5=0\) in \(\mathbb {Z}_6\), which may just be a small order quirk.

Table 3 The number \(q_i\) of \((n+1)\)-covers of \(\mathbb {Z}_n\) that induce \(G_i\)

The maximal partial transversal highlighted in the Latin square

figure a

is contained in exactly 9 (necessarily minimal) \((n+1)\)-covers that do not induce \(G_2\). We also saw during the proof of Theorem 6 that all maximal partial transversals of deficit 1 are contained in at least 3 (necessarily minimal) \((n+1)\)-covers that do not induce \(G_2\). These observations present some obstacles to improving the bounds given in (1).

We also observe that in a general Latin square, (3) implies that \(q_2 \equiv 0 \pmod 3\). Akbari and Alipour [1] showed that \(p_{\text {max}}\equiv 0 \pmod 4\). Thus, \(2q_2 \equiv q_3+q_5 \pmod 4\) by (3). We also note \(q_4=n(n-1)t\), where t is the number of transversals, and t is even when the order n is even [4]. Also, we can delete an entry from any \((n+1)\)-cover of type \(G_3\) (when \(n \geqslant 5\)) or type \(G_5\) (when \(n \geqslant 4\)) and add another entry to obtain an \((n+1)\)-cover of type \(G_2\), implying that if \(q_2=0\), then \(q_3=q_5=0\) (which occurs for the odd-order cyclic group tables).

The question of which entries within Latin squares belong to transversals has also been studied. The parallel topic for covers plays a role throughout this paper, so we mention the following theorem, which can be derived from [8, 22].

Theorem 7

For every \(n\geqslant 5\), there exists a Latin square of order n that has transversals, but also has an entry that is not in any transversal. Consequently, for every \(n\geqslant 5\), there exists a Latin square of order n that contains an entry that is not in any minimum cover nor in any partial transversal of minimum deficit.

Theorem 7 does not extend to any order \(n\leqslant 4\) since all Latin squares of those orders are isotopic to the Cayley table of a group. Such Latin squares have autotopism groups that act transitively on entries, and hence every entry will be in a partial transversal of minimum deficit and also every entry will be in a minimum cover.

Consider a Latin square of L in which the minimum deficit of a partial transversal is d. By Theorem 4, every entry of L that is in a partial transversal of deficit d is also in a minimum cover. It is not clear if the converse holds when d is odd (although Theorem 4 shows the converse holds when d is even). There is no known Latin square of order \(n \geqslant 2\) that has an entry that is not in a partial transversal of deficit 1. If this property holds in general, then every entry that is in a minimum cover is also in a partial transversal of minimum deficit.

To finish this section, we observe that if a Latin square L of order \(n \geqslant 5\) has a transversal, then any entry in L belongs to a minimal \((n+1)\)-cover. Therefore, the entries in Theorem 7 that are not in minimum covers do belong to minimal covers of size 1 larger than minimum.

Theorem 8

If a Latin square L of order \(n \geqslant 5\) has a transversal T, then each entry of L belongs to some minimal \((n+1)\)-cover.

Proof

A computer search reveals that any entry in any Latin square of order \(n \in \{5,6\}\) belongs to a minimal \((n+1)\)-cover. Now assume \(n \geqslant 7\). By applying an isotopism, we may assume that \(T=\{(i,i,i) : i \in \mathbb {Z}_n\}\). Let (abc) be an arbitrary entry of L.

First, we consider the case when no transversal contains (abc) (implying that \(a \ne b\)). Consider

$$\begin{aligned} {\mathscr {C}}= \left( T \setminus \{(a,a,a),(b,b,b)\} \right) \cup \{(a,b,c),(b,c',a),(c'',a,b)\}. \end{aligned}$$

Now, \({\mathscr {C}}\) is a clearly a cover of L, and is minimal unless \(c = c' = c''\) leaving (ccc) as a redundant entry. However, if \(c = c' = c''\), then \({\mathscr {C}}\setminus \{(c,c,c)\}\) would be a transversal containing (abc), which we assumed did not exist, so \({\mathscr {C}}\) must be a minimal \((n+1)\)-cover containing (abc).

Now we may assume that \((a,b,c) \in T\) and that \(a = b = c = 0\). Let i be such that \(i \not \in \{0,1\}\) and \(L_{1i} \ne 0\). Consider

$$\begin{aligned} {\mathscr {C}}_1 = \left( T \setminus \{(1,1,1),(i,i,i)\} \right) \cup \{(1,i,j),(i,j',1),(j'',1,i)\}. \end{aligned}$$

By a similar argument as before, if j, \(j'\) and \(j''\) are not all the same, then \({\mathscr {C}}_1\) is a minimal \((n+1)\)-cover containing (abc). If \(j = j' = j''\), then note that \(j \not \in \{0,1,i\}\), and then let k be such that \(k \not \in \{0,1,i,j\}\) and \(L_{1k} \not \in \{0,i\}\) (this choice of k is possible since \(n \geqslant 7\)). Consider

$$\begin{aligned} {\mathscr {C}}_2 = \left( T \setminus \{(1,1,1),(k,k,k)\} \right) \cup \{(1,k,\ell ),(k,\ell ',1),(\ell '',1,k)\}. \end{aligned}$$

By a similar argument as before, if \(\ell \), \(\ell '\) and \(\ell ''\) are not all the same, then \({\mathscr {C}}_2\) is a minimal \((n+1)\)-cover containing (abc). If \(\ell = \ell ' = \ell ''\), then note that \(\ell \not \in \{0,1,j,k\}\) and L must have the following structure:

figure b

By removing the entries containing the symbols 1, ijk and \(\ell \) from T and adding the shaded entries, we have a minimal \((n+1)\)-cover containing (abc). \(\square \)

Theorem 8 does not hold for orders \(n \in \{1,3,4\}\) as the Latin squares of those orders that have transversals do not have minimal \((n+1)\)-covers (and Theorem 8 is vacuously true when \(n=2\)).

3 Large minimal covers

In this section, we consider the question of how large a minimal cover in a Latin square of order n can be.

When \(n \geqslant 3\), a transversal (which has size n) is the smallest minimal cover possible in a Latin square of order n. The size of the largest minimal cover is harder to establish. It is clear that it cannot be larger than size 3n, since there are only 3n lines and each entry in a minimal cover uniquely represents at least one line. Perhaps surprisingly, this is close to the true answer. We will show that every Latin square of order n has a minimal cover with size asymptotically equal to 3n as \(n\rightarrow \infty \).

To work towards finding the size of the largest minimal covers, we begin with a simple observation.

Lemma 2

Every Latin square L of order \(n \geqslant 1\) contains a minimal cover of size \(2n-1\). Furthermore, any entry of L belongs to a minimal cover of size \(2n-1\).

Proof

Take all entries that are either in the rth row or in the cth column. This gives a set of \(2n-1\) entries in which every line is represented. The entry \((r,c,L_{rc})\) uniquely represents its symbol. The other entries in row r uniquely represent their respective columns, and the other entries in column c uniquely represent their respective rows. Hence the cover is minimal. \(\square \)

We consider a more general problem that will be easier to handle. If an \(n \times n\) partial Latin square on the symbol set \(\mathbb {Z}_n\) has each row, column and symbol represented at least once, we call it a potential cover of order n. By definition, a cover admits a completion to a Latin square, whereas not all potential covers admit a completion. Figure 6 gives an example of two potential covers, one of which is a cover. A potential cover \({\mathscr {C}}\) of order n is minimal if, for all \({\mathbf {e}} \in {\mathscr {C}}\), the set \({\mathscr {C}}\setminus \{{\mathbf {e}}\}\) is not a potential cover of order n. We will bound the maximum size of minimal potential covers, thereby giving an upper bound on the cardinality of minimal covers.

Fig. 6
figure 6

Two potential covers of Latin squares of order 4. Only the right potential cover admits a completion to a Latin square of order 4 (as indicated) and is therefore a cover

Given a potential cover \({\mathscr {C}}\), define \(\mathcal {U}_\mathrm {R}=\mathcal {U}_\mathrm {R}({\mathscr {C}})\) to be the set of all entries that uniquely represent a row but no other line, \(\mathcal {U}_\mathrm {RC}=\mathcal {U}_\mathrm {RC}({\mathscr {C}})\) to be the set of all entries that uniquely represent a row and a column but no other line, \(\mathcal {U}_\mathrm {RCS}=\mathcal {U}_\mathrm {RCS}({\mathscr {C}})\) to be the set of all entries that uniquely represent a row, column and symbol, and define \(\mathcal {U}_\mathrm {C}\), \(\mathcal {U}_\mathrm {S}\), \(\mathcal {U}_\mathrm {RS}\) and \(\mathcal {U}_\mathrm {CS}\) accordingly. An example is given in Fig. 7.

If an entry does not uniquely represent a row, column or symbol, then it can be deleted to give a smaller potential cover, i.e., the potential cover is not minimal. If a potential cover \({\mathscr {C}}\) is minimal, then \(\{\mathcal {U}_\mathrm {R}, \mathcal {U}_\mathrm {C}, \mathcal {U}_\mathrm {S}, \mathcal {U}_\mathrm {RC}, \mathcal {U}_\mathrm {RS}, \mathcal {U}_\mathrm {CS},\mathcal {U}_\mathrm {RCS}\}\) is a partition of \({\mathscr {C}}\).

Fig. 7
figure 7

Illustrating \(\mathcal {U}_\mathrm {R}\), \(\mathcal {U}_\mathrm {RC}\), etc. for a minimal cover of a Latin square of order 7

Throughout the next proof, we edit a minimal potential cover \({\mathscr {C}}\) by deleting a few entries from it, and adding others, which creates a modified minimal potential cover. After such edits, to verify the result is indeed a minimal potential cover, we need to check the following three properties:

  1. 1.

    Partial Latin square When adding entries, we must ensure we do not violate the partial Latin square property by adding an entry to an already filled cell, or by adding a symbol to a row or column that already contains that symbol.

  2. 2.

    Potential cover After deleting entries from a minimal potential cover, we necessarily end up with some rows, columns and/or symbols unrepresented. These rows, columns and/or symbols must be represented by newly added entries.

  3. 3.

    Minimality We need to verify that each entry uniquely represents some row, column or symbol. We need only check this for the newly added entries and any entries that share a row, column or symbol with a newly added entry. This last point is the most subtle: it is easy to overlook that adding an entry might make another entry redundant.

We omit details of such routine checks without further comment.

Lemma 3

Let \(n \geqslant 2\). There exists a minimal potential cover M of order n, which is at least as large as all other minimal potential covers of order n, and has the following additional properties

$$\begin{aligned} \mathcal {U}_\mathrm {RC}&=\mathcal {U}_\mathrm {RS}=\mathcal {U}_\mathrm {CS}=\mathcal {U}_\mathrm {RCS}=\emptyset ,\\ |M|&= |\mathcal {U}_\mathrm {R}|+|\mathcal {U}_\mathrm {C}|+|\mathcal {U}_\mathrm {S}|, \\ 0<|\mathcal {U}_\mathrm {R}|&\leqslant (n-|\mathcal {U}_\mathrm {C}|)(n-|\mathcal {U}_\mathrm {S}|),\\ 0<|\mathcal {U}_\mathrm {C}|&\leqslant (n-|\mathcal {U}_\mathrm {R}|)(n-|\mathcal {U}_\mathrm {S}|), \text { and}\\ 0<|\mathcal {U}_\mathrm {S}|&\leqslant (n-|\mathcal {U}_\mathrm {R}|)(n-|\mathcal {U}_\mathrm {C}|). \end{aligned}$$

Proof

We assume that \({\mathscr {C}}\) is some minimal potential cover of order n of the largest possible size. If \(|{\mathscr {C}}|\leqslant 2n-1\), then the cover described in the proof of Lemma 2 satisfies the required conditions. So we may assume that \(|{\mathscr {C}}|\geqslant 2n\) (which implies that \(n\geqslant 3\)).

We first argue that \(\mathcal {U}_\mathrm {RCS}=\emptyset \). If \((r,c,s) \in \mathcal {U}_\mathrm {RCS}\), then since \(|{\mathscr {C}}| \geqslant 2n\) there is a row \(r' \ne r\) that contains at least two entries in \({\mathscr {C}}\) and, similarly, there is some column \(c' \ne c\) that contains at least two entries in \({\mathscr {C}}\). But then

$$\begin{aligned} \big ({\mathscr {C}}\setminus \{(r,c,s)\}\big ) \cup \big \{(r',c,s),(r,c',s)\big \} \end{aligned}$$

is a larger potential cover, contradicting the choice of \({\mathscr {C}}\). So \(\mathcal {U}_\mathrm {RCS}=\emptyset \).

Next, we explain how we can modify \({\mathscr {C}}\) in such a way that \(\mathcal {U}_\mathrm {S}\) and/or \(\mathcal {U}_\mathrm {RC}\) becomes empty, without decreasing the size of \({\mathscr {C}}\) nor violating the minimal potential cover property.

Suppose that there exists \((r_0,c_0,s_0) \in \mathcal {U}_\mathrm {S}\) and \((r_1,c_1,s_1) \in \mathcal {U}_\mathrm {RC}\). Note that the entries \((r_0,c_0,s_0)\) and \((r_1,c_1,s_1)\) cannot agree in any coordinate. We now split into three cases.

Case I: Symbol \(s_1\) does not appear in row \(r_0\) nor in column \(c_0\).

In this case,

$$\begin{aligned} \big ({\mathscr {C}}\setminus \{(r_1,c_1,s_1)\}\big ) \cup \big \{(r_0,c_1,s_1), (r_1,c_0,s_1)\big \} \end{aligned}$$

is a larger minimal potential cover than \({\mathscr {C}}\), contradicting the choice of \({\mathscr {C}}\).

Case II: Symbol \(s_1\) is represented at most twice in \({\mathscr {C}}\).

Since \((r_1,c_1,s_1) \in \mathcal {U}_\mathrm {RC}\), we know that \(s_1\) must be represented exactly twice in \({\mathscr {C}}\). It follows that \(s_1\) cannot occur in both row \(r_0\) and column \(c_0\). Suppose \(s_1\) does not occur in row \(r_0\) (the case when \(s_1\) does not occur in column \(c_0\) can be resolved symmetrically).

Since \(|{\mathscr {C}}|\geqslant 2n\), there exists a column \(c' \ne c_0\) that is not uniquely represented in \({\mathscr {C}}\). Case I implies \(s_1\) occurs in column \(c_0\) and hence does not occur in column \(c'\). Thus,

$$\begin{aligned} \big ({\mathscr {C}}\setminus \{(r_1,c_1,s_1)\}\big ) \cup \big \{(r_0,c_1,s_1), (r_1,c',s_1)\big \} \end{aligned}$$

is a larger potential cover than \({\mathscr {C}}\), contradicting the choice of \({\mathscr {C}}\).

Case III: Symbol \(s_1\) is represented at least three times in \({\mathscr {C}}\).

In this case,

$$\begin{aligned} \big ({\mathscr {C}}\setminus \{(r_0,c_0,s_0),(r_1,c_1,s_1)\}\big ) \cup \big \{(r_0,c_1,s_0), (r_1,c_0,s_0)\big \} \end{aligned}$$
(5)

is another minimal potential cover, with the same cardinality as \({\mathscr {C}}\). The switching (5) removes one entry from each of \(\mathcal {U}_\mathrm {S}\) and \(\mathcal {U}_\mathrm {RC}\), and replaces them with new entries in \(\mathcal {U}_\mathrm {C}\) and \(\mathcal {U}_\mathrm {R}\) respectively.

By iteration, we can reach a point where at least one of \(\mathcal {U}_\mathrm {S}\) and \(\mathcal {U}_\mathrm {RC}\) is empty. A similar process of switchings allows us to reach a point where one of \(\mathcal {U}_\mathrm {R}\) and \(\mathcal {U}_\mathrm {CS}\) is empty, and also one of \(\mathcal {U}_\mathrm {C}\) and \(\mathcal {U}_\mathrm {RS}\) is empty. We continue this process until at least one set from each pair is empty. Note that while making switch (5), we will increase the size of two sets in question. However, no matter which switching we perform, the number of entries in \(\mathcal {U}_\mathrm {RC}\cup \mathcal {U}_\mathrm {RS}\cup \mathcal {U}_\mathrm {CS}\) decreases, so the process terminates. Call the resulting minimal potential cover M.

Note that M satisfies \(|\mathcal {U}_\mathrm {R}| + |\mathcal {U}_\mathrm {RC}| + |\mathcal {U}_\mathrm {RS}| < n\), since there are only n rows and not all of them are uniquely represented. Similarly, \(|\mathcal {U}_\mathrm {C}| + |\mathcal {U}_\mathrm {RC}| + |\mathcal {U}_\mathrm {CS}| < n\). If \(\mathcal {U}_\mathrm {S}= \emptyset \), then

$$\begin{aligned} |{\mathscr {C}}|&= |\mathcal {U}_\mathrm {R}| + |\mathcal {U}_\mathrm {C}| + |\mathcal {U}_\mathrm {RC}| + |\mathcal {U}_\mathrm {RS}| + |\mathcal {U}_\mathrm {CS}| \\&\leqslant (|\mathcal {U}_\mathrm {R}| + |\mathcal {U}_\mathrm {RC}| + |\mathcal {U}_\mathrm {RS}|) + (|\mathcal {U}_\mathrm {C}| + |\mathcal {U}_\mathrm {RC}| + |\mathcal {U}_\mathrm {CS}|) < 2n, \end{aligned}$$

which contradicts the assumption that \(|{\mathscr {C}}| \geqslant 2n\). Therefore \(\mathcal {U}_\mathrm {S}\ne \emptyset \). By similar arguments, \(\mathcal {U}_\mathrm {R}\ne \emptyset \) and \(\mathcal {U}_\mathrm {C}\ne \emptyset \). By the deductions above, we have \(\mathcal {U}_\mathrm {CS}= \mathcal {U}_\mathrm {RS}= \mathcal {U}_\mathrm {RC}= \emptyset \), implying that \(|M|=|\mathcal {U}_\mathrm {R}|+|\mathcal {U}_\mathrm {C}|+|\mathcal {U}_\mathrm {S}|\).

The entries in \(\mathcal {U}_\mathrm {S}\) cannot share a row with any entry in \(\mathcal {U}_\mathrm {R}\), nor share a column with any entry in \(\mathcal {U}_\mathrm {C}\), so they lie in an \((n-|\mathcal {U}_\mathrm {R}|) \times (n-|\mathcal {U}_\mathrm {C}|)\) submatrix, implying that \(|\mathcal {U}_\mathrm {S}| \leqslant (n-|\mathcal {U}_\mathrm {R}|)(n-|\mathcal {U}_\mathrm {C}|)\). Symmetric results hold for \(\mathcal {U}_\mathrm {R}\) and \(\mathcal {U}_\mathrm {C}\), which completes the proof. \(\square \)

Theorem 9

Every minimal cover of a Latin square of order n has size at most \(\lfloor 3(n+1/2 - \sqrt{n+1/4})\rfloor \).

Proof

Let xyz be real numbers from the interval [0, n], and let \(\alpha =(x+y+z)/3\in [0,n]\). If (xyz) satisfies

$$\begin{aligned} x+yz&\geqslant n, \end{aligned}$$
(6)
$$\begin{aligned} y+xz&\geqslant n \text { and} \end{aligned}$$
(7)
$$\begin{aligned} z+xy&\geqslant n, \end{aligned}$$
(8)

then \((\alpha ,\alpha ,\alpha )\) also satisfies (6)–(8) because

$$\begin{aligned} \tfrac{1}{3}(x+y+z) + \left( \tfrac{1}{3}(x+y+z) \right) ^2&= \tfrac{1}{9} \left( 3x+3y+3z+x^2+y^2+z^2+2(xy+xz+yz) \right) \\&\geqslant \tfrac{1}{9} \left( 3x+3y+3z+3xy+3xz+3yz \right) \\&\geqslant n, \end{aligned}$$

where the first inequality holds because \(x^2+y^2+z^2 \geqslant xy+xz+yz\) and the second follows from (6)–(8). Since \(\alpha \geqslant 0\) and \(\alpha + \alpha ^2 \geqslant n\), it follows that

$$\begin{aligned} 3n - (x+y+z) = 3n - 3\alpha \leqslant 3\big (n+1/2 - \sqrt{n+1/4}\big ). \end{aligned}$$
(9)

Let \(M_0\) be an arbitrary minimal cover of a Latin square of order n. By Lemma 3, there is a minimal potential cover M such that \((n-|\mathcal {U}_\mathrm {R}|,n-|\mathcal {U}_\mathrm {C}|,n-|\mathcal {U}_\mathrm {S}|) \in [0,n]^3\) satisfies (6)–(8) and \(|M| \geqslant |M_0|\). Thus, by (9),

$$\begin{aligned} |M_0| \leqslant |M| = 3n - \big (n-|\mathcal {U}_\mathrm {R}|+n-|\mathcal {U}_\mathrm {C}|+n-|\mathcal {U}_\mathrm {S}|\big ) \leqslant 3\big (n+1/2 - \sqrt{n+1/4}\big ), \end{aligned}$$

from which the result follows.\(\square \)

We note that \(-1/2 + \sqrt{n+1/4}\) is a positive integer t when \(n=t^2+t\). We next show that the bound in Theorem 9 is achieved for orders n of this form, and therefore, by infinitely many covers. Moreover, we show that all theoretically possible minimal cover sizes are simultaneously achieved by different covers in a single Latin square of order \(t^2+t\).

Lemma 4

Let \(t\geqslant 2\) and let L be a Latin square of order \(n = t^2 + t\) with a transversal T and a minimal cover \({\mathscr {C}}\) of size \(3t^2\) such that \(|\mathcal {U}_\mathrm {R}| = |\mathcal {U}_\mathrm {C}| = |\mathcal {U}_\mathrm {S}| = t^2\) and \(|\mathcal {U}_\mathrm {R}\cap T| = t\). Then L contains a minimal c-cover for all \(c \in \{t^2+t, \ldots , 3t^2\}\).

Proof

Since \(|\mathcal {U}_\mathrm {R}| = t^2\), all elements in \(\mathcal {U}_\mathrm {C}\cup \mathcal {U}_\mathrm {S}\) must be contained in t rows. Similarly, \(\mathcal {U}_\mathrm {R}\cup \mathcal {U}_\mathrm {S}\) must be contained in t columns, and thus, \(\mathcal {U}_\mathrm {S}\) is a \(t \times t\) submatrix. We now argue that \({\mathscr {C}}\cap T=\mathcal {U}_\mathrm {R}\cap T\). Note that \(\mathcal {U}_\mathrm {S}\cap T = \emptyset \) since \(\mathcal {U}_\mathrm {R}\cup \mathcal {U}_\mathrm {S}\) is contained in t columns and \(|\mathcal {U}_\mathrm {R}\cap T| = t\). Similarly, \(\mathcal {U}_\mathrm {C}\cap T = \emptyset \) since at most \(n-|\mathcal {U}_\mathrm {S}|=t\) distinct symbols occur in \(\mathcal {U}_\mathrm {R}\cup \mathcal {U}_\mathrm {C}\) and \(|\mathcal {U}_\mathrm {R}\cap T| = t\). Permute the rows, columns and symbols of L in such a way that (a) \(T = \{(i,i,i) : 0 \leqslant i < t^2 + t\}\), (b) the entries in \(\mathcal {U}_\mathrm {S}\) comprise the bottom-left \(t \times t\) submatrix, and (c) the symbol in the bottom-left entry is \(t^2-1\) (this simplifies Case III below). Thus, L has the following structure:

figure c

Clearly, T itself provides a minimal \((t^2+t)\)-cover, and we also know that L has a minimal \((t^2+t+1)\)-cover by Theorem 8. For \(c\in \{t^2+t+2, \ldots , 3t^2\}\), we break into 3 cases. In each of these cases, a set of entries from T is added to \({\mathscr {C}}\), and then entries that have become redundant are removed. For each entry added that is not in the first t columns nor last t rows, three redundant entries will be removed (one from each of \(\mathcal {U}_\mathrm {R}\), \(\mathcal {U}_\mathrm {C}\) and \(\mathcal {U}_\mathrm {S}\)). These entries correspond to the set Y below. For each entry added in the last t rows, two redundant entries will be removed (one from each of \(\mathcal {U}_\mathrm {C}\) and \(\mathcal {U}_\mathrm {S}\)). These entries correspond to the set X below.

The 3t lines that are not uniquely represented by \({\mathscr {C}}\) are (a) the first t columns, (b) the last t rows and (c) the symbols in \(\mathcal {U}_\mathrm {R}\cap T\). In all cases the modifications that we make leave \(\mathcal {U}_\mathrm {R}\cap T\) in the resulting cover, so the lines in (a) and (c) will still be represented. The representatives of the last t rows will be addressed in each case. The other checks required to show that the resulting set of entries is a minimal c-cover are straightforward and will be omitted. If \(Z \subseteq \mathbb {Z}_n\), we define \(\mathcal {V}_\mathrm {R}(Z) = \{ (i,\small \bullet ,\small \bullet ) \in \mathcal {U}_\mathrm {R}: i \in Z \}\), and we define \(\mathcal {V}_\mathrm {C}\) and \(\mathcal {V}_\mathrm {S}\) similarly. Whenever we use this notation, the elements in Z will be in one-to-one correspondence with elements of \(\mathcal {V}_\mathrm {R}\) (similarly for \(\mathcal {V}_\mathrm {C}\) or \(\mathcal {V}_\mathrm {S}\)).

In each case,

$$\begin{aligned} {\mathscr {C}}(X,Y) = \big ( {\mathscr {C}}\cup \left\{ (i,i,i) : i \in X \cup Y \right\} \big ) \setminus \big ( \mathcal {V}_\mathrm {C}(X) \cup \mathcal {V}_\mathrm {S}(X) \cup \mathcal {V}_\mathrm {R}(Y) \cup \mathcal {V}_\mathrm {C}(Y) \cup \mathcal {V}_\mathrm {S}(Y) \big ). \end{aligned}$$

will be a minimal cover of the appropriate size. Note that in each case, \(|\mathcal {V}_\mathrm {C}(X) \cup \mathcal {V}_\mathrm {S}(X) \cup \mathcal {V}_\mathrm {R}(Y) \cup \mathcal {V}_\mathrm {C}(Y) \cup \mathcal {V}_\mathrm {S}(Y)| = 2|X| + 3|Y|\) and \(|{\mathscr {C}}(X,Y)| = 3t^2 - |X| - 2|Y|\).

Case I: \(c \in \{3t^2-t+1, \dots , 3t^2\}\). Define \(X = \{t^2,\dots ,t^2+(3t^2-c)-1\}\) (with \(X = \emptyset \) if \(c = 3t^2\)) and \(Y = \emptyset \). Note that since \(|X|+2|Y| < t\), the elements of \({\mathscr {C}}(X,Y)\) in the bottom-left \(t \times t\) submatrix cover the last t rows of L. Thus, \({\mathscr {C}}(X,Y)\) is a minimal c-cover.

Case II: \(c \in \{t^2+t+2, \dots , 3t^2-t\}\) and c is even. Define \(X = \{t^2,\dots ,t^2+t-1\}\) and \(Y = \{t,\dots ,t+(3t^2-t-c)/2-1\}\) (with \(Y = \emptyset \) if \(c = 3t^2 - t\)). Note that the bottom t rows are covered by \(\left\{ (i,i,i) : i \in X \right\} \). Thus, \({\mathscr {C}}(X,Y)\) is a minimal c-cover.

Case III: \(c \in \{t^2+t+3, \dots , 3t^2-t-1\}\) and c is odd. Define \(X = \{t^2,\dots ,t^2+t-2\}\) and \(Y = \{t,\dots ,t+(3t^2-t-c+1)/2-1\}\). Note that \(t^2-1 \not \in Y\), so \((t^2+t-1,0,t^2-1) \in {\mathscr {C}}(X,Y)\), and so the bottom t rows are covered by \(\left\{ (i,i,i) : i \in X \right\} \cup \{(t^2+t-1,0,t^2-1)\}\). Thus, \({\mathscr {C}}(X,Y)\) is a minimal c-cover. \(\square \)

Theorem 10

For all \(t \geqslant 2\), there exists a Latin square of order \(n=t^2+t\) that contains a minimal c-cover for all \(c \in \{t^2+t, \ldots , 3t^2\}\).

Proof

For each order, we will give an example of a square that satisfies the properties required in Lemma 4. When \(t=2\), the following Latin square satisfies the requirements:

figure d

and when \(t = 6\), the Latin square given in Fig. 12 in the Appendix satisfies the requirements.

We may now assume that \(t \not \in \{2,6\}\), so there exists a pair (AB) of orthogonal Latin squares of order t. Define a \((t^2+t)\times (t^2+t)\) matrix D by filling cell \((\alpha t + r,\beta t + c)\), for \(\alpha ,\beta \in \{0,\ldots ,t\}\) and \(r,c \in \{0,\ldots ,t-1\}\), with the symbol

$$\begin{aligned} (A_{rc}-(\alpha + \beta +1), B_{rc}) \in \mathbb {Z}_{t+1} \times \mathbb {Z}_{t}. \end{aligned}$$

This means, for example, that row 0 has cell \((0,\beta t + c)\) filled with symbol \((A_{0c}-(\beta +1), B_{0c})\) whenever \(0 \leqslant \beta \leqslant t\) and \(0 \leqslant c \leqslant t-1\). Thus each symbol in \(\mathbb {Z}_{t+1} \times \mathbb {Z}_{t}\) occurs exactly once as we iterate over \(\beta \) and c, so the first row is Latin. A similar argument holds for each row and each column, so D is a Latin square. An example of this construction when \(t=4\) is given in Fig. 8.

Consider the set of entries in the bottom-left \(t \times t\) submatrix of D:

$$\begin{aligned} {\mathcal {D}}_S = \big \{\big ( t^2+r,c, (A_{rc},B_{rc}) \big ) \in E(D) : r,c \in \{0,\ldots ,t-1\} \big \}. \end{aligned}$$

Since A and B are orthogonal, each symbol that occurs in \({\mathcal {D}}_S\) occurs exactly once. The symbols in \(\mathbb {Z}_{t+1} \times \mathbb {Z}_{t}\) that do not occur in \({\mathcal {D}}_S\) are thus \(X=\{(t,0), \ldots , (t,t-1)\}\). Define

$$\begin{aligned} {\mathcal {D}}_R&= \big \{ (r,c,s) \in E(D) : c \in \{0, \ldots , t-1\} \text { and } s \in X \big \} \text { and} \\ {\mathcal {D}}_C&= \big \{ (r,c,s) \in E(D) : r \in \{t^2, \ldots , t^2 + t-1\} \text { and } s \in X \big \}. \end{aligned}$$

We next argue that \({\mathscr {C}}= {\mathcal {D}}_R \cup {\mathcal {D}}_C \cup {\mathcal {D}}_S\) is a minimal cover of D, where \(\mathcal {U}_\mathrm {R}= {\mathcal {D}}_R\), \(\mathcal {U}_\mathrm {C}= {\mathcal {D}}_C\), and \(\mathcal {U}_\mathrm {S}={\mathcal {D}}_S\). Each symbol is covered by \({\mathscr {C}}\), as described above. The first t columns are covered by \({\mathcal {D}}_S\). For any other column \(\beta t + c\) (with \(\beta \in \{1,\dots ,t\}\) and \(c \in \{0,\dots ,t-1\}\)), let r be such that \(A_{rc} = \beta -1\). The entry \((t^2+r,\beta t+c,\small \bullet ) \in {\mathcal {D}}_C\) covers column \(\beta t + c\). Since there were \(t^2\) such columns to cover and \(|{\mathcal {D}}_C| = t^2\), no entries in \({\mathcal {D}}_C\) are redundant (all entries in \({\mathcal {D}}_R\) and \({\mathcal {D}}_S\) are contained in the first t columns). A similar argument holds for covering the rows. Thus, \({\mathscr {C}}\) is a minimal cover of size \(3t^2\) with \(|\mathcal {U}_\mathrm {R}| = |\mathcal {U}_\mathrm {C}| = |\mathcal {U}_\mathrm {S}| = t^2\). Before we can apply Lemma 4, we must now find a transversal T in D such that \(|\mathcal {U}_\mathrm {R}\cap T| = t\).

Case I: t is even.

We may assume without loss of generality that \(A_{rr}=0\) and \(B_{rr}=r\) for \(r \in \{0,\ldots ,t-1\}\). We construct the Latin square D as described above. The symbols on the main diagonal of D are

$$\begin{aligned} \{(-2\alpha -1,r) : 0 \leqslant \alpha< t+1 \text { and } 0 \leqslant r < t \}. \end{aligned}$$

Since \(t+1\) is odd, this set is \(\mathbb {Z}_{t+1} \times \mathbb {Z}_t\), implying that the main diagonal is a transversal. Note that \(\mathcal {U}_\mathrm {R}\) intersects the first t entries of the main diagonal. Thus, we may apply Lemma 4 to D.

Case II: t is odd.

We set \(A_{rc} = c-r\mod t\) and \(B_{rc} = 2c-r \mod t\). Let D be the Latin square from the construction above. Note that

$$\begin{aligned} \big \{ ( \alpha t + r, \alpha t + r, (-2 \alpha - 1, r))&: 0 \leqslant \alpha< (t+1)/2 \text { and } 0 \leqslant r< t \big \} \\ \cup \big \{ ( \alpha t + r, \alpha t + (r + 1), (- 2 \alpha , r+2) )&: (t+1)/2 \leqslant \alpha< t+1 \text { and } 0 \leqslant r< t-1 \big \} \\ \cup \big \{ ( \alpha t + r, \alpha t, (- 2 \alpha , r+2) )&: (t+1)/2 \leqslant \alpha < t+1 \text { and }r = t-1 \big \} \end{aligned}$$

is a transversal of D and that \(\mathcal {U}_\mathrm {R}\) intersects the first t entries of this transversal. Thus, we may apply Lemma 4 to D. \(\square \)

Fig. 8
figure 8

Example of the construction in the proof of Theorem 10 after the symbols are relabeled to belong to \(\mathbb {Z}_{20}\). Here we have \(t=4\), and we highlight a \(3t^2\)-cover. We also highlight the main diagonal, which is a transversal

Our next goal is to show that all Latin squares have a minimal cover that is asymptotically equal to the bound in Theorem 9. To do so, we introduce the notion of a partial minimal cover. If L is a partial Latin square and \({\mathcal {P}} \subseteq E(L)\) such that, for some \({\mathbf {e}} \in {\mathcal {P}}\), both \({\mathcal {P}}\) and \({\mathcal {P}} \setminus \{{\mathbf {e}}\}\) represent the same lines, then we call \({\mathbf {e}}\)redundant. An entry \((r,c,s) \in {\mathcal {P}}\) is redundant if and only if there exists three other entries of the form \((r,\small \bullet ,\small \bullet )\), \((\small \bullet ,c,\small \bullet )\) and \((\small \bullet ,\small \bullet ,s)\) in \({\mathcal {P}}\). We define a partial minimal cover as any \({\mathcal {P}} \subseteq E(L)\) that has no redundant entries. We can iteratively delete redundant entries from any \({\mathcal {P}} \subseteq E(L)\) to obtain a partial minimal cover of size no more than \(|{\mathcal {P}}|\) in which the same lines are represented.

It is important to note that not every partial minimal cover can be extended to a minimal cover, and Fig. 9 gives two examples of partial minimal covers that cannot be extended to a minimal cover (nor even a larger partial minimal cover).

Fig. 9
figure 9

Two Latin squares with partial minimal covers that are not subsets of any minimal cover

Even though a partial minimal cover does not necessarily extend to a minimal cover, we can find a minimal cover that is at least as large as any partial minimal cover.

Lemma 5

Let L be a Latin square of order n and \({\mathcal {P}}\) be a partial minimal cover of L. Then L contains a minimal cover of size at least \(|{\mathcal {P}}|\).

Proof

If \(|{\mathcal {P}}| \leqslant 2n-1\), then the cover described in the proof of Lemma 2 satisfies the constraints, so assume \(|{\mathcal {P}}| \geqslant 2n\). If \({\mathcal {P}}\) is a minimal cover, then the statement is trivial so suppose there is some line, say row r, that is not covered by \({\mathcal {P}}\).

Since \(|{\mathcal {P}}| \geqslant 2n\), there exists a column c that is represented at least twice in \({\mathcal {P}}\). Define \({\mathcal {P}}' = {\mathcal {P}} \cup \{(r,c,s)\}\) where \(s=L_{rc}\). If \({\mathcal {P}}'\) is not a partial minimal cover, then there must be some entry in row r, in column c or with symbol s that is redundant. Since (rcs) is the only entry in row r, it is not redundant. Since there are at least three entries in column c in \({\mathcal {P}}'\), no entry in column c is redundant in \({\mathcal {P}}'\) (otherwise we contradict the minimality of \({\mathcal {P}}\)). However, if s is represented exactly once in \({\mathcal {P}}\), by \((r_0,c_0,s)\) say, then that entry is redundant in \({\mathcal {P}}'\) if and only if there are other entries covering row \(r_0\) and column \(c_0\). In this case, we define \({\mathcal {P}}''={\mathcal {P}}' \setminus \{(r_0,c_0,s)\}\), otherwise, we define \({\mathcal {P}}''={\mathcal {P}}'\). Note that in either case, \({\mathcal {P}}''\) is a partial minimal cover that covers strictly more lines than \({\mathcal {P}}\) and is at least as big as \({\mathcal {P}}\).

We repeat the above process until all lines are covered. \(\square \)

Next, we need a technical lemma.

Lemma 6

Fix \(\varepsilon >0\). Let G be a bipartite graph with bipartition \(A\cup B\) and maximum degree at most \(n^{1/2+\varepsilon }\). Suppose that G has \(n^{3/2+\varepsilon }-O(n^{1+2\varepsilon })\) edges and that \(|A|=n-O(n^{1/2+\varepsilon })\) and \(|B|=n-O(n^{1/2+\varepsilon })\). Then we can find a set \(U\subset A\) of vertices such that \(|U|=O(n^{1/2+\varepsilon })\) and there are at most \(O(n^{1/2+2\varepsilon })\) vertices in B that do not have a neighbour in U.

Proof

Let \(B'\subseteq B\) be the set of vertices in B of degree at least \(\frac{1}{2} n^{1/2+\varepsilon }\). Counting edges, we have that

$$\begin{aligned} n^{3/2+\varepsilon }-O(n^{1+2\varepsilon }) \leqslant n^{1/2+\varepsilon }|B'|+\tfrac{1}{2} n^{1/2+\varepsilon }\big (n-O(n^{1/2+\varepsilon })-|B'|\big ), \end{aligned}$$

which implies that \(|B'|\geqslant n-O(n^{1/2+2\varepsilon })\). Consider choosing a set \(U \subseteq A\) of size \(|U|=\lceil n^{1/2+\varepsilon }\rceil \) uniformly at random. For any \(v\in B'\) the probability that v has no neighbour in U is

$$\begin{aligned} \frac{\left( {\begin{array}{c}|A|-\mathrm {deg}(v)\\ |U|\end{array}}\right) }{\left( {\begin{array}{c}|A|\\ |U|\end{array}}\right) } \leqslant \frac{\left( {\begin{array}{c}|A|-\frac{1}{2} n^{1/2+\varepsilon }\\ |U|\end{array}}\right) }{\left( {\begin{array}{c}|A|\\ |U|\end{array}}\right) }= & {} \prod _{0\leqslant i<|U|}\frac{|A|-\frac{1}{2} n^{1/2+\varepsilon }-i}{|A|-i} \leqslant \bigg (\frac{|A|-\frac{1}{2} n^{1/2+\varepsilon }}{|A|}\bigg )^{|U|}\nonumber \\= & {} O\big (\exp (-\tfrac{1}{2} n^{2\varepsilon })\big ) \end{aligned}$$

using the identity \(1-1/x \leqslant e^{-1/x}\) when \(x \ne 0\). So the expected number of vertices in \(B'\) with no neighbour in U is \(O\big (n\exp (-\frac{1}{2} n^{2\varepsilon })\big )=o(1)\). It follows that for large n there is some choice of U whose neighbourhood includes \(B'\), and we are done. \(\square \)

Theorem 11

Fix \(\varepsilon >0\). Every Latin square of order n has a minimal cover of size \(3n-O(n^{1/2+\varepsilon })\).

Proof

If \(\varepsilon \geqslant 1/2\), then the theorem follows from Lemma 2, so assume that \(\varepsilon < 1/2\). Suppose L is a Latin square of order n and let \(\psi =\lfloor n^{1/2+\varepsilon }\rfloor \). We gradually build a large partial minimal cover \({\mathscr {C}}\) for L.

Define \(B_1\) to be the \(\psi \)-regular bipartite graph with vertices \(\{c_0,\dots ,c_{n-1}\}\cup \{s_0,\dots ,s_{n-1}\}\) with an edge \(c_is_j\) if and only if \(L_{ki}=j\) for some \(k \in \{0,\dots ,\psi -1\}\). Applying Lemma 6 to \(B_1\), we find a set \(U_1\subseteq \{c_0,\dots ,c_{n-1}\}\) with \(|U_1|=O(n^{1/2+\varepsilon })\) such that \(n-O(n^{1/2+2\varepsilon })\) vertices in \(\{s_0,\dots ,s_{n-1}\}\) have a neighbour in \(U_1\). In other words, the submatrix S formed by the rows indexed \(\{0,\dots ,\psi -1\}\) and the columns indexed \(\{i : c_i \in U_1\}\) contains a set of \(n-O(n^{1/2+2\varepsilon })\) entries with distinct symbols, and we (provisionally) initialise \({\mathscr {C}}\) to be this set of entries. By removing at most \(\psi \) entries from \({\mathscr {C}}\) if necessary, we identify a set \(\Psi \) of \(\psi \) symbols that are not yet represented in \({\mathscr {C}}\).

Next we form a bipartite graph \(B_2\). The vertices of \(B_2\) correspond to the rows and columns of L that do not intersect S. We place an edge from row vertex r to column vertex c if and only if \(L_{rc}\in \Psi \). Since S has \(O(n^{1/2+\varepsilon })\) rows and \(O(n^{1/2+\varepsilon })\) columns, \(B_2\) has \(n\psi -O(n^{1/2+\varepsilon }\psi )=n^{3/2+\varepsilon }-O(n^{1+2\varepsilon })\) edges and maximum degree at most \(\psi \). Hence we can apply Lemma 6 twice to find a set \(U_2\) of rows and a set \(U_3\) of columns with desired properties that we now describe. First, they do not intersect S. Second, they are small enough that \(|U_2|=O(n^{1/2+\varepsilon })\) and \(|U_3|=O(n^{1/2+\varepsilon })\). We (provisionally) include in \({\mathscr {C}}\) any entry containing a symbol in \(\Psi \) in the rows in \(U_2\) and/or the columns of \(U_3\). Lemma 6 implies that these entries cover a set \(U_4\) of \(n-O(n^{1/2+2\varepsilon })\) rows and a set \(U_5\) of \(n-O(n^{1/2+2\varepsilon })\) columns.

At this point, \({\mathscr {C}}\) may not be a partial minimal cover, so we iteratively remove redundant entries from \({\mathscr {C}}\). Afterwards, the following three sets, each comprising of \(n-O(n^{1/2+2\varepsilon })\) lines, are covered and no entry in \({\mathscr {C}}\) can cover more than one of the following lines:

  • The rows in \(U_4\) that are not in \(U_2\).

  • The columns in \(U_5\) that are not in \(U_3\).

  • The symbols other than those in \(\Psi \).

Thus \({\mathscr {C}}\) is a partial minimal cover of size at least \(3n-O(n^{1/2+2\varepsilon })\). By Lemma 5, there is a minimal cover of L of size \(3n-O(n^{1/2+2\varepsilon })\). We replace \(\varepsilon \) by \(\varepsilon /2\) to complete the proof. \(\quad \square \)

Next, we report on some computations of sizes of minimal covers for small Latin squares.

The Cayley tables of the groups \(\mathbb {Z}_3\) and \(\mathbb {Z}_2\times \mathbb {Z}_2\) have transversals and \((n+2)\)-covers, but do not have any minimal \((n+1)\)-covers. Thus the spectrum of sizes of minimal covers is not continuous in these two cases. However, these two Latin squares may be small-case anomalies, since we found no other Latin squares of order up to 8 with a gap in their spectrum.

For orders \(n\leqslant 5\), the minimal cover constructed in Lemma 2 meets the bound in Theorem 9 and hence has maximum possible size. For each order in the range \(6\leqslant n\leqslant 9\), we found a Latin square that has no minimal cover meeting the bound in Theorem 9. Our computations were exhaustive for \(6\leqslant n\leqslant 8\), where there is a gap of only 1 between the size of the cover in Lemma 2 and the bound in Theorem 9. For \(n=6\), there are 6 species that meet the bound and 6 that do not; neither group table meets the bound. For \(n=7\), there are 145 species that meet the bound. The 2 species that do not meet the bound contain the group \(\mathbb {Z}_7\) and the Steiner quasigroup. For \(n=8\) there are 283654 species that meet the bound. The 3 species that do not meet the bound contain the dihedral group, the elementary abelian group, and the Latin square obtained by turning an intercalate in the elementary abelian group (that is, by replacing a \(2\times 2\) Latin subsquare with the other possible subsquare on the same two symbols). Note that the autotopism group of the elementary abelian group acts transitively on the intercalates, so it does not matter which intercalate gets turned.

We could not do exhaustive computations for all Latin squares of order 9, but we confirmed that \(\mathbb {Z}_3\times \mathbb {Z}_3\) meets the bound in Theorem 9, whilst \(\mathbb {Z}_9\) does not. The largest minimal cover in \(\mathbb {Z}_9\) has size 18, which is one more than the size of the example in Lemma 2 but one less than the bound in Theorem 9.

In Sect. 2, we showed a kind of duality between minimal covers and maximal partial transversals. However, we next reveal a distinction between the behaviours of these objects. We begin with the following theorem, which gives the values of k and n for which there exists a Latin square of order \(n \geqslant 5\) with a maximal partial transversal of deficit k.

Theorem 12

For all integers \(n \geqslant 5\) and \(k \geqslant 1\) satisfying \(n \geqslant 2k\), there exists a Latin square \(L=[L_{ij}]\) of order n where \(L_{ii}=i\) for all \(i \in \{0,\ldots ,n-k-1\}\) and the intersection of the k rows and columns indexed by \(\{n-k,\ldots ,n-1\}\) is a subsquare (i.e., a submatrix that is a Latin square) on the symbols \(\{0,\ldots ,k-1\}\). Consequently, L has a maximal partial transversal of deficit k.

Proof

A Latin square \(M=[M_{ij}]\) of order m is idempotent if \(M_{ii}=i\) for all \(i \in \{0,\dots ,m-1\}\). Any Latin square with a transversal can be made idempotent by applying an isotopism.

The \(n=2k\) case of the theorem is immediate, by simply taking a direct product of an idempotent Latin square of order k with a Latin square of order 2. So we may assume that \(k \leqslant n-k-1\). Also, note that \(n-k \geqslant \lceil n/2 \rceil \geqslant 3\).

Fig. 10
figure 10

Matrices used in the \(n-k=6\) case of the proof of Theorem 12

If \(n-k=6\) and \(k\in \{4,5\}\), we define \(M'\) as given in Fig. 10. In all other relevant cases, we can find a Latin square of order \(n-k\) with \(k+1\) disjoint transversals [21]. Applying an isotopism, we get an idempotent Latin square \(M=[M_{ij}]\) of order \(n-k\). It has k disjoint transversals, denoted \(d_\sigma \) for \(\sigma \in \{n-k,\ldots ,n-1\}\), which do not intersect the main diagonal. We replace the symbols in \(\{k,\ldots ,n-k-1\}\) in each \(d_\sigma \) by the symbol \(\sigma \), and call the result \(M'\). We give an example of this construction in Fig. 11.

Thus, \(M'\) is idempotent and contains \(n-k\) copies of each symbol in \(\{0,\ldots ,k-1\}\) and \(n-2k\) copies of each symbol in \(\{k,\ldots ,n-1\}\). Ryser’s Theorem [18] implies that \(M'\) embeds in a Latin square L of order n; this is illustrated for the example in Fig. 11. Moreover, since \(M'\) contains each symbol in \(\{0,\ldots ,k-1\}\) exactly \(n-k\) times, the intersection of the k rows and columns indexed by \(\{n-k,\ldots ,n-1\}\) in L must be a subsquare on the symbols \(\{0,\ldots ,k-1\}\). \(\square \)

Fig. 11
figure 11

Example of the construction in the proof of Theorem 12 when \(n=7\) and \(k=2\)

Any partial transversal of deficit exceeding \(\lfloor n/2\rfloor \) can be extended. Thus, a consequence of Theorem 12 is that among all Latin squares of order \(n \geqslant 5\), the smallest maximal partial transversal has deficit \(\lfloor n/2\rfloor \). Theorem 11 shows that the upper bound on minimal covers described in Theorem 9 is achieved asymptotically for all Latin squares of order n. However, as we establish in the following theorem, most Latin squares do not come close to achieving a maximal partial transversal of deficit \(\lfloor n/2\rfloor \). While minimum covers directly relate to maximum partial transversals (see Theorems 1 and 2), maximum minimal covers seem not to have a direct relationship with minimum maximal partial transversals.

Theorem 13

Fix \(\varepsilon >0\). With probability approaching 1 as \(n\rightarrow \infty \), a Latin square of order n chosen uniformly at random has no maximal partial transversal of deficit exceeding \(n^{2/3+\varepsilon }\).

Proof

Let L be a random Latin square of order n. Suppose that L has a maximal partial transversal T of deficit d. Let S be the \(d\times d\) submatrix of L induced by the rows and columns that are not represented in T. By the maximality of T, we know that S contains none of the d symbols that are not represented in T. However, if this is the case and \(d=n^{2/3+\varepsilon }\), then [14, Thm 2] would imply that \(n^{1+3\varepsilon } = d^3/n = O(n^{1+3\varepsilon /2}\log n)\), which is a contradiction, so no such submatrix S exists in L. \(\square \)

4 Concluding remarks

We have introduced covers of Latin squares with the aim of using them to understand partial transversals better, focusing primarily on topics relating to extremal sizes.

We found that some properties of covers have analogous properties for partial transversals, while others do not. For example, the maximum size of partial transversals is closely related to the minimum size of covers. However, the smallest possible maximal partial transversal has deficit \(\lfloor n/2\rfloor \), which most Latin squares do not come close to achieving (see Theorem 13). In contrast, the maximum size of a minimal cover is \(3n-O(n^{1/2})\), which is asymptotically achieved by all Latin squares (see Theorem 11).

There are \((n+1)\)-covers that contain no partial transversals of deficit 0 or 1. The error on the upper bound on the number of partial transversals in Theorem 5 grows with the number of such \((n+1)\)-covers. Also, while Brualdi’s Conjecture implies the existence of \((n+1)\)-covers in all Latin squares of order n, we have not established the converse. Instead, a weaker form of the converse is true: if every Latin square of order \(n \geqslant 2\) has an \((n+1)\)-cover, then every Latin square of order \(n \geqslant 2\) has a partial transversal of deficit 2.

Relating the enumeration of partial transversals with small deficit (\(d \in \{1,2\}\)) to the enumeration of \((n+1)\)-covers is also difficult because the number of embeddings of a maximal partial transversal of deficit d within an \((n+1)\)-cover depends on the structure of the Latin square.

There are switches that can be performed among \((n+1)\)-covers, such as

figure e

which converts an \((n+1)\)-cover inducing \(G_5\) into an \((n+1)\)-cover inducing \(G_3\). However, we did not succeed in making switchings work for converting \((n+1)\)-covers inducing \(G_1\) into the other structures, which would yield a partial transversal of deficit 1. It is possible that more complicated switching patterns might succeed in changing the graph structure in \((n+1)\)-covers inducing \(G_1\), but it is also possible that identifying such switchings would not be possible without, say, proving Brualdi’s Conjecture.

In the case of minimal covers of maximum size, the results in Sect. 3 make significant progress, finding an explicit upper bound that is achieved infinitely often, and that is achieved asymptotically by all Latin squares.

Within the proof of Theorem 11 we showed the following result, which may be of independent interest:

Theorem 14

Any Latin square of order n has an \(O(n^{1/2+\varepsilon }) \times O(n^{1/2+\varepsilon })\) submatrix S containing \(n-O(n^{1/2+\varepsilon })\) symbols.

This raises the question as to whether stronger results in this direction hold. Not every \(n^2 \times n^2\) Latin square contains an \(n \times n\) submatrix that includes every symbol. The \(4 \times 4\) Latin squares each have \(2 \times 2\) submatrices containing all four symbols, but the \(9 \times 9\) Latin square

figure f

found by White [23], has the property that no \(3 \times 3\) submatrix contains all nine symbols. It would be of some interest to find more precise results for general Latin squares as to how small a submatrix contains every symbol, and/or how many distinct symbols we can be sure to find in at least one submatrix of given dimensions.

There are multiple directions in which the study of covers could be extended; we describe some below.

Some of the results here could be extended to Latin rectangles or even special kinds of partial Latin rectangles such as plexes [21]. It would also be interesting to extend the investigation to Latin hypercubes, sets of mutually orthogonal Latin squares, or to MDS codes more generally.

The Cayley tables of groups are of particular interest, since transversals in them are equivalent to orthomorphisms, and problems such as enumeration of orthomorphisms (particularly for cyclic groups) have been studied [16]. Moreover, cyclic group tables have a lot of structure (see, e.g., Lemma 1) that may permit a more successful study of switchings than in general Latin squares.

Each of the five structurally distinct \((n+1)\)-covers can be embedded in a Latin square of order 5, as shown in Fig. 3, so by replacing the \(5\times 5\) subsquares in the \(k=5\) case of Theorem 12, we find that every potential \((n+1)\)-cover embeds in a Latin square of order n, for all \(n \geqslant 10\). In fact, the same is easily found to be true for orders in \(\{5,\ldots ,9\}\) (by searching random Latin squares of these orders). It would be interesting to resolve the general case of this embedding problem, i.e., for which orders n does every potential \((n+a)\)-cover complete to a Latin square? A famous problem along these lines is the Evans Conjecture [9], now a theorem [2, 11, 20], which states that a partial Latin square of order n with at most \(n-1\) entries can be completed.

Balasubramanian [4] showed that Latin squares of even order have an even number of transversals. Exhaustive computations for orders \(n\leqslant 8\) suggest the following:

Conjecture 1

Let L be a Latin square of even order n, with t transversals and q covers of size \(n+1\), of which \(q_{\text {min}}\) are minimal. Then \(t\equiv 2 q\equiv 2q_{\text {min}}\pmod 4\).

We do know that \(2q\equiv 2q_{\text {min}}\pmod 4\) for any order n, because \(q=q_{\text {min}}+n(n-1)t\equiv q_{\text {min}}\pmod 2\). Another curious observation from our computations is that the number of \((n+1)\)-covers in every Latin square of order 7 is divisible by 3.

Finally, we mention that the data in Table 1 shows approximate consistency in the number of \((n+1)\)-covers that Latin squares of order n have. If this is a pattern, it might be worth investigating as a means to prove a weakened form of Brualdi’s Conjecture (via Theorem 2).