betaFeedback

WorksMathematics

Avoiding a partial Latin square with an isotope of a given Latin square

Abstract

For all sufficiently large nn, we prove that every Latin square of order nn can be made to avoid any prescribed partial Latin square of order nn by permuting only its rows and columns. The proof combines Hall's theorem with elementary estimates for a random permutation.

Introduction

A partial Latin square of order nn is an n×nn \times n array, whose cells are either empty or contain one symbol from a set of size nn, such that no symbol occurs more than once in any row or column. If no cell is empty the partial Latin square is a Latin square. We will use [n]={1,…,n}[n] = \{1, \ldots, n\} for our set of symbols, so that it matches the indices of the rows and columns. Two partial Latin squares avoid one another if they have different symbols in every cell that is filled in both partial Latin squares. A Latin square L=[Lij]L = [L_{ij}] is a completion of a partial Latin square P=[Pij]P = [P_{ij}] if Lij=PijL_{ij} = P_{ij} whenever PijP_{ij} is defined.

Let SnS_n denote the symmetric group acting on [n][n]. There is a natural action of Sn3S_n^3 on Latin squares, where three permutations permute the rows, columns and symbols respectively. This action is called isotopism and its orbits are isotopism classes. An isotopism is principal if it applies the identity permutation to symbols, and the result is a principal isotope of the original Latin square.

The purpose of this note is to prove that for any partial Latin square PP and Latin square LL of sufficiently large order, PP is avoided by at least one principal isotope of LL. In practice what we show is that PP can be avoided by an isotope of LL where we take the column permutation to be trivial. To see that this is equivalent to the claimed result, simply write PP and LL as sets of (row,column,symbol) triples, then exchange the last two coordinates.

Theorem 1. For all sufficiently large nn, if PP is a partial Latin square and LL is a Latin square of order nn, then there are permutations π,σ∈Sn\pi, \sigma\in S_n such that

σ(L(π(i),j))≠P(i,j)\sigma\left(L(\pi(i),j)\right) \ne P(i,j)

for every filled cell (i,j)(i,j) of PP.

Andrén, Casselgren and Markström [1] proved the following powerful result, a special case of which is that every partial Latin square of sufficiently large order is avoided by some Latin square.

Theorem 2. There are positive constants α\alpha and β\beta such that the following is true for every positive integer nn. Suppose that PP is a partial Latin square of order nn in which each row and column has at most αn\alpha n non-empty cells. Suppose that AA is an n×nn \times n array of subsets of [n][n], each of size at most βn\beta n, in which each symbol occurs at most βn\beta n times among the sets in each row and column. Then if no cell of PP contains a symbol that occurs in the corresponding cell of AA, then there is a completion of PP that avoids AA.

In Theorem 2, a Latin square L=[Lij]L = [L_{ij}] avoids A=[Aij]A = [A_{ij}] if Lij∉AijL_{ij} \notin A_{ij} for all i,j∈[n]i,j \in[n].

A Latin cube of order nn is an n×n×nn \times n \times n array in which every axis parallel line is a permutation of the same set of nn symbols. When building a Latin cube one layer at a time, each new layer needs to be a Latin square avoiding each of the previous layers. It is possible to become stuck (i.e. not be able to add any new layer) by the time that half of the layers have been added [2]. It is an interesting open question as to whether it is possible to get stuck earlier, although Theorem 2 shows that there is a linear lower bound on the number of layers before this can happen. Theorem 1 shows that when building a Latin cube of large order layer by layer, the second layer can be chosen from any desired isotopism class. Another application of Theorem 1 will be found in the forthcoming paper [3].

The proof of Theorem 1 rests on the following idea. Randomly permute the rows of LL, and record in a bipartite conflict graph which symbols of LL can meet which symbols of PP. An avoiding relabelling of the symbols is precisely a perfect matching in the bipartite complement. If this matching does not exist, Hall’s theorem produces a large complete bipartite subgraph of the conflict graph. We rule this out by controlling degrees and triple common neighbourhoods. The numerical heart of the proof is the inequality (1−e−1)3<e−1(1-e^{-1})^3 < e^{-1}.

Random permutations

In this section we prove some properties of random permutations that we need. We start with a lemma about the probability of a random permutation hitting disjoint matchings.

Lemma 3. Fix rr. Let M1,…,MrM_1,\ldots,M_r be pairwise edge-disjoint matchings in Kn,nK_{n,n}, and let Π\Pi be a uniformly random perfect matching. Then, uniformly in the choice of the MiM_i,

