The Spectrum of Group-Based Complete Latin Squares

We construct sequencings for many groups that are a semi-direct product of an odd-order abelian group and a cyclic group of odd prime order. It follows from these constructions that there is a group-based complete Latin square of order n if and only if n ∈ {1, 2, 4} or there is a non-abelian group of order n.


Introduction
A Latin square of order n is an n×n array of symbols from a set of size n with each symbol appearing once in each row and once in each column.A Latin square is row-complete or Roman if each pair of distinct symbols appears in adjacent positions in a row once in each order.It is complete if both it and its transpose are row-complete.
Interest in complete and row-complete Latin squares was originally prompted by their usefulness in the design of experiments where neighboring treatments, whether in space or time, might interact.See, for example, [4].
The Cayley table of a finite group of order n is a Latin square.The principal question for this work is to determine at what orders there is a group for which it is possible to permute the rows and columns of its Cayley table to give a complete Latin square.To this end, consider the following definition.Let G be a group of order n and a = (a 1 , a 2 , . . ., a n ) be an arrangement of the elements of G. Define b = (b 1 , b 2 , . . ., b n−1 ) by b i = a −1 i a i+1 for each i.If b includes each non-identity element of G exactly once then b is a sequencing of G and a is a directed terrace for G.Call a group that admits a sequencing sequenceable.
Theorem 1.1.[11] The rows and columns of the Cayley table of a group G of order n may be permuted to give a complete Latin square if and only if G is sequenceable.
Proof idea.Let (g 1 , . . ., g n ) and (h 1 , . . ., h n ) be arrangements of the elements of G and let the (i, j)-entry of a Cayley table of G be given by g i h j .Then it is a complete Latin square if and only if (g −1 1 , g −1 2 , . . ., g −1 n ) and (h 1 , h 2 , . . ., h n ) are both directed terraces for G.
Let Z n = {0, 1, . . ., n − 1} be the additively written cyclic group of order n.When n is even, (0, n − 1, 1, n − 2, 2, n − 3, . . ., n/2) is a directed terrace for Z n .The first use of a "zig-zag" construction of this type is Walecki's in 1892 [19]; see [1] for more of its history.The first use of it to control neighbor balance in Latin squares seems to be due to Williams in 1949 [28].
The systematic consideration of sequenceability for arbitrary groups was initiated by Gordon [11] where, as well as proving Theorem 1.1, it is shown that an abelian group is sequenceable if and only if it has exactly one involution.Hence if n is even there is a group-based complete Latin square of order n.The result also implies that for odd orders we must turn our attention to non-abelian groups.Several families of groups of odd order are known to be sequenceable, including: a group of order p m for each odd prime p and each m ≥ 3 [25]; many groups of order pq for distinct primes p and q [16,25]; and a group of each order 3m where m is powerful (i.e. for each prime p dividing m, p 2 also divides m) [21].
We construct sequencings for some semi-direct products Z q ⋉ A where A is an abelian group of odd order and q is an odd prime, including all possible such groups when A is cyclic.These constructions allow us to determine the full spectrum of orders at which a group-based complete Latin square exists: Theorem 1.2.There is a group-based complete Latin square of order n if and only if n = 1, n is even, or there exists a non-abelian group of order n.That is, if and only if n = 1, n is even, or n has either a prime divisor p with p 3 |n or a prime-power divisor p k such that p k ≡ 1 (mod q) for some prime divisor q of n.
This result also gives the spectrum for group-based row-complete Latin squares.However, whereas all known complete Latin squares are group-based, there are alternative methods known for constructing row-complete squares.Row-complete Latin squares are known to exist at orders 1 and 2 and at every composite order [13,28].They are known not to exist at order 3, 5 or 7.The question remains open at other odd primes.
On the question of which groups are sequenceable, the abelian case is settled as mentioned above, and the three non-abelian groups of orders 6 and 8 are not sequenceable.Keedwell's Conjecture is that all other non-abelian groups are sequenceable.In addition to those already mentioned, groups known to satisfy Keedwell's Conjecture include dihedral groups [15,18], soluble groups with a single involution [3], and groups of order at most 255 [22].See [20] for a survey of this and related problems.
In the next section we develop a framework for constructing sequencings of groups of the form G = Z q ⋉ A for prime q and odd-order abelian A. In Section 3 we show that the framework can be successfully completed for a variety of choices of A, whence Theorem 1.2.

