WorksMathematics
Avoiding a partial Latin square with an isotope of a given Latin square
Abstract
For all sufficiently large , we prove that every Latin square of order can be made to avoid any prescribed partial Latin square of order 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 is an array, whose cells are either empty or contain one symbol from a set of size , 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 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 is a completion of a partial Latin square if whenever is defined.
Let denote the symmetric group acting on . There is a natural action of 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 and Latin square of sufficiently large order, is avoided by at least one principal isotope of . In practice what we show is that can be avoided by an isotope of where we take the column permutation to be trivial. To see that this is equivalent to the claimed result, simply write and as sets of (row,column,symbol) triples, then exchange the last two coordinates.
Theorem 1. For all sufficiently large , if is a partial Latin square and is a Latin square of order , then there are permutations such that
for every filled cell of .
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 and such that the following is true for every positive integer . Suppose that is a partial Latin square of order in which each row and column has at most non-empty cells. Suppose that is an array of subsets of , each of size at most , in which each symbol occurs at most times among the sets in each row and column. Then if no cell of contains a symbol that occurs in the corresponding cell of , then there is a completion of that avoids .
In Theorem 2, a Latin square avoids if for all .
A Latin cube of order is an array in which every axis parallel line is a permutation of the same set of 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 , and record in a bipartite conflict graph which symbols of can meet which symbols of . 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 .
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 . Let be pairwise edge-disjoint matchings in , and let be a uniformly random perfect matching. Then, uniformly in the choice of the ,
Proof. For , put . Suppose that the graph has edges, and note that its maximum degree is at most . Let be the number of -edge matchings contained in . For each fixed ,
Indeed, start with all -tuples of edges. Only of them contain two edges with a common endpoint, given that .
A fixed -matching is contained in with probability . Consequently, Bonferroni’s inequalities applied to (1) give
Indeed, truncate inclusion–exclusion after terms. Each truncated sum differs from the corresponding truncation of by , while the two adjacent Bonferroni bounds differ by at most
First let and then . Inclusion–exclusion over the events using (2) gives that equals
We shall also use the standard bounded-differences inequality for functions of random permutations : if interchanging two values of changes by at most a fixed constant, then, for every fixed , there is a constant such that
For completeness, this follows by exposing the values of 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 uniformly at random, viewing it as the perfect matching . Define a bipartite graph whose two vertex classes are copies of , representing respectively the symbols of on the left and those of on the right. Join to if some filled cell of satisfies
A perfect matching in the bipartite complement pairs each -symbol with a -symbol to which it is not adjacent. Defining gives precisely a symbol permutation for which in every filled cell. We will show that some choice of makes have a perfect matching.
Set
Suppose that the symbol occurs in at . These row indices and these column indices are all distinct. For a symbol of , let be the unique row for which , and put
This is a matching: the are distinct, and an equality would put twice in one row of , since . Moreover, (4) says exactly that
Lemma 3 with gives, uniformly in and ,
Thus
for every vertex in .
Next fix three distinct symbols of . For each , the matchings , and are pairwise edge-disjoint. Indeed, a common edge would, by its first coordinate, arise from the same cell of , and its second coordinate would then give . Lemma 3, now with , yields
Here and in (6), the is uniform, as required when summing over the symbols.
Interchanging two values of affects only two rows. For a fixed -symbol, each affected row contains it at most once; for a fixed -symbol, each old or new row of contains it in exactly one column. Thus the neighbourhood of any fixed vertex of 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 large, (3) followed by a union bound over the degrees and fewer than triples, shows that for every fixed there is a choice of for which
simultaneously for all distinct .
Choose small enough that
this is possible because . Fix a row permutation satisfying (8) and (9). If had no perfect matching, Hall’s theorem would give a set in its left class with . Taking to be the complement of in the right class, we obtain
By (8), both and are at most ; hence (11) gives
For large , we can choose three distinct vertices . Then (12), the definition of and (9) together imply
a contradiction of (10). Thus has a perfect matching. As observed above, its matching map is the required symbol permutation . □
Concluding remarks
The requirement for to be sufficiently large cannot be omitted from Theorem 1 as shown by the following simple example. The partial Latin square
is not avoided by any Latin square of order 3. However, we conjecture different behaviour in the case when is itself a Latin square.
Conjecture 4. If and are any Latin squares of the same order , then there is a principal isotope of that avoids .
Note that Conjecture 4 is trivially true when , because any cyclic permutation on the rows will work. Hence it is also true when is a principal isotope of . In particular, Conjecture 4 is true when , which shows a difference between Latin squares and partial Latin squares. By computation, we have confirmed that Conjecture 4 holds for . To prove it holds for a particular value of , it suffices to test all possible pairs where occurs before in a list of principal isotopism class representatives of order . 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 the following is true for every sufficiently large integers . Suppose that is a Latin square of order . Suppose that is an array of subsets of , each of size at most , in which each symbol occurs at most times among the sets in each row and column. Then there is a principal isotope of that avoids .
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 layers. We have been somewhat cautious in our framing of Conjecture 5 because some generalisations of Theorem 2 fail quite badly. Let be the Cayley table of the elementary abelian group of order for arbitrarily large . Let be a partial Latin square of order with just three filled cells, namely and . Suppose that is an array of sets, all of which are empty except . Then there is no completion of that avoids and is in the isotopism class of .
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]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]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]N. J. Cavenagh, M. Lee, A. Mammoliti and I. M. Wanless, Bicolourable Latin squares, in preparation.
- [4]OEIS Foundation Inc. (2026), The On-Line Encyclopedia of Integer Sequences, Published electronically at https://oeis.org.