Pr⁡(Π∩Mi≠∅ for every i∈[r])≤(1−e−1)r+o(1).\Pr(\Pi\cap M_i \ne\varnothing\text{ for every }i \in[r]) \le(1-e^{-1})^r+o(1).

Proof. For J⊆[r]J \subseteq[r], put FJ=⋃j∈JMjF_J=\bigcup_{j\in J}M_j. Suppose that the graph FJF_J has m≤∣J∣nm \le|J|n edges, and note that its maximum degree is at most rr. Let qk(FJ)q_k(F_J) be the number of kk-edge matchings contained in FJF_J. For each fixed kk,

qk(FJ)=mkk!−Or,k(nk−1).(1)q_k(F_J)=\frac{m^k}{k!}-O_{r,k}(n^{k-1}). \tag*{(1)}

Indeed, start with all kk-tuples of edges. Only Or,k(nk−1)O_{r,k}(n^{k-1}) of them contain two edges with a common endpoint, given that m=Or(n)m=O_r(n).

A fixed kk-matching is contained in Π\Pi with probability (n−k)!/n!=n−k−Ok(n−k−1)(n-k)!/n!=n^{-k}-O_k(n^{-k-1}). Consequently, Bonferroni’s inequalities applied to (1) give

Pr⁡(Π∩FJ=∅)=e−m/n+o(1).(2)\Pr(\Pi\cap F_J=\varnothing)=e^{-m/n}+o(1). \tag*{(2)}

Indeed, truncate inclusion–exclusion after KK terms. Each truncated sum differs from the corresponding truncation of exp⁡(−m/n)\exp(-m/n) by Or,K(n−1)O_{r,K}(n^{-1}), while the two adjacent Bonferroni bounds differ by at most

rK+1(K+1)!+Or,K(n−1).\frac{r^{K+1}}{(K+1)!}+O_{r,K}(n^{-1}).

First let K→∞K \to\infty and then n→∞n \to\infty. Inclusion–exclusion over the events {Π∩Mi=∅}\{\Pi\cap M_i=\varnothing\} using (2) gives that Pr⁡(Π∩Mi≠∅ for every i∈[r])\Pr(\Pi\cap M_i \ne\varnothing\text{ for every }i \in[r]) equals

∑J⊆[r](−1)∣J∣e−∣FJ∣/n+o(1)=∏i=1r(1−e−∣Mi∣/n)+o(1)≤(1−e−1)r+o(1).\sum_{J\subseteq[r]}(-1)^{|J|}e^{-|F_J|/n}+o(1)=\prod_{i=1}^{r}(1-e^{-|M_i|/n})+o(1)\le(1-e^{-1})^r+o(1).

We shall also use the standard bounded-differences inequality for functions ff of random permutations π\pi: if interchanging two values of π\pi changes f(π)f(\pi) by at most a fixed constant, then, for every fixed ϵ>0\epsilon>0, there is a constant cϵc_\epsilon such that

Pr⁡(∣f(π)−Ef(π)∣>ϵn)≤2exp⁡(−cϵn).(3)\Pr(|f(\pi)-\mathbb{E}f(\pi)|>\epsilon n)\le2\exp(-c_\epsilon n). \tag*{(3)}

For completeness, this follows by exposing the values of π\pi one at a time and applying Azuma’s inequality; two possible continuations can be coupled by one transposition.

The conflict graph

We are now ready to prove our result.

Proof of Theorem 1. Choose a row permutation π∈Sn\pi\in S_n uniformly at random, viewing it as the perfect matching {(i,π(i)):i∈[n]}\{(i,\pi(i)) : i \in[n]\}. Define a bipartite graph B=B(π)B = B(\pi) whose two vertex classes are copies of [n][n], representing respectively the symbols of LL on the left and those of PP on the right. Join xx to ss if some filled cell (i,j)(i,j) of PP satisfies

L(π(i),j)=xandP(i,j)=s.(4)L(\pi(i),j)=x \quad\text{and}\quad P(i,j)=s. \tag*{(4)}

A perfect matching in the bipartite complement B‾\overline{B} pairs each LL-symbol xx with a PP-symbol ss to which it is not adjacent. Defining σ(x)=s\sigma(x)=s gives precisely a symbol permutation for which σ(L(π(i),j))≠P(i,j)\sigma(L(\pi(i),j)) \ne P(i,j) in every filled cell. We will show that some choice of π\pi makes B‾\overline{B} have a perfect matching.