The construction
Let A be an abelian group of order m with an automorphism α of prime order q.Let This is a group of order n = mq.Let λ be a primitive root of q such that λ/(λ − 1) is also a primitive root; Wang [25] shows that the existence of such a λ follows from results of [6].
This generalizes the structures of directed terraces in [21] and [25] (each of which grew out of that of [16]).
Observe that lists all of the elements Z q \ {0, 1}.We therefore require that h 11 − α(g t ) = 0 so that every element of the form (x, 0), for x ∈ Z q \ {0}, appears in the sequencing.We need that g 1 , g 2 , . . .g m includes every element of A exactly once and that each of the following sequences list all elements of A \ {0}: In order to meet these requirements, we introduce two auxilliary types of sequence.Let a = (a 1 , a 2 , . . ., a m−1 ) be an arrangement of the non-identity elements of Both of these objects are of interest in their own right.For example, the existence of either a rotational sequencing or a #-harmonious sequence for a group implies that that group has a complete mapping and hence its Cayley table has an othogonal mate.Rotational sequencings were introduced by Ringel [24] and studied extensively in [9].They have various different but equivalent formulations in the literature.#-harmonious sequences were introduced and studied in [5] and were studied further and named in [26].In each case, the existence question is completely settled in abelian groups (each of them may also be studied in non-abelian groups, which is not relevant here):

5, 9] An abelian group has a rotational sequencing if and only if it does not have exactly one involution. An abelian group has a #-harmonious sequence if and only if it is not Z 3 and does not have exactly one involution.
We shall see some aspects of the known construction methods for rotational sequencings and #-harmonious sequences in the next section.Here we see how to combine them to make the task of completing the template successfully more tractable: Theorem 2.2.Let A be an abelian group of odd order m with an automorphism α of odd prime order q and let λ be a primitive root of q such that λ/(λ − 1) is also a primitive root of q.Let a = (a 1 , a 2 , . . ., a m−1 ) be a directed rotational terrace and c = (c 1 , c 2 , . . ., c m−1 ) be a #-harmonious sequence for A.
Proof.First, we use a and c to assign values to the g i and h ij in the template.We shall see that the difference/sum properties they have, combined with the extra conditions, allow us to satisfy all of the constraints.
Let g 1 = α q−1 (c 1 ) and let g i = a i−1 + α q−1 (c 1 ) for i > 1.As a is a directed rotational terrace the sequence g 1 , g 2 , . . .g m includes every element of A once.
For odd i set h ij = c j ; for even i set h ij = −α λ−1 (c j ).Set t = 1.This gives as required.We now need to consider the sequences that are required to contain all of the non-zero elements of A. With the assignments of the g i , h ij and t, these become: The first two each contain the non-zero elements of A as c is a #-harmonious sequence.The third does because it comprises all of the rotational sequencing elements apart from a 1 − a m−1 and in its place we have That each of the fourth through to the penultimate sequences have the required elements follows from the properties of the automorphism α and that c 1 , c 2 , . . ., c m−1 are distinct and non-zero.
Finally, the last one is satisfied because we have all the sums of the #-harmonious sequence c, except c m−1 + c 1 , and in its place we have a 1 + α q−1 (c Theorem 2.2 is not the only way to successfully complete the template.For example, in [25] there is an alternative scheme for assigning the h ij elements when A is cyclic of prime order and in [21] a different way of assigning the g i elements is used when q = 3.These alternatives (and others) have potential for proving the sequenceability of more groups than we consider in the next section.

The directed terraces
The target for this section is the proof of Theorem 1.2.First we consider some structural properties of groups.The following is well-known; see, for example, [23].
where the p i are distinct odd primes.There is a nonabelian group of order n if and only if one of the following conditions applies: 1. a i ≥ 3 for some i, 2. n is cube-free and p i ≡ 1 (mod p j ) for some i, j,