Set

a=1−e−1.a=1-e^{-1}.

Suppose that the symbol ss occurs in PP at (i1,j1),…,(id,jd)(i_1,j_1),\ldots,(i_d,j_d). These row indices and these column indices are all distinct. For a symbol xx of LL, let uku_k be the unique row for which L(uk,jk)=xL(u_k,j_k)=x, and put

Ms,x={(ik,uk):1≤k≤d}.M_{s,x}=\{(i_k,u_k):1\leq k\leq d\}.

This is a matching: the iki_k are distinct, and an equality uk=uℓu_k=u_\ell would put xx twice in one row of LL, since jk≠jℓj_k\ne j_\ell. Moreover, (4) says exactly that

xs∈E(B)⟺π∩Ms,x≠∅.(5)xs\in E(B)\quad\Longleftrightarrow\quad\pi\cap M_{s,x}\ne\varnothing. \tag*{(5)}

Lemma 3 with r=1r=1 gives, uniformly in ss and xx,

Edeg⁡B(s)=∑xPr⁡(π∩Ms,x≠∅)≤(a+o(1))n,\mathbb{E}\deg_B(s)=\sum_x\Pr(\pi\cap M_{s,x}\ne\varnothing)\leq(a+o(1))n,
Edeg⁡B(x)=∑sPr⁡(π∩Ms,x≠∅)≤(a+o(1))n.\mathbb{E}\deg_B(x)=\sum_s\Pr(\pi\cap M_{s,x}\ne\varnothing)\leq(a+o(1))n.

Thus

Edeg⁡B(v)≤(a+o(1))n(6)\mathbb{E}\deg_B(v)\leq(a+o(1))n \tag*{(6)}

for every vertex vv in BB.

Next fix three distinct symbols x1,x2,x3x_1,x_2,x_3 of LL. For each ss, the matchings Ms,x1M_{s,x_1}, Ms,x2M_{s,x_2} and Ms,x3M_{s,x_3} are pairwise edge-disjoint. Indeed, a common edge would, by its first coordinate, arise from the same cell of PP, and its second coordinate would then give xi=xjx_i=x_j. Lemma 3, now with r=3r=3, yields

E∣NB(x1)∩NB(x2)∩NB(x3)∣≤(a3+o(1))n.(7)\mathbb{E}\left|N_B(x_1)\cap N_B(x_2)\cap N_B(x_3)\right|\leq(a^3+o(1))n. \tag*{(7)}

Here and in (6), the o(1)o(1) is uniform, as required when summing over the symbols.

Interchanging two values of π\pi affects only two rows. For a fixed PP-symbol, each affected row contains it at most once; for a fixed LL-symbol, each old or new row of LL contains it in exactly one column. Thus the neighbourhood of any fixed vertex of BB changes in at most four vertices. A fixed degree is therefore 4-Lipschitz under transpositions, and a fixed triple common-neighbourhood size is 12-Lipschitz. For nn large, (3) followed by a union bound over the 2n2n degrees and fewer than n3n^3 triples, shows that for every fixed ε>0\varepsilon>0 there is a choice of π\pi for which

Δ(B)≤(a+ε)nand,(8)\Delta(B)\leq(a+\varepsilon)n \quad\text{and}, \tag*{(8)}
∣NB(x1)∩NB(x2)∩NB(x3)∣≤(a3+ε)n(9)\left|N_B(x_1)\cap N_B(x_2)\cap N_B(x_3)\right|\leq(a^3+\varepsilon)n \tag*{(9)}

simultaneously for all distinct x1,x2,x3x_1,x_2,x_3.

Choose ε>0\varepsilon>0 small enough that

a3+ε<1−a−ε;(10)a^3+\varepsilon<1-a-\varepsilon; \tag*{(10)}

this is possible because (1−e−1)3<e−1(1-e^{-1})^3<e^{-1}. Fix a row permutation satisfying (8) and (9). If B‾\overline{B} had no perfect matching, Hall’s theorem would give a set XX in its left class with ∣NB‾(X)∣<∣X∣|N_{\overline{B}}(X)|<|X|. Taking Y=⋂x∈XNB(x)Y=\bigcap_{x\in X}N_B(x) to be the complement of NB‾(X)N_{\overline{B}}(X) in the right class, we obtain

X×Y⊆E(B)and∣X∣+∣Y∣>n.(11)X\times Y\subseteq E(B)\quad\text{and}\quad|X|+|Y|>n. \tag*{(11)}

By (8), both ∣X∣|X| and ∣Y∣|Y| are at most (a+ε)n(a+\varepsilon)n; hence (11) gives

min⁡(∣X∣,∣Y∣)>(1−a−ε)n.(12)\min(|X|,|Y|)>(1-a-\varepsilon)n. \tag*{(12)}

For large nn, we can choose three distinct vertices x1,x2,x3∈Xx_1,x_2,x_3\in X. Then (12), the definition of YY and (9) together imply

(1−a−ε)n<∣Y∣≤∣NB(x1)∩NB(x2)∩NB(x3)∣≤(a3+ε)n,(1-a-\varepsilon)n<|Y|\leq|N_B(x_1)\cap N_B(x_2)\cap N_B(x_3)|\leq(a^3+\varepsilon)n,

a contradiction of (10). Thus B‾\overline{B} has a perfect matching. As observed above, its matching map is the required symbol permutation σ\sigma. □

Concluding remarks

The requirement for nn to be sufficiently large cannot be omitted from Theorem 1 as shown by the following simple example. The partial Latin square

(12⋅213⋅31)\begin{pmatrix} 1 & 2 & \cdot\\ 2 & 1 & 3 \\ \cdot& 3 & 1 \end{pmatrix}

is not avoided by any Latin square of order 3. However, we conjecture different behaviour in the case when PP is itself a Latin square.

Conjecture 4. If LL and L′L' are any Latin squares of the same order n>1n>1, then there is a principal isotope of L′L' that avoids LL.

Note that Conjecture 4 is trivially true when L′=LL'=L, because any cyclic permutation on the rows will work. Hence it is also true when L′L' is a principal isotope of LL. In particular, Conjecture 4 is true when n≤3n\leq3, which shows a difference between Latin squares and partial Latin squares. By computation, we have confirmed that Conjecture 4 holds for n≤7n\leq7. To prove it holds for a particular value of nn, it suffices to test all possible pairs (L,L′)(L,L') where LL occurs before L′L' in a list of principal isotopism class representatives of order nn. The number of principal isotopism classes is A123234 on the OEIS [4]. There are 2 420 400 principal isotopism classes of order 7.

In the spirit of Theorem 2, we also offer this:

Conjecture 5. For any constant tt the following is true for every sufficiently large integers nn. Suppose that LL is a Latin square of order nn. Suppose that AA is an n×nn\times n array of subsets of [n][n], each of size at most tt, in which each symbol occurs at most tt times among the sets in each row and column. Then there is a principal isotope of LL that avoids AA.

If true, Conjecture 5 would mean that when stacking layers on top of each other to try to build a Latin cube, we would be free to choose the isotopism class of each layer up to t+1t+1 layers. We have been somewhat cautious in our framing of Conjecture 5 because some generalisations of Theorem 2 fail quite badly. Let LL be the Cayley table of the elementary abelian group of order n=2kn=2^k for arbitrarily large kk. Let P=[Pij]P=[P_{ij}] be a partial Latin square of order nn with just three filled cells, namely P11=P22=1P_{11}=P_{22}=1 and P12=2P_{12}=2. Suppose that A=[Aij]A=[A_{ij}] is an n×nn\times n array of sets, all of which are empty except A21={2}A_{21}=\{2\}. Then there is no completion of PP that avoids AA and is in the isotopism class of LL.

AI declaration and acknowledgement

This problem was proposed during the MATRIX-MFO Tandem Workshop (Combinatorial Interchange). The main ideas in the proof of Theorem 1 were found by ChatGPT 5.6 and then developed by the authors.

References

References

  1. [1]L. J. Andrén, C. J. Casselgren and K. Markström, Restricted completion of sparse partial Latin squares, Combin. Probab. Comput. 28 (2019), 675–695.DOI
  2. [2]D. Bryant, N. J. Cavenagh, B. Maenhaut, K. Pula and I. M. Wanless, Non-extendible latin cuboids, SIAM J. Discrete Math. 26, (2012) 239–249.
  3. [3]N. J. Cavenagh, M. Lee, A. Mammoliti and I. M. Wanless, Bicolourable Latin squares, in preparation.
  4. [4]OEIS Foundation Inc. (2026), The On-Line Encyclopedia of Integer Sequences, Published electronically at https://oeis.org.

Paper details

vlnc:W_pujzm4q6
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Mathematics

Not recorded for this paper

View statement
Looking for related papers…
Contents