n is cube-free and p 2
i ≡ 1 (mod p j ) for some i, j We are able to meet all of these orders using groups of the form Z q ⋉ A for prime q and abelian A. When A ∼ = Z m there is the necessary automorphism of order q when either q 2 |m or p|m for some prime p ≡ 1 (mod q).These groups cover the first two cases of Lemma 3.1.For the third case we use groups of the form A ∼ = Z 2 p × B where p 2 ≡ 1 (mod q) and p ∤ |B|.As it is little extra work, when 3 ∤ |B| we consider groups of the form A ∼ = Z k p × B for any k ≥ 2. We shall need an explicit construction for rotational sequencings for cyclic groups.Define a graceful permuation of length k to be an arrangement (g 1 , g 2 , . . ., g k ) of the integers {1, 2, . . ., k} such that the absolute differences h = (h 1 , h 2 , . . ., h k−1 ) given by h i = |g i+1 − g i | are distinct.This is equivalent to a graceful labeling of a path; graceful labelings of graphs are well-studied, see [10] for details.
Here is the connection between graceful permutations and rotational sequencings: is a directed rotational terrace for Z 2k+1 .
We also need the following fact: There is a graceful permutation (g 1 , g 2 , . . ., g k ) with g 1 = x for each 1 ≤ x ≤ k.
To extend rotational sequencings to non-cyclic groups we need a strengthening of the definition.Let a = (a 1 , a 2 , . . ., a m−1 ) be a directed R-terrace.If a i = a i−1 + a i+1 for some i then a is a directed R * -terrace and its associated rotational sequencing is an R * -sequencing.If i = 1 then both the directed R * -terrace and the R * -sequencing are standard.Any directed R * -terrace may be made standard by re-indexing.Theorem 3.4.[9] Suppose 3 ∤ 2k + 1 and A is an abelian group of odd order m.If A is R * -sequenceable then so is A × Z 2k+1 .Proof Construction.Let (a 1 , a 2 , . . ., a m−1 ) be a standard directed R * -terrace for A.
Exactly as in [9] we list the sequences of first and second coordinates of a standard directed R * -terrace for A × Z 2k+1 separately.
The second coordinates are given by m − 2 0s, followed by The requirement that m is odd in Theorem 3.4 is unnecessary, but we do not require the construction for the even case.We particularly need: Corollary 3.5.[9] Let A and B be abelian groups of odd order.Suppose that A has a standard directed R * -terrace (a 1 , . . ., a m−1 ) and 3 ∤ |B|.Then for any i with 1 ≤ i ≤ m−3, the group A × B has a standard directed R * -terrace.
Proof.We may write B as the direct product of cyclic groups of odd order.The result follows from repeated applications of the construction in the proof of Theorem 3.4.
Call the process of Theorem 3. Proof Construction.Let A be an abelian group of odd order other than Z 3 and write where B is either Z 2 3 or cyclic of order greater than 3.The construction is by induction.We in fact show that these groups are harmoniously matched, meaning that they have a harmonious sequence and a #-harmonious sequence that start with the same element as each other and end with the same element as each other.
For r = 4ℓ + We can now move to the main results.First, we consider the case when A is cyclic.
Theorem 3.7.Let q be an odd prime.Let A = Z m , where m is odd and either q 2 |m or p|m for some prime p ≡ 1 (mod q) and let α be an automorphism of Z m of order q.
Then G = Z q ⋉ α Z m is sequenceable.
Proof.We aim to satisfy the conditions of Theorem 2.2.The arithmetical conditions on m ensure that we are considering exactly those m for which there is a value r such that multiplication by r is an automorphism of order q of Z m .Let α be multiplication by r and let λ be a primitive root of q such that λ/(λ − 1) is also a primitive root.Let m = 2k + 1.The BGHJ #-harmonious sequence for Z m has 1 and −2 as adjacent elements.As gcd(k + 1, m) = 1, multiplication by r 1−λ (k + 1) is an automorphism of Z m .Apply this automorphism to the BGHJ #-harmonious sequence to get one with r 1−λ (k + 1) and −2r 1−λ (k + 1) adjacent.Index this #-harmonious sequence so that c 1 = −2r 1−λ (k + 1) and c m−1 = r 1−λ (k + 1).
Suppose that c 1 + r 1−λ (k + 1) − r q−1 c 1 = 0. Let g 1 be c 1 + r 1−λ (k + 1) − r q−1 c 1 or c 1 + r 1−λ (k + 1) − r q−1 c 1 − k, whichever, when considered as an integer, is in the range 1 ≤ g 1 ≤ k.Let g be a graceful permutation with first element g 1 (which exists by Lemma 3.3), and let a = (a 1 , a 2 , . . ., a m−1 ) be either the directed rotational terrace constructed from g via Lemma 3.2 or its reverse, so that , and the conditions of Theorem 2.2 are satisfied.
If c 1 +r 1−λ (k +1)−r q−1 c 1 = 0, then reversing the initial roles of 1 and −2 and running the same process gives alternative values for the variables such that c 1 + r 1−λ (k + 1) − r q−1 c 1 = 0 and the argument goes through as before.
Next we move to non-cyclic A. We shall need certain facts about the automorphism groups of abelian groups.A comprehensive description of their structure can be found in [14].
Given two elements g and h of an abelian group, say that they are independent if g ∩ h = {0}.Let (g 1 , h 1 ) and (g 2 , h 2 ) be pairs of independent elements in an abelian group A. If all four elements have the same prime order, then there is an automorphism of A that maps g 1 to g 2 and h 1 to h 2 .
We shall be considering groups of the form A = Z k p × B where p is prime, k ≥ 2 and p ∤ |B|.If p k ≡ 1 (mod q), for some prime q then A has an automorphism of order q with α ↾ Z k p also of order q.Further, we restrict our attention to α of this form such that α ↾ Z k p (which is a subgroup of GL(k, p)) is not diagonalisable, of which there is always at least one.
Suppose α and β are two automorphisms of A. If α and β are conjugate then Z q ⋉ α A ∼ = Z q ⋉ β A. We may therefore assume that α ↾ Z k p , which we think of as a matrix in GL(k, p) multiplying elements of A (considered as column vectors) from the left, is in rational canonical form.That is, it is a block-diagonal matrix where each block has 1s on the subdiagonal and 0s everywhere else except for the last column, see [7,Chapter 12].In fact, as α and β are conjugate if and only if α c and β c are conjugate for positive c, we shall usually assume that a particular power of α ↾ Z k p is in rational canonical form.The first non-cyclic case we consider is when 3 ∤ |A|: Theorem 3.8.Let p and q be odd primes with p = 3 and p k ≡ 1 (mod q).Let B be an abelian group of odd order with 3 ∤ |B|.Let α be an automorphism of Z k p × B of order q such that α ↾ Z k p is of order q and not diagonalisable.
Proof.The non-diagonalisable condition implies that k ≥ 2. As noted before the statement of the theorem, we may assume that some non-trivial power of α ↾ Z k p is in rational canonical form with the additional condition that the (1, 1)-entry is 0. Let λ be a primitive root of q such that λ/(λ − 1) is also a primitive root and assume that α λ−1 ↾ Z k p is in this form.
The group Z k p has a directed R * -terrace [9].Any arrangement of the elements of Z k p \ {0} unavoidably has many pairs of adjacent independent elements and hence any directed R * -terrace does too.Using this in the FGM construction gives a directed R * -terrace with a pair of independent elements of order p which, by re-indexing, we may set to be a 1 and a m−1 .
Lastly we cover the cases where 3 | |A| but 27 ∤ |A|.Theorem 3.9.Let p and q be odd primes with p = 3 and p 2 ≡ 1 (mod q).Let B be an abelian group of odd order with 3 ∤ |B|.If α is an automorphism of Z 2 p × Z 3 × B of order q such that α ↾ Z 2 p is of order q and not diagonalisable, then Proof.The structure of the proof is much the same as for Theorem 3.8 in that we are looking for a directed R-terrace (a 1 , . . ., a m−1 ) and a #-harmonious sequence (c 1 , . . ., c m−1 ) for Z 2 p ×Z 3 ×B (or Z 2 p ×Z 9 ×B) such that a 1 and a m−1 are a pair of independent elements of prime order p and c 1 + c m−1 − α q−1 (c 1 ) and c 1 + c m−1 − α q−1 (c 1 ) − α λ−1 (c m−1 ) are also a pair of independent elements of order p.
The argument for the existence of the latter of these is identical to that of Theorem 3.8.The difficulty arises in the former case as the FGM construction for R * -terraces does not directly apply.In order to use the FGM construction we need to move the Z 3 or Z 9 factor into the base case and find directed R * -terraces for Z 2 p × Z 3 and Z 2 p × Z 9 that have the independent pairs of adjacent elements we need.
First consider Z 2 p × Z 3 ≡ Z 3p × Z p .The directed R-terrace (a 1 , . . .a 3p−1 ) for Z 3p constructed from the Walecki Construction using Lemma 3.2 is in fact a directed R *terrace with a 2p the sum of its neighbors [9].It also has a 4 = 3(p − 1)/2 and a 5 = 3, which are elements of order p.Now, applying the construction of Theorem 3.4 we find a directed R * -terrace of Z 3p × Z p with (3(p − 1)/2, 1) and (3, −1) adjacent, which are independent elements of order p.From here we can re-index and follow the method of Theorem 3.8 to get the sequencing for G 1 .Now consider Z 2 p × Z 9 ≡ Z 9p × Z p .For this case we need part of the more complex constructions of [2].However, as the aspects of that construction that we require are clearly stated within the paper, we do not recapitulate the full construction.They use a device that they call "the gadget" [2, Definition 3.5] which when used on a directed R * -terrace of a group G and a group H that has orthomorphisms with an additional property, it produces a directed R * -terrace for G × H. Further, if a i = a i−1 + a i+1 gives the R * property in the directed R * -terrace of G then we have (a i , 0) = (a i−1 , 0) + (a i+1 , 0) doing the same for the resulting directed R * -terrace of G × H [2, Lemma 3.7].It is allowable to take G = Z p and H = Z 9 in this construction [2, Corollary 3.8], which gives a standard directed R * -terrace (a 1 , . . ., a 9p−1 ) for Z 9p with a 1 , a 2 and a 9p−1 all of order p.
We may now use the FGM Construction to give a directed R * -terrace for Z 9p × Z p .This gives us adjacent elements of the form (a 1 , 1) and (a 1 , −1), which are independent elements of order p. Re-index and follow the method of Theorem 3.8 to get a sequencing for G 2 .
Taken together with Lemma 3.1, Theorems 3.7, 3.8 and 3.9 prove Theorem 1.2.While they also make some progress towards Keedwell's Conjecture, a full proof does not appear to be on the horizon.Progress on the spectrum of not-necessarily-group-based complete Latin squares will require a totally different approach.
A and define b = (b 1 , b 2 , . . ., b m−1 ) by b i = a i+1 −a i , where the indices are calculated modulo m− 1 (so b m−1 = a 1 − a m−1 ).If b also contains all of the non-identity elements of A, then b is a rotational sequencing or R-sequencing of A and a is the associated directed rotational terrace or directed R-terrace.Similarly, let c = (c 1 , c 2 , . . ., c m−1 ) be an arrangement of the non-identity elements of A and define d = (d 1 , d 2 , . . ., d m−1 ) by d i = c i + c i+1 , where, again, the indices are calculated modulo m − 1 (so
4 and Corollary 3.5 the FGM Construction.To construct #-harmonious sequences we need the closely-related notion of a harmonious sequence.Let c = (c 1 , c 2 , . . ., c m ) be an arrangement of the elements of an abelian group A and define d = (d 1 , d 2 , . . ., d m ) by d i = c i + c i+1 where the indices are calculated modulo m (so d m = c m + c 1 ).If d is also an arrangement of the elements of A then c is a harmonious sequence and A is harmonious.Lemma 3.6.[5] Every odd-order abelian group except Z 3 is #-harmonious.