Inventiones mathematicae (2025) 240:779–867
https://doi.org/10.1007/s00222-025-01328-x




A random Hall-Paige conjecture

Alp Müyesser1 · Alexey Pokrovskiy2

Received: 14 March 2023 / Accepted: 20 February 2025 / Published online: 5 March 2025
© The Author(s) 2025


Abstract
A complete mapping of a group G is a bijection φ : G → G such that x → xφ(x) is
                       Paige conjectured in 1955 that a finite group G has a complete
also bijective. Hall and
mapping whenever x∈G x is the identity in the abelianization of G. This was con-
firmed in 2009 by Wilcox, Evans, and Bray with a proof using the classification of fi-
nite simple groups. In this paper, we give a combinatorial proof of a far-reaching gen-
eralisation of the Hall-Paige conjecture for large groups. We show that for random-
                                                              a bijection
like and equal-sized subsets A, B, C of a group G, there exists                  → B
                                                                               φ: A
such that x → xφ(x) is a bijection from A to C whenever a∈A a b∈B b = c∈C c
in the abelianization of G. We use this statement as a black-box to settle the fol-
lowing old problems in combinatorial group theory for large groups. (1) We char-
acterise sequenceable groups, that is, groups which admit a permutation π of their
elements such that the partial products π1 , π1 π2 , π1 π2 · · · πn are all distinct. This
resolves a problem of Gordon from 1961 and confirms conjectures made by several
authors, including Keedwell’s 1981 conjecture that all large non-abelian groups are
sequenceable. We also characterise the related R-sequenceable groups, addressing
a problem of Ringel from 1974. (2) We confirm in a strong form a conjecture of
Snevily from 1999 by characterising large subsquares of multiplication tables of fi-
nite groups that admit transversals. Previously, this characterisation was known only
for abelian groups of odd order (by a combination of papers by Alon and Dasgupta-
Károlyi-Serra-Szegedy and Arsovski). (3) We characterise the abelian groups that can
be partitioned into zero-sum sets of specific sizes, solving a problem of Tannenbaum
from 1981. This also confirms a recent conjecture of Cichacz. (4) We characterise
harmonious groups, that is, groups with an ordering in which the product of each
consecutive pair of elements is distinct, solving a problem of Evans from 2015.




 A. Pokrovskiy
    dralexeypokrovskiy@gmail.com
    A. Müyesser
    alp.muyesser@new.ox.ac.uk

1   New College, University of Oxford Oxford, UK
2   University College London, London, UK
780                                                                                A. Müyesser, A. Pokrovskiy

1 Introduction

This paper is about finding large-scale structures in finite groups using techniques
from probabilistic combinatorics. The prototypical example of a “large-scale struc-
ture” in a group is a complete mapping, or equivalently, a transversal in the Latin
square corresponding to the multiplication table of the group. We now define each of
these terms. A complete mapping of a group G is a bijection φ : G → G such that
the function x → xφ(x) is also a bijection. A Latin array is an n × n array filled in
with arbitrary symbols such that each symbol appears at most once in each row and
column. A Latin square is an n × n Latin array with exactly n symbols. A transver-
sal of a Latin array is a collection of n cells which do not share a row, a column,
or a symbol. Denote by M(G) the multiplication table of the group G whose rows
and columns are labelled by the elements of the group, and the entry in row gi and
column gj is the group element gi · gj . Observe that M(G) is a Latin square, and that
M(G) has a transversal if and only if G has a complete mapping.
   The study of transversals in Latin squares began more than two hundred years
ago, when Euler posed a problem equivalent to determining for which n there exists
a n × n Latin square whose entries can be partitioned into transversals. This moti-
vates the study of transversals in multiplication tables because if the multiplication
table of a group has a transversal, then it can be partitioned into transversals. To see
this, we can translate the columns of a transversal by a non-identity group element to
produce another transversal, entirely disjoint from the first. However, some multipli-
cation tables do not contain any transversals at all, let alone partitions into transver-
sals. Indeed, if we suppose that the multiplication table of a group has a transversal,
equivalently, we know that the group has a complete mapping φ. Denote by π the per-
mutation x → xφ(x), so we have that π(x) = xφ(x) for every x ∈ G. Multiplying
these equations1 together for each x ∈ G, we obtain the following.
                                             
                                     π(x) =      xφ(x)                                (1)
                                       x∈G             x∈G
                                                     
For abelian groups, (1) rearranges into x∈G x = e (where e is the identity ele-
ment of G), giving a necessary condition for having a complete mapping in abelian
groups. An immediate consequence is that even-order cyclic     groups do not ad-
mit complete mappings (for example in G = Z2n we have x∈G x = n = e). For
           groups, by taking the image of (1) in the abelianization of G, we ob-
non-abelian
tain
    that    x∈G x ∈ G , where G denotes the commutator subgroup of G. Thus
“ x∈G x ∈ G ” is a necessary condition for the existence of a complete mapping
in a general group. Letting Gab denote theabelianization of G, that is Gab = G/G ,
we see that this condition is equivalent to x∈G πab (x) being equal to the identity in
Gab (where πab : G → G is the
                          ab        quotient homomorphism). Since Gab is abelian, we
write this as “ x∈G x =          ab
                        0 in G ”.                                  
   The condition that x∈G x = 0 in Gab (or equivalently that x∈G x ∈ G ) is
known as the Hall-Paige condition [38]. We remark that the Hall-Paige condition

1 One can fix an arbitrary ordering of G for the product to be well-defined for non-abelian groups. All the
statements about products like this that we write in the introduction are independent of the ordering picked.
A random Hall-Paige conjecture                                                        781


                   as “all 2-Sylow subgroups of G are trivial or non-cyclic”. This
is sometimes written
is equivalent to x∈G x being trivial in Gab , as shown by Hall and Paige themselves
[38]. Perhaps astonishingly, the Hall-Paige condition is not only necessary, but also
sufficient for the existence of a complete mapping. This was first conjectured by Hall
and Paige [38]. The Hall-Paige Conjecture has a rich history, we refer the reader to
the book of Evans [26] (Chaps. 3-7) for a description of various approaches taken for
this problem. The conjecture was finally shown to be true in a combination of papers
by Wilcox [62], Evans [23], and Bray [14] in 2009. The original proof of Wilcox,
Evans, and Bray uses an inductive argument which relies on the classification of fi-
nite simple groups. However, recently, a completely different proof for large groups
was found by Eberhard, Manners, and Mrazović using tools from analytic number
theory [20].
    In this paper, with the goal of giving a unified approach to many related conjec-
tures in the area, we study complete mappings between subsets of groups. For exam-
ple, given equal sized subsets A, B, C of a group G, is there a bijection φ : A → B
such that the map ψ(a) := aφ(a) defines a bijection A → C? This corresponds to
starting with the multiplication table of a group, and then deleting the rows corre-
sponding to G \ A, columns corresponding to G \ B, and symbols corresponding to
G \ C, and then searching for a transversal in the resulting structure, which is simply
a Latin array with some missing entries. Generalising the Hall-Paige condition to this
set-up, we see that
                                                       
                                        A+         B=         C (in Gab )             (2)
                                                                       
is a necessary
              condition for the existence of such a map φ (we use       S to denote
   s∈S s,   S  is defined analogously). Of  course, we  cannot expect (2) to be a suf-
ficient condition for any triple of equal sized subsets.2 However, our main theorem
essentially states that for most subsets A, B, C ⊆ G, (2) is the only obstruction for
finding the desired map φ. Recall that a p-random subset X of a finite set G is a
subset sampled by including each element of G in X independently with probability
p, and  denotes symmetric difference. When we say that an event holds with high
probability, we mean that the probability of that event approaches 1 as n tends to
infinity. The letter n throughout the paper always denotes the order of the ambient
group G.

Theorem 1.1 (Main result) Let G be a group of order n. Let p ≥ n−1/10 . Let
                                                                                105


R 1 , R 2 , R 3 ⊆ G be p-random subsets, sampled independently. Then, with high prob-
ability, the following holds.
    Let X, Y, Z ⊆ G be equal sized subsets satisfying the following properties.
   •  |X  R 1 | + |Y                    1030         1030
                        R | + |Zab R | ≤ p n/ log(n)
                           2          3
                                                      −1
   •       X + Y = Z in G (or equivalently X Y ( Z) ∈ G )
Then, there exists a bijection φ : X → Y such that x → xφ(x) is a bijection from X
to Z.
2 For example, consider G = Z
                                 99 , A = {98, 1}, B = {98, 1}, C = {49, 50}.
782                                                                 A. Müyesser, A. Pokrovskiy

    We remark that setting p = 1 and X = Y = Z = G, we see that the Hall-Paige con-
jecture holds for sufficiently large groups. However, Theorem 1.1 extends far beyond
the setting of the Hall-Paige conjecture. Indeed, we can settle several longstanding
conjectures at the interface of group theory and combinatorics using the full strength
of Theorem 1.1. In the following section, we discuss several such problems. All of
these problems are similar in spirit to the Hall-Paige conjecture in the sense that
they concern finding large-scale structures in groups with certain desirable properties.
However, all of these problems lack the level of symmetry present in the Hall-Paige
problem. For example, some of these problems concern finding complete mappings in
subsets of groups with limited structure, or they concern finding complete mappings
permuting the group elements via a particular cycle type. Both of these constraints
seem difficult to reason about using only algebraic techniques.
    This perhaps explains why many of the commonly used tools, such as Alon’s com-
binatorial Nullstellensatz, were only able to go so far in addressing these questions.
On the other hand, one clearly needs use some of the group theoretic structure. In-
deed, the key obstruction for problems of this type ends up being some derivative of
the Hall-Paige condition, which is inherently group theoretic. As surveyed by Gow-
ers in [33], there are many problems in combinatorics which are difficult for a similar
reason. These are problems where “there is too much choice for constructions to be
easy to discover, and too little choice for simple probabilistic arguments to work”
[33]. Our proof, similar in spirit to Keevash’s celebrated construction of designs [41],
uses probabilistic tools but also exploits the algebraic structure of the problem. We
give a detailed overview of our strategy in Sect. 2.
    From now on, additive notation will always imply that the corresponding operation
is taking                         of the ambient group (e.g. when for A ⊆ G we
        place in the abelianization
write “ A = e” we mean that a∈A πab (a) = e where πab : G → Gab is the quotient
map to the abelianization of G). Otherwise, operations within non-abelian groups will
be denoted multiplicatively. The quantity n always denotes the size of the ambient
group. We use e to denote the identity element of a group, and we sometimes use 0
to denote e in the special case of abelian groups.

1.1 Applications

As we already noted, the first application of our main result, Theorem 1.1, is an
alternative proof that the Hall-Paige conjecture holds for all sufficiently large groups.
This uses only the p = 1 case of Theorem 1.1, where we set the subsets X, Y , Z to be
the entirety of the group G. We now mention another result we can recover easily, this
time setting X, Y , Z to be sets of size |G| − 1. Goddyn and Halasz recently proved
that multiplication tables contain near transversals, that is, a collection of n − 1 cells
which do not share a row, column, or a symbol [31]. Perhaps surprisingly, there does
not seem to be an easy way of deriving this from the Hall-Paige conjecture directly,
and the proof in [31] is somewhat involved. However, we can derive this result from
Theorem 1.1 as follows.

Proposition 1.2 Let M be the multiplication table of a sufficiently large finite group
G. Then, M contains a near transversal.
A random Hall-Paige conjecture                                                          783

Proof Applying Theorem 1.1 with p = 1, we derive that for |G| large enough,
R 1 = R 2 = R 3 satisfies the conclusion of Theorem 1.1 with positive probability,
                                                                                and
therefore, with probability exactly 1. Let z ∈ G be some element     equal
                                                                           to    in
                                                                                 G
Gab . Setting X = Y = G \ {e} and Z = G \ {z}, we have that         X+ Y = Z
in Gab . This implies that there is a bijection φ : X → Y such that x → xφ(x) is
injective. φ then corresponds to a near transversal in M, as desired.              □

   The p = 1 case of Theorem 1.1 when applied with other subsets X, Y , Z has novel
applications as well. We discuss such an application in the next section. The other
three applications we discuss use the full strength of Theorem 1.1. In fact, for these
applications, we rely on an appropriate generalisation of Theorem 1.1 with a more
complicated distribution on the sets R 1 , R 2 , R 3 . In Sect. 4, we state this generalised
version of Theorem 1.1.

1.1.1 Snevily’s conjecture

Deleting k rows and k columns of a multiplication table, we obtain a natural Latin
array which we call a subsquare of the multiplication table. In analogy with complete
mappings, it is natural to ask which subsquares contain transversals. One may suspect
that deleting rows and columns should only make it easier to find transversals, and
Snevily’s conjecture states that this indeed should be the case for abelian groups
of odd order [56]. However, for even order abelian groups G, one may delete rows
and columns so that the remaining Latin array is in fact the multiplication table of
an even order subgroup H ⊆ G (or a translate of such a multiplication table). Such
subsquares cannot contain transversals as multiplication tables of even order cyclic
groups do no admit transversals. In 1999, Snevily conjectured that this should be the
only subtlety for cyclic even order groups. Below, we formally state both cases of
Snevily’s conjecture. Note that A × B denotes the subsquare of a group G obtained
by keeping only the rows corresponding to A and columns corresponding to B in the
multiplication table of G.

Conjecture 1.3 (Snevily, [56]) Let S = A × B be a subsquare of the multiplication
table of an abelian group G defined by two n-element sets A, B ⊆ G.
  1. If |G| is odd, then S has a transversal.
  2. If G ∼
          = Z2k for some k ∈ N, then S has a transversal unless there exists g1 , g2 ∈
     G such that g1 + A = g2 + B = H for some even order cyclic subgroup H ⊆ G.

   The first case of the conjecture was verified by Alon in 2000 for prime order cyclic
groups [4]. In 2001, Dasgupta, Károlyi, Serra, and Szegedy generalised Alon’s result
to arbitrary odd order cyclic groups [19]. Both of these results use the celebrated
Combinatorial Nullstellensatz [3]. A decade later, Arsovski fully resolved the first
case of Snevily’s conjecture, using character theory [7]. On the other hand, as far as
the authors are aware, no partial progress has been reported on the second case of the
conjecture.
   As observed by Wanless [61], the second part of Snevily’s conjecture does not
generalise straightforwardly to all even abelian groups due to the following construc-
tion of Akbari and Alireza [2]. Let G = (Z2 )k for some k ≥ 1, and let a1 , a2 ∈ G be
784                                                                          A. Müyesser, A. Pokrovskiy

distinct and let b1 , b2 ∈ G be distinct such that a1 + a2 + b1 + b2 = 0. Then, setting
A = G \ {a1 , a2 }, B = G \ {b1 , b2 }, it is a simple exercise to check that the subsquare
A × B does not contain a transversal. We show, perhaps surprisingly, that this is the
only other barrier for an abelian subsquare to contain a transversal.

Theorem 1.4 There exists an n0 ∈ N such that the following holds for all n ≥ n0 . Let
G be an abelian group, and let A, B ⊆ G with |A| = |B| = n. Then, A × B has a
transversal, unless there exists some k ≥ 1, g1 , g2 ∈ G and a subgroup H ⊆ G such
that one of the following holds.
  1. H ∼= Z2k × Hodd for some odd-order group Hodd , and H = g1 A = g2 B, i.e. A
     and B are cosets of H .
  2. H ∼= (Z2 )k , g1 A = H \ {a1 , a2 }, g2 B = H \ {b1 , b2 } for some distinct a1 , a2 ∈ H
     and distinct b1 , b2 ∈ H such that a1 + a2 + b1 + b2 = 0.

   Note that this confirms both cases of Snevily’s conjecture for sufficiently large
subsquares. We discuss proving a stronger characterisation valid for all n in Sect. 7.
   We take Snevily’s conjecture further by proving a far more general theorem char-
acterising subsquares without transversals of all groups.

Theorem 1.5 There exists an n0 ∈ N such that the following holds for all n ≥ n0 . Let
G be a group, and let A, B ⊆ G with |A| = |B| = n. Then, A × B has a transversal,
unless there exists some k ≥ 1, g1 , g2 ∈ G and a subgroup H ⊆ G such that one of
the following holds.
  1. H is a group that does not satisfy the Hall-Paige condition, and A = g1 H and
     B = Hg2 .
  2. H ∼ = (Z2 )k , g1 A = H \ {a1 , a2 }, g2 B = H \ {b1 , b2 } for some distinct a1 , a2 ∈ H
     and distinct b1 , b2 ∈ H such that a1 + a2 + b1 + b2 = 0.

    Roughly speaking, Theorem 1.5 states that deleting rows and columns from a mul-
tiplication table only makes it easier to find transversals (supposing we do not end up
with a translate of a multiplication table of a subgroup), except for a very specific sce-
nario where we delete 2 rows and 2 columns summing to zero from the multiplication
table of an elementary abelian 2-group. Theorem 1.5 is proved in Sect. 6.1.

1.1.2 Sequenceable and R-sequenceable groups

Given a finite group G, a sequencing is an ordering of the elements of G as
b1 , b2 , . . . , bn where the partial products b1 , b1 b2 , . . . , b1 b2 · · · bn are all distinct.
Observe that in a sequencing, b1 = e. A group that admits a sequencing is called
sequenceable. A similar notion is that of an R-sequencing. An R-sequencing is an
ordering of the elements of G as b1 , b2 , . . . , bn where b1 = e, the partial products
b1 , b1 b2 , . . . , b1 b2 · · · bn−1 are all distinct and b1 b2 · · · bn = e. A group that admits an
R-sequencing is called R-sequenceable. We will briefly discuss the rich history of
the problems relating to these concepts, and we refer the reader to [50] and [26] for a
more comprehensive survey.
    Gordon introduced the problem of determining which groups are sequenceable in
1961 [32]. His motivation was to construct complete Latin squares, a concept which
A random Hall-Paige conjecture                                                          785

we now define. A Latin square is called row-complete if every pair of distinct sym-
bols appears exactly once in each order in adjacent horizontal cells. A Latin square
is called column-complete if it has the same property with respect to adjacent verti-
cal cells. A Latin square is complete if it is both row-complete and column-complete.
Complete Latin squares possess an additional layer of symmetry, making them useful
in various contexts. For example, complete Latin squares are useful in graph theory
to give decompositions of complete directed graphs into Hamilton paths (see [50] and
the references therein). Also, some applications to experimental design are given in
[9]. Gordon was motivated by the observation that given a sequenceable group G, we
can construct a complete Latin square by considering the multiplication table of the
group G.
    Ringel had a completely different motivation for studying R-sequenceable groups.
Such groups come up naturally in Ringel’s celebrated proof of the Heawood map
colouring conjecture [52]. Hence, Ringel asked for a classification of all such groups
[51].
    In Sect. 6.2, we solve both of these problems for large groups. This addresses prob-
lems reiterated by several authors [26, 50], and confirms a conjecture of Keedwell
[40] (see also Conjecture 7 in [31]). In particular, we show that any large group with
the Hall-Paige condition is R-sequenceable and we show that any large non-abelian
group is sequenceable which may be surprising in view of the fact that, for exam-
ple, the nonabelian groups of order 6 and 8 are not sequenceable [32]. Therefore, at
least for this problem, some mild assumption on the size of the group is necessary
for a clean characterisation. We also remark that several partial results towards this
characterisation were obtained by other researchers, see [50] for a survey.

1.1.3 Partitioning Abelian groups into zero-sum sets
                                                 
We call a subset      S of a group zero-sum if S = 0. Given a sequence a1 , a2 , . . . , ak
(ai ≥ 2) with ai = n − 1, where n = |G|, when can we partition the non-identity
elements of an abelian group into zero-sum sets of size a1 , a2 , . . . , ak ? A variant of
this natural problem seems to have been first considered in 1957 by Skolem [55],
and in 1960 by Hanani [39]. A complete solution for cyclic groups for sequences
a1 , a2 , . . . , ak with ai ≥ 3 was given by Friedlander, Gordon, and Tannenbaum in
1981 [28].                       
    Obviously, we need that G = 0. This already rules out even-order cyclic groups,
for example. There is another very natural necessary condition. Let  denote the num-
ber of ai such that ai = 2. We need that G should contain at least -many pairs
{x, −x} where x = −x (i.e. at least 2-elements of order greater than 2). It turns out
that for odd order abelian groups, these two conditions are known to be sufficient as
well as necessary [57, 63]. However, for even order abelian groups, Tannenbaum ob-
served that additional necessary conditions are required [58]. To see this, we invite the
reader to consider the case when G = Z4 × Z2 × Z2 , and the sequence a1 , a2 , . . . , ak
is (2, 2, 2, 3, 3, 3). See [58] for a solution to why G does not have the desired partition
in this case.
    Motivated by the previous example, Tannenbaum asked to find a set of neces-
sary and sufficient conditions guaranteeing a partition of an even order abelian group
786                                                                          A. Müyesser, A. Pokrovskiy

into zero-sum sets of prescribed sizes [58]. Despite the apparent lack of structure
in the problem as evidenced by a rich family of counterexamples, in Sect. 6.3, we
give a complete characterisation of the (large) abelian groups and integer sequences
for which the desired partition exists. Various special cases of this problem were in-
vestigated by several authors, for example see [17] and all the references therein. In
particular, our characterisation confirms the following conjecture of Cichacz [16].

Conjecture 1.6 (Cichacz, [16]) Let G be an abelian group with at least 3 involutions
and suppose we have numbers r1 , . . . , rt ≥ 3 with r1 + · · · + rt = |G| − 1. Then there
is a partition of G \ e = Z1 ∪ · · · ∪ Zt where each Zi is a zero-sum set of size ri .

1.1.4 Harmonious groups

Given a group G, not necessarily abelian, a harmonious ordering is an ordering of
the elements of G as a1 , a2 , . . . , an such that a1 a2 , a2 a3 , . . . , an−1 an , an a1 is also an
ordering of the elements of G (i.e. the latter sequence contains no repetitions). Groups
which have harmonious orderings are called harmonious. Harmonious groups were
first introduced in 1991 by Beals, Gallian, Headley, and Jungreis [10]. They gave a
characterisation of all abelian harmonious groups. Evans asked for a complete char-
acterisation.

Problem 1.7 (Evans, [25]) Which finite groups are harmonious?

    In Sect. 6.2, we give a characterisation of all sufficiently large harmonious groups.
It turns out that a (large) group is harmonious if and only if it satisfies the Hall-Paige
condition, and is not an elementary abelian 2-group.

1.2 Organisation of the paper

In Sect. 2, we give a extensive proof sketch. Section 3 collects some standard con-
centration/nibble type results, makes precise some key definitions and notation, and
records some group theoretic results we rely on. Section 3.6 in particular is quite cen-
tral, and is devoted to giving a sufficient set of conditions allowing us to find various
gadgets throughout the paper. In Sect. 4, we state a more general version of Theo-
rem 1.1, and we derive several variants including Theorem 1.1 itself. In Sect. 5 the
generalised version of the main theorem is proved. Section 6 is devoted to deriving
the applications we have listed in Sect. 1.1. In Sect. 7, we discuss further avenues of
research.


2 Proof strategy for the main result

In this section, we attempt to give an accessible outline of a special case of our main
result, concerning cyclic groups. We conclude in Sect. 2.1.4 by outlining some key
difficulties we omit in the simplified discussion.
   Firstly, instead of using the language of complete mappings, we will re-frame
Theorem 1.1 as a hypergraph matching problem. Given a group G, we define the
A random Hall-Paige conjecture                                                     787

3-uniform 3-partite multiplication hypergraph HG as follows. Set V (HG ) := GA
GB GC where G∗ is a copy of G and indicates a disjoint union. Set E(G) :=
{(gA , hB , kC ) ∈ GA × GB × GC : gA hB kC = e}. Given X, Y, Z ⊆ G, we denote by
HG [X, Y, Z] the induced subgraph of HG given by the vertex subset (GA ∩ X)
(GB ∩ Y ) (GC ∩ Z). Given equal sized subsets X, Y , Z, observe that finding a
bijection φ : X → Y such that x → xφ(x) is a bijection from X to Z is equivalent
to finding a perfect matching in HG [X, Y, Z −1 ] where Z −1 = {z−1 : z ∈ Z}. We will
outline a proof for the following result. For the rest of the outline, fix ε = 1/100.

Proposition
           Let X, Y, Z ⊆ Zn such that |X| = |Y | = |Z| = n − O(n1−ε ), and
        2.1
   X + Y + Z = 0. Then, HZn [X, Y, Z] has a perfect matching.

   Proposition 2.1 is already novel, and would be sufficient, for example, to deduce
Snevily’s conjecture for large subsquares. We remark that Proposition 2.1 is a simple
corollary of Theorem 1.1 which can be obtained by setting p = 1. We remark that
throughout the rest of the paper, when we say that a subset S ⊆ G is zero-sum, we
mean that the product of all elements of S (in any                 
                                                 order) is in G , the commutator
subgroup. For abelian groups, this corresponds to S = 0.

2.1 Absorption

Our main tool is the absorption method, a technique codified by Rödl, Ruciński, Sze-
merédi [53] (see also the earlier work of Erdős, Gyárfás, and Pyber [22]), adapted
to the setting of hypergraphs defined by groups. Absorption is a general method that
reduces the task of finding spanning structures to finding almost spanning structures.
In most cases, the latter task is considerably simpler, as evidenced by the celebrated
nibble method which roughly states that pseudorandom hypergraphs contain large
matchings [5]. The main technical innovation in our paper is developing an absorp-
tion strategy for multiplication hypergraphs, which in the setting of Proposition 2.1,
culminates in the following lemma.

Lemma 2.2 (Simpler version of Lemma 5.32) HZn [X, Y, Z] contains a vertex subset
A of size o(n) such that for any S ⊆ V (HZn [X, Y, Z]) \ A of size   1−ε
                                                                 O(n ) intersect-
ing X, Y and Z in the same number of vertices, and satisfying S = 0, A ∪ S has a
perfect matching.

   In Lemma 2.2, A functions as our absorber, in the sense that it can absorb small
enough subsets by forming perfect matchings when combined with them. The key
premise of the absorption method is that once a suitable absorber is found and set
aside, the only remaining task is to find an almost perfect matching in the leftover
set. Indeed, A can absorb whatever small subset S we fail to cover with the almost
perfect matching.
   We now explain in a bit more detail how Lemma 2.2 reduces the task of proving
Proposition 2.1 to finding a matching of size n − O(n1−ε ) in V (HZn [X, Y, Z]) \ A.
First,note that setting S = ∅ in Lemma 2.2 implies that A has a perfect matching, and
thus     A = 0 (if a subset contains a perfect matching, by definition the subset can
788                                                                 A. Müyesser, A. Pokrovskiy

be partitioned into zero-sum sets, and hence is zero-sum itself). Now, suppose that
having fixed the set A, we were able to find a matching M1 in V (HZn [X, Y, Z]) \ A
covering all but O(n1−ε ) vertices. Let S denote the set of these leftover vertices.
                                                                                  As
A
  and V (M 1 ) are disjoint zero-sum sets contained
                                                     in V (HZn [X, Y, Z]), and     X+
   Y + Z = 0 by assumption, we have that S = 0 as well. So by the property
in Lemma 2.2, A ∪ S spans another perfect matching, M2 say. Then, M1 ∪ M2 is the
desired perfect matching of HZn [X, Y, Z].
   We remark that, in reality, deleting A from HZn [X, Y, Z] would damage the pseu-
dorandomness properties of the hypergraph too greatly to be able to find the desired
M1 using the Rödl nibble [5]. Therefore, here we actually need a slightly stronger
version of Lemma 2.2 which can find A inside small random sets. This way, deleting
A only spoils the pseudorandomness of a set R much smaller than the multiplication
hypergraph itself. R \ A can then be dealt with using standard pseudorandomness
arguments, see for example Lemma 3.8.                                            
   For Lemma 2.2 to hold, we remark that some condition on the value of             S is
necessary. Indeed, recall that if a subset admits a perfect matching, it has to be zero-
sum. So, if S1 and S2 are two sets disjoint with A such that A ∪ S1 and A ∪ S2 both
admit perfect matchings, it follows that
                                               
                               0=     A ∪ S1 =      A ∪ S2
               
hence S1 = S2 . Therefore, the set A can have the flexibility of combining   with
any member of a large family of sets F to produce perfect matchings only if S is
fixed for all S ∈ F . For convenience, we fix this sum to be 0, but Lemma 2.2 would
remain true if we replaced 0 with any other fixed element.

2.1.1 Building the absorber from small subgraphs

Our starting point for building the absorber set A, similar in spirit to most applications
of the absorption method, is the existence of small subgraphs (gadgets) which give
local variability. More precisely, we will rely on the existence of O(1)-sized gadgets,
Q say, that can combine with 2 distinct sets, F1 and F2 say, each of size O(1), such
that Q ∪ F1 and Q ∪ F2 both induce perfect matchings in HZn [X, Y, Z]. We say that
Q can switch between F1 and F2 .
   The power of the absorption method rests in the fact that small gadgets such as Q
displaying rather limited variability can be combined in a way to build an absorber
displaying global variability. By global variability, we mean the type of property
that A has in the statement of Lemma 2.2. In particular, we are referring to how A
can combine with essentially any subset of size O(n1−ε ), as opposed to just a few
of size O(1). To achieve this in our case, we will use a variant of the absorption
technique called distributive absorption, initially developed by Montgomery [46].
The method has since been applied in numerous settings, notably in the proof of
Ringel’s conjecture by Montgomery, Pokrovskiy, and Sudakov [48]. For a detailed
discussion of how gadgets such as Q can be combined to build an absorber, we refer
the reader to the discussion in [48].
   For readers who are familiar with the absorption method, we add a quick remark
that commonplace methods of building absorbers, such as those used in [53], do
A random Hall-Paige conjecture                                                       789

Fig. 1 The gadget Qx .
Matchings M1 and M2 depicted
in solid and dashed lines,
respectively




not work in our context for the following simple reason. Say we have a subset S
and we are interested in subsets A of size k such that both A and A ∪ S span a
perfect matching. In the usual absorption strategy, we would require that the number
of subsets                               k
      A with this property is Ω(n ). However, if A spans a perfect         matching,
then A = 0. The number of zero-sum subsets A of order k is O(nk−1 ) – too little
to appear in abundance when a positive fraction of k-subsets are randomly sampled.
On the other hand, with the distributive absorption strategy, one may build absorbers
with fewer gadgets, provided that one can show that the gadgets are well-distributed
within the host structure.

2.1.2 Absorption for pairs

Typically, in applications of the distributive absorption method, one works with gad-
gets Q switching between F1 and F2 where F1 and F2 are both singletons. This
would be impossible to implement in    our context as if Q ∪ F1 and Q ∪ F2 both con-
tain perfect matchings, then F1 = F2 . Thus, if F1 and F2 were singletons, F1
and F2 would consist of the exact same vertex. Hence, if we want Q to be a gadget
that actually gives us some flexibility, we can only hope to switch between sets of size
at least 2. This motivates us to search for disjoint sets Q, F1 and F        Q ∪ F1
                                                                     2 such that
and Q ∪ F2 both span perfect matchings, |F1 | = |F2 | = 2, and         F1 = F2 = 0,
where the final equality is chosen for convenience as in the statement of Lemma 2.2.
    Finding Q with this property turns out to be rather easy. For example, fix dis-
joint sets F1 := {a, −a} and F2 := {b, −b} where neither a nor b is equal to its
own inverse. Let us view F1 and F2 as subsets of GC . Consider some x ∈ GA .
Set y := −x − a ∈ GB , set z = x + a − b ∈ GA and w = −x + b ∈ GB . Suppose
that x = z and y = w. Observe that M1 = {(x, y, a), (z, t, −a)} is a matching of
{x, y, z, w} ∪ F1 and M2 = {(x, w, −b), (z, y, b)} is a matching of {x, y, z, w} ∪ F2 .
Hence, Qx := {x, y, z, w} is a gadget with the desirable property of switching be-
tween F1 and F2 . See Fig. 1 for an illustration. Moreover, it is not hard to see that
there are many choices of x for which the corresponding sets Qx are all disjoint,
which is critical for the distributive absorption strategy.
    Building on the idea detailed in the previous paragraph, we can show that there
exists gadgets like Qx which can combine with any one of 100 (as opposed to just
2) pairs of inverses to produce a matching. This, combined with the usual distribu-
tive absorption strategy, is already sufficient to prove a version of Lemma 2.2 with
additional hypotheses on the set S. Namely, one can show the following.
790                                                             A. Müyesser, A. Pokrovskiy

Lemma 2.3 (Simpler version of Lemma 5.29) Let S1 be a o(n)-sized vertex subset
of HZn [X, Y, Z]. Then, HZn [X, Y, Z] contains a vertex subset A of size o(n) such
that for any S2 ⊆ S1 of size O(n1−ε ) intersecting X, Y and Z in the same number
of vertices, closed under the function x → −x, and containing no elements of order
≤ 2, we have that A ∪ (S1 \ S2 ) has a perfect matching.

   In the above lemma, it would arguably be more natural to insist that A ∪ S2 has a
perfect matching, as opposed to A ∪ (S1 \ S2 ). Such a version of the lemma would
also be correct, and be even easier to prove. We formulate the lemma in the form
above for a reason that will become clear shortly.

2.1.3 From absorption for pairs to absorption for arbitrary zero-sum sets

Now, we discuss how we can derive Lemma 2.2 from Lemma 2.3. The key idea is
encapsulated in the following lemma.

Lemma 2.4 (Simpler version of Lemma 5.31) HZn [X, Y, Z] contains a vertex subset
T of size o(n) such that for any S ⊆ V (HZn [X, Y, Z]) \ T of size 
                                                                   O(n1−ε ) inter-
secting X, Y and Z in the same number of vertices, and satisfying    S = 0, there
exists a matching M of order O(n1−ε ) with T ∪ S ⊇ V (M) ⊇ S satisfying also that
V (M) \ S is closed under x → −x.

    Deriving Lemma 2.2 from Lemma 2.3 and Lemma 2.4 is a simple exercise. Indeed,
let T be a vertex subset of HZn [X, Y, Z]) with the property in Lemma 2.4. Apply
Lemma 2.3 with S1 = T to obtain a vertex subset A . Set A := A ∪ T . We invite the
reader to check that A then satisfies the property that Lemma 2.2 requires.
    To see how we prove a version of Lemma 2.4, we invite the reader to see
Sect. 5.3.1. Similar in spirit to the proof of Lemma 2.3, our main trick here is to
reduce (a version of) Lemma 2.4 to the existence of many small matchings with cer-
tain desirable properties (see Lemma 5.30).

2.1.4 Additional diﬃculties

We now point out several complications we omitted in the previous discussion, along
with some technicalities that arise in the level of generality of our main theorem.

Ensuring distinctness A fair portion of our arguments rely on the existence of con-
stant sized matchings with specific properties, such as being closed under the map
x → −x. Often, the properties we require can be written as solutions to a particu-
lar system of linear equations. For example, consider Qx defined in Sect. 2.1.2. The
requirements from {x, y, z, w} could be written as:

      x +y +a =0        z+w−a =0              x +w+b=0              z+y −b=0

This is a system of equations with 4 variables and 4 constraints; however, any 3 of
these equations imply the fourth, allowing us to easily deduce that there are many x,
y, z, w with the desired properties. However, a solution to the system of equations
A random Hall-Paige conjecture                                                           791

is useful to us only when x = z and y = w, as otherwise {(x, −x + b, −b), (x + a −
b, −x − a, b)} would not be a matching in HZn .
    In the specific scenario outlined above, getting the relevant coordinates to be dis-
tinct is not particularly challenging. However, throughout the paper, we will require
gadgets with properties significantly more complicated than those of Qx . Further-
more, our main theorem works with subsets X, Y, Z ⊆ G which are disjoint. Thus,
we would have no chance of locating Qx within HG [X, Y, Z] unless all coordinates
x, y, z, w are distinct. Due to these technicalities, finding gadgets with the desired
properties can become quite delicate.
    Section 3.6 is entirely devoted to obtaining a sufficient set of conditions for a
system of relations to yield solutions where each coordinate is distinct. The key result
of that section, Lemma 3.32, is used in abundance throughout the paper.


The elementary Abelian 2-group The strategy of working with pairs of inverses
{x, −x} with x = −x fails for obvious reasons in the elementary abelian 2-group.
This turns out to be not a serious complication, as for general groups G, we will
work with pairs {x, qφ x −1 } for a carefully chosen qφ so that x → qφ x −1 does not
create too many fixed points.


Nonabelian groups Although it turns out that the case of general abelian groups is
not significantly more complicated than cyclic groups, there are serious issues to
overcome with nonabelian groups. As just one example, suppose that we wish to
find a gadget similar to Qx from Sect. 2.1.2 in HG , where G is a non-abelian group.
Suppose that F1 = {a, qφ a −1 }, F2 = {b, qφ b−1 }. Our goal is then to find (many) Q
such that Q ∪ F1 and Q ∪ F2 both can be perfectly matched. It is quite instructive to
try to construct such Q, and we invite the reader to try to do so.
   Some reflection shows that while it is difficult to construct Q switching between
{a, qφ a −1 } and {b, qφ b−1 }, it is considerably simpler to find some b such that b is in
the same G -coset as qφ b−1 such that we can find a Q switching between {a, qφ a −1 }
and {b, b }. This motivates us to search for gadgets not only switching between pairs,
but also switching between elements of the same G -coset. Achieving this latter task
is considerably more technical. We accomplish this by first devising a strategy for
switching between commutator elements (as opposed to arbitrary elements in the
commutator subgroup). To switch between arbitrary elements of G , we have to rely
on a non-trivial fact from representation theory (see Theorem 5.11). The statement
we require is that arbitrary elements in the commutator subgroup can be written as
products of just O(log n) commutators. Arguably, this is the only point in the proof
of the main theorem where we use a group theoretic result beyond the undergraduate
level. Due to bounds coming from Theorem 5.11 (which are tight), we are obliged
to use gadgets of logarithmic size to switch between elements of the same G -coset.
This inflates the error rate in our main theorem by a polylogarithmic factor. We refer
the reader to Sect. 5.1 for more details.
792                                                                A. Müyesser, A. Pokrovskiy

3 Preliminaries

3.1 Probabilistic tools

3.1.1 Concentration inequalities

The below is a standard bound that can be found in many probability textbooks, for
example see [5]. We will refer to it as Chernoff’s bound.
                                       
Lemma 3.1 (Chernoff bound) Let X := m     i=1 Xi where (Xi )i∈[m] is a sequence of
independent indicator random variables with P(Xi = 1) = pi . Let E[X] = μ. Then,
for any 0 < γ < 1, we have that P(|X − μ| ≥ γ μ) ≤ 2e−μγ /3 .
                                                        2




   We use the following corollary of Chernoff’s bound often: that if R is a p-random
     √ of an n-element set, then with high probability we have that |pn − |R|| ≤
subset
log n n.
   In almost all instances, the Chernoff bound will be all we need. Otherwise, we will
make use ofAzuma’s inequality, which we now state. Given a product probability
space Ω = i∈[n] Ωi , a random variable X : Ω → R is called C-Lipschitz if |X(ω) −
X(ω )| ≤ C whenever ω and ω differ in at most 1-coordinate. We will refer to the
following standard bound as Azuma’s inequality.

Lemma 3.2 (Azuma’s inequality) Let X be C-Lipschitz random variable on a product
probability space with n coordinates. Then, for any t > 0,
                                                      −t 2
                             P(|X − E(X)| > t) ≤ 2e nC 2 .

3.1.2 Pseudorandom graphs and the Rödl nibble

Here, we give some tools to find matchings in pseudorandom hypergraphs covering
all but a few vertices. Our approach here is complicated by the fact that we need
to find large matchings in subsets of hypergraphs, and some subsets could be arbi-
trary and we may as well suppose they were chosen adversarially. This comes from
the first step of the proof where we set aside an absorber, whose complement could
potentially have poor pseudorandomness properties. The most important result from
this section is Lemma 3.8, which tells us that subsets of multiplication tables contain
large matchings whenever the subset is obtained by taking unions of two random sets,
and one (potentially adversarially chosen) deterministic set. We now give the details.
    For a 3-uniform, 3-partite hypergraph H , vertices u, v and a subset U ⊆ V (H ),
we define the pair degree of (u, v) into U as the number of vertices in U which are
in the neighbourhood of both u and v, i.e. the number of vertices z in U such that
there exists v, w ∈ V (H ) such that {u, z, v} and {v, z, w} are both edges of H . For a
2-uniform, bipartite graph H , vertices u, v, and a subset U ⊆ V (H ), we define the
pair degree of (u, v) into U as the number of mutual neighbours of u and v in U .
    We say that a r-partite r-uniform hypergraph H (where r will be either 2 or 3)
is (γ , p, n)-regular if every part has (1 ± γ )n vertices and every vertex has degree
A random Hall-Paige conjecture                                                        793

(1 ± γ )pn. We say that H is (γ , p, n)-typical if, additionally, every pair of vertices
x, y in the same part of H have pair degree (1 ± γ )p 2 n into every other part of H .
We say that a hypergraph is linear if through every pair of vertices, there is at most
one edge. Multiplication hypergraphs have all these properties.

Observation 3.3 For a group G of order n, the multiplication hypergraph HG is
(0, 1, n)-typical and linear.

Proof It is immediate that all parts have size n. For any two vertices u, v in different
parts, there is a unique edge through u and v. If u ∈ A, v ∈ B, then this edge is
(u, v, v −1 u−1 ). If u ∈ B, v ∈ C, then this edge is (v −1 u−1 , u, v). If u ∈ A, v ∈ C,
then this edge is (u, u−1 v −1 , v), hence HG is linear. This shows that all vertices have
degree exactly n and pair degree exactly n to each part i.e. that the hypergraph is
(0, 1, n)-typical.                                                                      □

   Frankl and Rödl [27] (also Pippenger, unpublished) showed that for all ε, p 
γ  n−1 every (γ , p, n)-regular hypergraph has a matching of size (1 − )n. We
need a well known variant of this where ε, p, γ have polynomial dependencies on n.

Lemma 3.4 Let n be sufficiently large. Every (γ , δ, n)-regular linear tripartite hyper-
graph has a matching covering all but at most n1−1/500 + 3γ n vertices.

Proof There are various ways of proving this. We will deduce it from a result
of Molloy-Reed — Theorem 1 from [45]. Applying that theorem with k = 3,
Δ = (1 + γ )δn gives us a decomposition of our (γ , δ, n)-regular hypergraph into
           1
Δ + ck Δ1− k log4 Δ ≤ δn + γ δn + n6/7 matchings (for some constant ck ). By the
                                                               (1−γ )2 δn2 /3
pigeonhole principle one of these has at least δn+γe(H )
                                                    δn+n6/7
                                                            ≥ δn+γ  δn+n6/7
                                                                              ≥n−
(n1−1/500 + 3γ n) edges as required.                                                   □

   Typical graphs have the following well-known pseudorandomness condition,
which dates back to work of Thomason [59]. Note that for the rest of the section,
we assume that bipartite graphs come with a partition of their vertex set as (A, B)
and similarly tripartite hypergraphs come with a partition (A, B, C).

                                                                              
                                      bipartite graph. Then for every A ⊆ A, B ⊆
Lemma 3.5 Let G be a (γ , δ, n)-typical
                            
B, we have e(A , B ) = δ|A ||B | ± 5 (δ + γ )n3 + γ n .2


Proof This will be a consequence of Theorem 2 of [59]. First, delete at most γ n
vertices from one side of the graph to obtain a balanced bipartite graph. Now with
parameters p := δ − γ and μ := 5γ n it is easy to see that the hypothesis of Theorem
2 are satisfied. From the conclusion    of Theorem 2, for every A ⊆ A, B  ⊆ B, we
have e(A , B  ) = p|A ||B  | ± 5 (δ + γ )n3 . With another γ n2 term, we can account
for the deleted vertices in the beginning, implying the desired bound.                □

   Typicality is preserved by taking random subsets, in the following sense.
794                                                                       A. Müyesser, A. Pokrovskiy

Lemma 3.6 Let H = (A, B, C) be a tripartite linear hypergraph that is (0, 1, n)-
typical. Let p ≥ n−1/600 and let A ⊆ A be p-random. Then, with probability at least
1 − 1/n3 , the bipartite graph between B and C consisting of edges passing through
A is (n−1/5 , p, n)-typical.

Proof For some c, c ∈ C, let dA (c) = e(A , B, c) be the degree of c into A and let
dA (c, c ) denote the pair degree of (c, c ) into A . We have dA (c) = dA (c, c ) = n (by
(0, 1, n)-typicality of H ).
    Note that E(dA (c)) = pdA (c) = pn and E(dA (c, c )) = p 2 dA (c, c ) = p 2 n (using
linearity of H ) for all c, c . Set γ := n−1/5 . By Chernoff’s bound and a union bound,
with probability at least 1 − 1/n4 , for all c we have dA (c) = E(dA (c)) ± γ n =
pn ± γ n. Note that dA (c, c ) is 2-Lipschitz. This is because for each a, there is
exactly one b with abc an edge, and one b with abc an edge (using linearity of
H ). Hence by Azuma’s inequality and a union bound, we have that with probability
at least 1 − 1/n4 , for each pair c, c ∈ C, dA (c, c ) = E(dA (c, c )) ± γ n = p 2 n ±
γ n. Corresponding bounds hold for b, b ∈ B. With probability at least 1 − 3/n4 all
these properties hold simultaneously. Whenever these properties all hold, we have
that the bipartite graph (B, C) consisting of edges through A is (γ , p, n)-typical as
desired.                                                                                    □

   Using the previous pseudorandomness property, we can derive the following
lemma which states most vertices send approximately the expected number of edges
through a random set and a deterministic set.

Lemma 3.7 Let H = (A, B, C) be a tripartite linear hypergraph that is (0, 1, n)-
typical. Let p ≥ n−1/600 and let A ⊆ A be p-random. Then, with probability at least
1 − 1/n3 , the following holds. For any B  ⊆ B, there are at most n9/10 vertices c ∈ C
with eH (A , B  , c) = p|B  | ± n9/10 .

Proof Set γ = n−1/5 . By Lemma 3.6, with probability at least 1 − 1/n3 , we have
that the bipartite graph between B and C consisting of edges passing through A is
(n−1/5 , p, n)-typical. Supposing this property holds, by Lemma 3.5, for any B  ⊆ B,
C  ⊆ C, we have eH (A , B  , C  ) = p|B  ||C  | ± 5γ 1/2 n2 . Let C − be the set of vertices
with eH (A , B  , c) < p|B  | − γ 1/4 n. We have that eH (A , B  , C − ) < p  |B  ||C − | −
γ 1/4 n|C − | and eH (A , B  , C − ) = p  |B  ||C − | ± 5γ 1/2 n2 implying |C − | ≤ 10γ 1/4 n.
Similarly letting C + be the set of vertices with eH (A , B  , c) > p|B  | + γ 1/2 n, we
get |C + | ≤ 10γ 1/4 n. Plugging in the value of γ , this implies the lemma.                     □

  The following lemma will allow us to find a large matching whenever we are given
two random subsets and a deterministic subset.

Lemma 3.8 Let H = (A, B, C) be a tripartite linear hypergraph that is (0, 1, n)-
typical. Let p ≥ n−1/600 and let A ⊆ A be p-random, and let B  a p-random subset
of B, where A and B  are not necessarily independent. Then, with probability at
least 1 − 10n−3 , the following holds.
   For any C  ⊆ C of size (1 ± n−0.2 )pn, there is a matching covering all but
2n 1−1/500 vertices in A ∪ B  ∪ C  .
A random Hall-Paige conjecture                                                         795

Proof With probability at least 1 − 10n−3 , A and B  satisfy the conclusion of
Lemma 3.7 and have size (1 ± n−0.2 )pn (by Chernoff’s bound). This means that
A ∪ B  ∪ C  has ≤ n9/10 vertices with degree = p 2 n ± n19/20 in H [A , B  , C  ].
   Deleting all such vertices gives a hypergraph satisfying the hypothesis of
Lemma 3.4 with γ := n−0.01 , hence the desired matching exists.                           □

    In some applications the following formulation which allows for three determinis-
tic subsets as opposed to just one will be more convenient. The result follows simply
by applying the previous result four times.

Lemma 3.9 Let H = HG be a multiplication hypergraph. Let p ≥ n−1/650 . Let A ,
B  , C  be p-random subsets of A, B, C respectively, not necessarily independent. Set
R := A ∪ B  ∪ C  . With high probability the following holds. Let q ≤ 5p. For any
X ⊆ V (H ) \ R with |X ∩ A|, |X ∩ B|, |X ∩ C| = (1 ± n−0.25 )qn, there is a matching
                                         −4
in R ∪ X covering all but at most n1−10 vertices of R ∪ X.

Proof Let q be a fixed rational number between 0 and 1 and denominator at most n.
Suppose first that q ≤ n−1/600 . We have that Lemma 3.8 holds for A and B  with
probability ≥ 1 − n1.5 and by Chernoff’s bound C  = (1 ± n−0.2 )pn, with probability
≥ 1 − n−2 . Both properties hold simultaneously with probability ≥ 1 − n−1.49 . Then,
                                                                            −3
using Lemma 3.8, A ∪ B  ∪ C  has a matching covering all but n1−10 vertices.
                                     −3                     −4
Together with X, this gives n1−10 + 2n599/600 ≤ n1−10 vertices.
   Suppose now that q ≥ n−1/600 . For each  ∈ {A, B, C}, partition  into a
q-random set 1 , and a q-random set 2 , and a (p − 2q)-random set 3 . As
q, p − 2q ≥ n−1/600 by assumption, with probability ≥ 1 − n−1.49 the pairs (A1 , B1 ),
(A2 , C1 ), (B2 , C2 ) and (A3 , B3 ) satisfy the property of Lemma 3.8, and | i | =
(1 + n−0.22 )E[| i |] for each i .
   Let XA = X ∩ A, XB = X ∩ B, XC = X ∩ C to get sets of size (1 ± n−0.2 )qn.
Using Lemma 3.8, we have matchings M1 , M2 , M3 , M4 covering all, but at most
      −3
n1−10 vertices of A1 ∪ B1 ∪ XC , A2 ∪ XB ∪ C1 , XA ∪ B2 ∪ C2 , and A3 ∪ B3 ∪ C3
                                                                                   −3
respectively. In total, the number of uncovered vertices does not exceed 4n1−10 ≤
      −4
n1−10 /10.
   Taking a union bound over all rational q with denominator at most n, we have
                                                                                  −4
shown that with high probability, there exists a matching covering all but n1−10 /10
vertices. The statement for real values of q follows simply by using the property for
the closest rational value q  to q with denominator at most n. Indeed, leaving out
or deleting few elements, we can ensure that the set X has |X ∩ A|, |X ∩ B|, |X ∩
                                                                               −4
C| = (1 ± n−0.25 )q  n, thereby obtaining a matching that covers all but n1−10 /10 +
      −4               −4
n1−10 /10 ≤ n1−10 elements of the original sets X ∪ R.                                □

3.2 The multiplication hypergraph

We make some clarifications regarding our notation with the multiplication hyper-
graph HG of a group (recall that this was defined in Sect. 2). While referring to the
parts of the multiplication hypergraph, we often omit the A/B/C subscripts and think
796                                                                                 A. Müyesser, A. Pokrovskiy

of AG , BG , CG simply as copies of G. For example, whenever we have some vertices
v1 , v2 , . . . , vk ∈ V (HG ), we write v1 v2 . . . vk to mean the product of the correspond-
ing group elements in G (as opposed to in any of the copies AG , BG , CG ). Similarly,
if v ∈ V (HG ) and U is a subset of G, then we use v ∈ U to mean that v is an element
of G after dropping the A/B/C subscript. For any subset S ⊆ G, we use SA /SB /SC
to denote the corresponding subsets of GA /GB /GC respectively.
    A subset S of V (HG ) is called balanced, if |S ∩ G | does not depend on the value
of  ∈ {A, B, C}.

3.3 Basic group theory deﬁnitions and results

Throughout the paper we use e to denote the identity element of a group G. An
involution is an element of order exactly 2. Recall that we use G to denote the com-
mutator subgroup of a group G. That is, G is the subgroup generated by elements
of the form [g, h] := ghg −1 h−1 where g, h ∈ G. We denote the abelianization of G
(quotient of G by G ) as Gab . We sometimes call the elements of Gab G -cosets.
For g ∈ G, we use [g] to denote the unique G -coset that g is a member of. When
g ∈ V (HG ), we think of [g] as the G -coset that resides in the same part GA /GB /GC
that g resides in. As mentioned in the introduction, whenever we use additive nota-
tion together with elements of G, all operations take place in Gab . We do this so that
we don’t have to use the [g] notation excessively.

Lemma 3.10 g ∈ G if, and only if, g can be written as g = g1 . . . gt such that there
is a permutation σ of [t] with gσ (1) . . . gσ (t) = e.

Proof To see the “only if” direction, write g as a product of commutators as

                  g = [a1 , b1 ] . . . [at , bt ] = a1 b1 a1−1 b1−1 . . . at bt at−1 bt−1 .

Clearly, the latter product can be permuted as a1 a1−1 b1 b1−1 . . . at at−1 bt bt−1 = e,
as required. For the “if” direction, consider some g1 . . . gt which rearranges into
gσ (1) . . . gσ (t) = e. Consider the quotient homomorphism φ : G → G/G . Then since
G/G is abelian, we have φ(g1 . . . gt ) = φ(g1 ) . . . φ(gt ) = φ(gσ (1) ) . . . φ(gσ (t) ) =
φ(gσ (1) . . . gσ (t) ) = φ(e) = e i.e. g1 . . . gt ∈ ker(φ) = G as required.               □

      The following is a well-known property of finite abelian groups.

Theorem 3.11 (Fundamental theorem of ﬁnite abelian groups) Let G be an abelian
group. Then, G is isomorphic to a product of cyclic prime-power order groups.

      Given g ∈ G, s(g) denotes the size of the set {x ∈ G : x 2 = g}.

Proposition 3.12 ([30]) Let G be group such that there exists some g ∈ G with s(g) >
(3/4)|G|. Then, G is an elementary abelian 2-group and g = 0.

Proof We express our gratitude for all participants of the active discussion that took
place on Math Overflow including Emil Jeřábek, Derek Holt, Saúl Rodríguez Martín,
A random Hall-Paige conjecture                                                       797

and Terry Tao. Here, we reproduce the argument of GH from MO [30]. Let g ∈ G,
and suppose that |s(g)| > (3/4)|G|. Fix some y ∈ G, and define S = {x ∈ G : x 2 = g}
and T = {x ∈ S : xy ∈ S}. Observe that |G \ T | ≤ 2|G \ S|, since x ∈     / T only if
x∈          / S, and there are at most |G \ S| many x of either type. By assumption
  / S or xy ∈
|G \ S| < |G|/4, so |G \ T | < |G|/2. Consequently, |T | > |G|/2.
   Observe that for any x ∈ T , we have that (xy)2 = g = x 2 , and so we have

                  xyx −1 = (xy)(xy)−2 (xy)2 x −1 = (xy)−1 x 2 x −1 = y −1 .

It is an easy exercise to check that C = {x ∈ G : xyx −1 = y −1 } is a coset of C(y),
the centralizer subgroup of y.
    As |C| > |G|/2, and C is a coset, C = G by Lagrange’s theorem. This implies
that y = y −1 for each y, hence G is an elementary abelian 2-group. It follows that
g = 0, as s(g) = 0 for all g = 0 in an elementary abelian 2-group.                □

3.4 Generic elements, and choice of aφ , bφ , cφ

The following definition is critical.

Deﬁnition 3.13 A group element g ∈ G is generic if g = e and there are at most
n/109000 solutions to x 2 = g in G.

    Let N (G) denote the set of non-generic elements and note that |N (G)| ≤ 109000 ,
simply as in a group with n elements, the number of g with more than k square-roots
is at most n/k. Similarly, we call vertices of HG generic if the corresponding group
element is generic.
    As described in Sect. 2, it is critical to our method to pair up group elements with
a fixed sum (which can be viewed as defining a suitable involution φ), where the
fixed sum has some desirable properties. The following lemma serves to show that
the pairing we desire exists.

Lemma 3.14 For every group G, there exist aφ , bφ , cφ ∈ G such that the following all
hold.
 (a) aφ bφ cφ = e.
 (b) There are at most 30 values of x ∈ G such that x 2 ∈ {aφ , bφ , cφ }. In particular,
     aφ , bφ , cφ are generic.
 (c) There are at most 30|G | values of x ∈ G such that x 2 ∈ [aφ ] ∪ [bφ ] ∪ [cφ ].
                                          / G .
 (d) If |G | ≤ 10−9 n, then aφ , bφ , cφ ∈

Proof Choose aφ , and bφ uniformly at random and set cφ := (aφ bφ )−1 , noting cφ is
then also sampled uniformly at random. For a random g ∈ G, the probability that g
has more than 30 square-roots is at most 1/30. By the same argument applied to Gab ,
the probability that [g] has more than 30 square-roots in Gab is also at most 1/30.
The probability that g ∈ G is at most 10−9 if |G | ≤ 10−9 n. Then, with positive
probability, all the conditions are satisfied for aφ , bφ , and cφ by a union bound. □

Deﬁnition 3.15 We say that an element x is φ-generic if x, aφ±1 x, bφ±1 x, cφ±1 x,
aφ±1 bφ±1 x, bφ±1 cφ±1 x, cφ±1 aφ±1 x are all generic.
798                                                                 A. Müyesser, A. Pokrovskiy

   Notice that the number of elements which aren’t φ-generic is ≤ 30|N (G)| ≤
109010 . We call a subset φ-generic if all elements of that subset are φ-generic.
   For each group G, we fix a triple aφ , bφ , cφ with the properties as in Lemma 3.14.
We call two vertices v and w of HG coming from the same part a pair if v · w ∈ [xφ ]
where x = a, b, c depending on whether v, w ∈ A, B, C.
   We call a subset S of V (HG ) coset-paired if S can be partitioned into a disjoint
union of pairs. We call a coset [x] of G, viewed as a subset of GA , GB or GC , self-
paired if [x 2 ] is equal to [aφ ], [bφ ], or [cφ ], respectively. Note that Lemma 3.14(c)
implies in particular that there are at most 30 self-paired cosets. A subset S ⊆ V (HG )
being coset-paired is equivalent to the following statement: |S ∩ [g]| = |S ∩ [xφ g −1 ]|
for every non-self-paired coset [g] and |S ∩ [g]| is even for every self-paired coset
[g].

3.5 Symmetric sets

Recall that a p-random subset of set S is one obtained by sampling each element
of S independently with probability p. Similarly, we say a collection of random sets
R1 , . . . , Rk ⊆ S is disjoint p-random if each element of S belongs to each Ri with
probability p, and to none of the Ri with probability 1 − pk, and these decisions are
made independently for each element of S. Considering such disjoint distributions
complicates our approach as it makes various gadgets significantly more difficult to
find. The reason we are interested in such distributions is the applications we give
later on in the paper. Indeed, all applications we give other than the alternative proof
of Hall-Paige conjecture and Snevily’s conjecture require that we work with such
disjoint distributions.
    In fact, we need to generalise the concept of a disjoint distribution even further so
that we can work with random sets X, Y , Z where X, Y and Z −1 = {z−1 : z ∈ Z}
are sampled disjointly. This need comes from the applications to sequenceability and
R-sequenceability. Thankfully, this generalisation does not create many additional
combinatorial difficulties. However, we still need the following definitions to state a
single theorem that covers all of the applications we want to give.
    For g ∈ G, define ĝ := {g, g −1 }, noting that ĝ has size 1 or 2 (depending on
                                                                          ˆ
whether
           g has order ≤ 2 or not). For a subset T ⊆ G, let T̂ = {t : t ∈ T } and
    T̂ = t∈T tˆ = T ∪ T −1 . We say that a subset T ⊆ G is symmetric if T −1 = T
                             
(or equivalently if T = T̂ ). We call a subset S ⊆ V (HG ) symmetric if S ∩ A,
S ∩ B, S ∩ C are all symmetric. We say that R is a symmetric p-random subset
of G if R is always symmetric and R̂ is a p-random subset of Ĝ (or equivalently if
R is formed by flipping an independent coin for each ĝ ∈ Ĝ and taking the union of
all group elements for which heads comes up). We say that R 1 , R 2 , R 3 are disjoint
symmetric p-random subsets of G if additionally the joint distribution of R̂ 1 , R̂ 2 ,
R̂ 3 is that of disjoint p-random subsets of Ĝ. The following two lemmas are useful
as they allow us to jump between these definitions.

Lemma 3.16 Let R1 , R2 , R3 be disjoint p-random sets. Then there are S1 ⊆ R1 , S2 ⊆
R2 , S3 ⊆ R3 so that the joint distribution on S1 , S2 , S3 is that of disjoint symmetric
p 2 -random sets.
A random Hall-Paige conjecture                                                                799

Proof Let T be a p-random subset of G, independent of R1 , R2 , R3 . For non-
involutions, non-identity elements g, place g, g −1 into Si whenever {g, g −1 } ⊆ Ri .
For g an involution or the identity, place g into Si whenever g ∈ Ri ∩ T . Notice that
for each g ∈ G, this gives P(ĝ ⊆ S) = p 2 . Also, these events are mutually indepen-
dent for different ĝ, ĥ since they depend on different coordinates.               □

Lemma 3.17 Let Q1 , Q2 , Q3 , R be random sets with Q1 , Q2 , Q3 being disjoint
symmetric q-random and R being p-random and independent of Q1 , Q2 , Q3 . Then,
there are S1 ⊆ Q1 ∩ R, S2 ⊆ Q2 ∩ R, S3 ⊆ Q3 ∩ R so that the joint distribution on
S1 , S2 , S3 is that of disjoint symmetric p 2 q-random sets.

Proof Let T be a p-random subset of G, independent of R, Q1 , Q2 , Q3 . For g which
is not an involution or the identity, place g, g −1 into Si whenever {g, g −1 } ⊆ Qi ∩ R.
For g an involution or the identity, place g into Si whenever g ∈ Qi ∩ R ∩ T . Notice
that for each ĝ ∈ Ĝ, this gives P(ĝ ⊆ Si ) = p 2 q. Also, these events are mutually
independent for different ĝ, ĥ since they depend on different coordinates.           □

3.6 Free products

The goal of this section is to prove Lemma 3.32, which is our main tool to find vertex-
disjoint copies of constant sized substructures in multiplication hypergraphs. We first
remind the reader of some standard group theoretic terminology. We use Fk to denote
the free group on k generators v1 , . . . , vk .
    For a group G, we use G ∗ Fk to denote the free product of G and Fk . We call
v1 , . . . , vk the free variables of the free product G ∗ Fk . A word is simply an element
of G ∗ Fk . For w ∈ G ∗ Fk , we define the length of w to be the minimum number
 needed to write w = x1 x2 . . . x for xi ∈ {vi , vi−1 : i = 1, . . . , k} ∪ G. We call a
presentation of a word g0 x1 g1 . . . xt gt = w ∈ G ∗ Fk reduced if it cannot be made
shorter using the group operations, i.e. if it doesn’t contain consecutive elements of
G, doesn’t contain e, and doesn’t contain consecutive vi , vi−1 or vi−1 , vi for any i. It
is a standard property of free products that every g ∈ G ∗ Fk is uniquely expressible
as a reduced word.

Lemma 3.18 For w ∈ G ∗ Fk , there’s a unique way of writing w = g0 x1 g1 . . . xt gt
with xi ∈ {v1 , . . . , vk , v1−1 , . . . , vk−1 } and gi ∈ G such that we don’t have “xi =
 −1
xi+1 and gi = e” for any i ∈ {0, 1, . . . , t − 1}.

Proof Let W be the set of words which can be written of the form g0 x1 g1 . . . xt gt
with xi ∈ {v1 , . . . , vk , v1−1 , . . . , vk−1 } and gi ∈ G such that we don’t have “xi =
  −1
xi+1 and gi = e” for any i ∈ {0, 1, . . . , t − 1}. Let R be the set of reduced words
of G ∗ Fk . Let f : W → R be defined by mapping w = g0 x1 g1 . . . xt gt to the word
formed by removing all copies of e from w. Let g : R → W be defined by map-
ping w  = y1 y2 . . . yk to the word formed by inserting e between any yi , yi+1 which
are both in {v1 , . . . , vk , v1−1 , . . . , vk−1 }. It is easy to see that f (g(w  )) = w  and
g(f (w)) = w for any w ∈ W and w  ∈ R i.e. both functions are bijections. Thus,
since every g ∈ G ∗ Fk is uniquely expressible as a reduced word, it is also uniquely
expressible as a word in W .                                                                    □
800                                                                       A. Müyesser, A. Pokrovskiy

    From the above, we get that every w ∈ G∗Fk can be written as w = g0 x1 g1 . . . xt gt
with xi ∈ {v1 , . . . , vk , v1−1 , . . . , vk−1 } and gi ∈ G. We say that w ∈ G ∗ Fk is linear in
vi there’s a way of writing w like this with precisely one occurrence of vi (meaning
one occurrence vi or vi−1 , but not both). We say that w is linear if all variables occur
at most once in w, and some variable occurs exactly once in w. A useful fact is that
for a linear w, there’s a unique way of writing it as w = g0 x1 g1 . . . xt gt (with xi ∈
{v1 , . . . , vk , v1−1 , . . . , vk−1 } and gi ∈ G) such that there’s at most one occurrence of
each variable. This comes from Lemma 3.18, because in a linear w = g0 x1 g1 . . . xt gt
                                           −1
it is impossible to have xi = xi+1            , gi = e (since this would create two occurrences of
the free variable xi ).
    A homomorphism π : G ∗ Fk → G is a projection if π(g) = g for all g ∈ G.

Lemma 3.19 For each function f : {v1 , . . . , vk } → G, there is precisely one projec-
tion πf : G ∗ Fk → G which agrees with f on {v1 , . . . , vk }. In particular, there are
precisely nk projections G ∗ Fk → G.

Proof Let f : {v1 , . . . , vk } → G be a function. By the universal property of free
groups, there is a unique homomorphism φf : Fk → G which agrees with f on
{v1 , . . . , vk }. Let eG : G → G be the identity homomorphism. By the universal prop-
erty of free products there is a unique homomorphism πf which agrees with φf on
Fk and agrees with eG on G. Such a homomorphism is exactly a projection from
G ∗ Fk to G.
   For the “in particular” part, note that the number of functions {v1 , . . . , vk } → G is
exactly nk , and so there are this many projections G ∗ Fk → G by the first part. □

   We use π0 : G ∗ Fk → G to denote the projection which maps all w ∈ Fk to e (i.e.
the map coming from Lemma 3.19 via the function f mapping all vi to e).

Observation 3.20 For all g, h ∈ G there are the same number of solutions to x 2 ∈ [g]
and x 2 ∈ [h2 g].
   In particular, for any w, w  ∈ G ∗ Fk , there are the same number of solutions to
x ∈ [π0 (w −1 w  )] an x 2 ∈ [π0 (ww  )] in G).
 2


Proof We have that x 2 ∈ [g] if, and only if (hx)2 ∈ [h2 g]. Therefore, if S is the set
of solutions to x 2 ∈ [g], then hS is the set of solutions to (hx)2 ∈ [h2 g]. Since S and
hS always have the same size in a group, this gives what we want.
   The “in particular” part follows from the above by taking g = π0 (w −1 w  ), h =
π0 (w), and noting that, since π0 is a homomorphism, we have π0 (ww  ) = h2 g         □

Deﬁnition 3.21 Let w, w  ∈ G ∗ Fk . We say that w and w  are strongly separable if
any of the following hold.
 (a) A free variable vi appears once in one of w/w  , and never in the other.
 (b) w, w  are linear and there is a g ∈ G with g generic so that w  ∈ {gw, g −1 w,
     gw −1 , g −1 w −1 , wg, wg −1 , w −1 g, w −1 g −1 }.
 (c) All of the following hold.
        • |G | ≤ 10−9 n
A random Hall-Paige conjecture                                                            801

         • w and w  are linear and have the same free variables (potentially with
           different signs).
                                     / G or some free variable occurs with the same
         • We either have π0 (ww  ) ∈
                        
           sign in w, w .
                                         / G or some free variable occurs with the
         • We either have π0 (w −1 w  ) ∈
           opposite sign in w, w .

         • There are ≤ 90|G | solutions to x 2 ∈ [π0 (ww  )] (or equivalently by Obser-
           vation 3.20, there are ≤ 90|G | solutions to x 2 ∈ [π0 (w −1 w  )] in G).

   We remark that strong separability is a symmetric relation.

Deﬁnition 3.22 We say that two sets S, T ⊆ G are strongly separable if every pair
of elements s ∈ S, t ∈ T are strongly separable.

   The following observation is quite critical, and justifies why considering symmet-
ric disjoint random sets doesn’t create additional complications when compared to
disjoint random sets.

Observation 3.23 w, w  are strongly separable ⇐⇒ w −1 , w  are strongly separable
⇐⇒ ŵ, ŵ  are strongly separable.

Proof Within this proof, we say separable to mean strongly separable. For “w,
w  are separable ⇐⇒ w −1 , w  are separable”: Consider the possible cases of
Definition 3.21. If w, w  are separable by (a), then w −1 , w  are also separa-
ble by (a) (this is immediate when one considers the “a free variable vi ap-
pears once in one of w/w  , but not both” version of (a)). If w, w  are separa-
ble by (b), then w −1 , w  are also separable by (b) — this is true because the set
{gw, g −1 w, gw −1 , g −1 w −1 , wg, wg −1 , w −1 g, w −1 g −1 } doesn’t change if you re-
place each “w” with “w −1 ”. If w, w  are separable by (c), then w −1 , w  are also
separable by (c). (The first bullet point doesn’t involve w, w  . The second bullet point
doesn’t change by replacing w with w −1 because w, w −1 are always linear in the
same free variables. The 3rd and 4th bullet points get exchanged when replacing w
by w −1 . The 5th bullet point doesn’t change when replacing w by w −1 since there is
the same number of solutions to x 2 ∈ [π0 (ww  )] and x 2 ∈ [π0 (w −1 w  )] by Observa-
tion 3.20).
   The direction “ŵ, ŵ  are separable =⇒ w, w  are separable” is immediate from
the definition of “S, T are separable”. For “w, w  are separable =⇒ ŵ, ŵ  are
separable”, note that once we know that w, w  are separable, we also know that the
pairs (w −1 , w  ), (w, (w  )−1 ), (w −1 , (w  )−1 ) are separable (all coming from “w, w 
are separable ⇐⇒ w −1 , w  are separable”). This gives that ŵ, ŵ  are separable. □

Observation 3.24 Let S ⊆ G ∗ Fk be a set of linear elements. For each T ⊆
{v1 , . . . , vk }, let ST be the set of w ∈ W such that the free variables in w are ex-
actly the set T . Then the sets ST , ST  are strongly separable for distinct T , T  .

Proof If T , T  are distinct, then there’s some vi ∈ T ΔT  say vi ∈ T \ T  . For any
w ∈ ST , w  ∈ ST  , we have that vi appears in w (just once by linearity) but not w  ,
and so part (a) of the definition of “strongly separable” applies.                   □
802                                                                                      A. Müyesser, A. Pokrovskiy

Deﬁnition 3.25 Let w, w  ∈ G ∗ Fk . We say that w and w  are weakly separable if
either they are strongly separable, or they satisfy the following property.
(b ) For some non-identity element g, the equation w = w  rearranges into e = g,
     meaning that w −1 w  is conjugate to an element of G.

   We remark that the key difference between strong and weak separability comes
from the property (b ) not necessarily holding when w is replaced with w −1 , i.e.
Observation 3.23 fails for weak separability. This will not be an issue while we search
for gadgets, as we rely on weak separation only to separate elements coming from the
same set AG , BG , CG .

Deﬁnition 3.26 Let S ⊆ G ∗ Fk . We say that a homomorphism φ : G ∗ Fk → G,
separates S if for every weakly-separable w, w  ∈ S we have φ(w) = φ(w  ).

      Recall that (G ∗ Fk ) denotes the commutator subgroup of (G ∗ Fk ).

Lemma 3.27 For a group G, let w, w  ∈ G ∗ Fk satisfy part (c) of the definition of
“strongly separable”. Then w = w  rearranges to u2 = π0 (w −1 w  )y for some y ∈
(G ∗ Fk ) and some u ∈ Fk which is either linear or equals e. Additionally, u = e
only if the free variables occur with the same signs in w, w  .

Proof Let w = g0 x1 g1 . . . xt gt and w  = g0 x1 g1 . . . xt gt  (with xi , xi ∈ {v1 , . . . , vk ,
v1−1 , . . . , vk−1 } and gi , gi ∈ G). Note that the assumption “w and w  are linear and
have the same free variables” implies that t = t  , and that there is a permutation σ of
[t] so that xi ∈ {xσ (i) , xσ−1                                               +     −          +
                                  (i) } for i = 1, . . . , t. Partition [t] = I ∪ I with I = {i :
                       −                  −1                           −1
xi = xσ (i) } and I = {i : xi = xσ (i) }. Set u = i∈I − (xi ) , noting that u is in Fk ,
and that u = e ⇐⇒ I − = ∅ ⇐⇒ the free variables occur with the same signs in w,
w  . This also implies that if u = e, then u is linear. Note that w = w  rearranges to
u2 = π0 (w −1 w  )y where y = π0 (w −1 w  )−1 u2 w  w −1 . Notice that

π0 (w −1 w  )−1 u2 w  w −1 = π0 (w  )−1 π0 (w)u2 w  w −1
                                                                                     
                               = (gt −1 . . . g1 −1 g0 −1 )(g0 . . . gt−1 gt )(          (xi )−1 )
                                                                                    i∈I −
                                       
                                                                                                −1
                                  ×(          (xi )−1 )(g0 x1 g1 . . . xt gt )(gt−1 xt−1 gt−1 . . . x1−1 g0−1 )
                                      i∈I −

Notice that the above product can be permuted into the identity. Indeed each gi −1 in
the 1st bracket cancels with gi in the 5th bracket, each gi in the 2nd bracket cancels
with gi−1 6th bracket, for i ∈ I − each (xi )−1 in the 3rd bracket cancels with xi in
the 5th bracket, each (xi )−1 in the 4th bracket cancels with (xσ (i) )−1 = xi in the 6th
bracket, and for i ∈ I + each xi in the 5th bracket cancels with xσ−1           −1 in the
                                                                        (i) = (xi )
6th bracket. Thus, by Lemma 3.10, t ∈ (G ∗ Fk ) .                                       □

Lemma 3.28 Let w ∈ G ∗ Fk be linear in some free variable vi and let g ∈ G. Then
there are exactly nk−1 projections π : G ∗ Fk → G having π(w) = g.
A random Hall-Paige conjecture                                                              803

Proof Without loss of generality, suppose i = k. By Lemma 3.19 there are exactly
nk−1 projections π : G ∗ Fk−1 → G. We will show that for every such projection,
there is a unique projection π  : G ∗ Fk → G that agrees with π on G ∗ Fk−1 and ad-
ditionally has π  (w) = g. To see this, note that the equation w = g in the group G∗Fk
rearranges into vk = h where h ∈ G ∗ Fk such that the free variable vk doesn’t occur
in h (this is possible because w is linear in vk ). This shows that for any projection
π  , the equation π  (w) = g is equivalent to π  (vk ) = π  (h) (using that for any g ∈ G
we have π  (g) = g for any projection π  ). Since h ∈ G ∗ Fk−1 , the image π(h) ∈ G
is defined. Thus a projection π  agrees with π on Fk−1 ∗ G and also has π  (w) = g
if and only if π  (v1 ) = π(vi ), . . . , π  (vk−1 ) = π(vk−1 ), and also π  (vk ) = π(h). By
Lemma 3.19, there is a unique projection satisfying this, as required.                         □

Lemma 3.29 Let S ⊆ G ∗ Fk be a set of elements which are each linear in at least one
variable, and let U ⊆ G. Then the number of projections π : G ∗ Fk → G for which
π(S) intersects U is ≤ |S||U |nk−1 .

Proof For each w ∈ S and u ∈ U , by Lemma 3.28, there are nk−1 projections π : G ∗
Fk → G with π(w) = u. Thus, summing over all w, u, there are at most ≤ |S||U |nk−1
projections with π(S) intersecting U .                                          □

Lemma 3.30 Let n be sufficiently large. Let S ⊆ G ∗ Fk be a set of size ≤ 1000. Then
there are at most 0.1nk projections π : G ∗ Fk → G which do not separate S. If
|G | > 10−9 n, then this can be improved to “at most 10−8900 nk projections”.

Proof The total number of projections π : G ∗ Fk → G is nk by Lemma 3.19. Con-
sider two weakly separable words w, w  ∈ S. We will count the number of projections
for which π(w) = π(w  ). There are four cases, depending on which part of the defi-
nition of weakly separable applies to w, w  .

(a)  Note that the equation π(w) = π(w  ) can be rearranged into π(w −1 w  ) = e.
    Since in (a), w −1 w  is linear in some variable, Lemma 3.28 tells us that there
    are nk−1 ≤ nk /109000 projections π : G ∗ Fk → G for which π(w −1 w  ) = e.
  
(b ) Since w = w  rearranges into e = g, the equation π(w) = π(w  ) rearranges
    into π(e) = π(g). But this is impossible for a projection π (since the definition
    of “projection” gives that π(e) = e and π(g) = g). Thus there are zero projec-
    tions with π(w) = π(w  ) in this case.
(b) If we are not in some case covered by the previous bullet point, then the equa-
    tion w = w  rearranges into (w)2 = g for a generic group element g ∈ G. Let Tg
    be the set of solutions to x 2 = g to get a set of size ≤ n/109000 , using the defi-
    nition of a generic group element. For a projection π to have π(w) = π(w  ),
    it must have (using that π is a homomorphism) π(w)2 = π(g) = g and so
    π(w) ∈ Tg . By Lemma 3.29, there are |Tg |nk−1 ≤ nk /109000 projections with
    π(w) ∈ Tg .
(c) Using Lemma 3.27, w = w  rearranges into u2 = π0 (w −1 w  )k where u ∈ Fk
    is either linear or u = e, and k ∈ (G ∗ Fk ) . If u = e, then we know that free
    variables occur with the same signs in w, w  , which tells us that π0 (w −1 w  ) ∈
                                                                                       /
804                                                                    A. Müyesser, A. Pokrovskiy

      G . This gives that [π0 (w −1 w  )k] = G , and so e = π0 (w −1 w  )k = u2 = e, a
      contradiction. Thus in this case, there are no projections with π(w) = π(w  ). So
      we can assume that u = e which implies by Lemma 3.27 that u is linear.
      Let T be set of solutions to x 2 ∈ [π0 (w −1 w  )] in G. Since we are in (c),
      we have |T | ≤ 90|G | ≤ 90 · 10−9 n ≤ 10−7 n. For π(w) = π(w  ) to hold,
      we must have (using that π is a homomorphism) π(u2 ) = π(π0 (w −1 w  )k),
      which implies (using that π is a projection) π(u)2 = π0 (w −1 w  )π(k). Since
      π0 (w −1 w  )π(k) ∈ [π0 (w −1 w  )] for any projection π (we have φ(H  ) ⊆ G for
      any group homomorphism φ : H → G, since if x is a commutator in H , then
      φ(x) is a commutator in G), this would imply that π(w) ∈ T . By Lemma 3.29,
      there are |T |nk−1 ≤ 10−7 nk projections with π(w) ∈ T as required.
                            1000
There are at most |S|   2 ≤     2   ≤ 106 pairs of weakly separable w, w  ∈ S, and for
each of them there are ≤ n /10 projections with w = w  . Thus in total there are ≤
                              k    7

106 nk /107 = 0.1nk projections which don’t separate S. This implies the lemma when
|G | ≤ 10−9 n. When |G | > 10−9 n, note that case (c) can’t occur, so we actually have
≤ nk /109000 projections with w = w  for each separable w, w  . This gives a total of
≤ 2 · 106 nk /109000 ≤ nk /108900 projections which don’t separate S.                     □

Lemma 3.31 Let n be sufficiently large, k ≤ 200, and S ⊆ G ∗ Fk a set of ≤
1000 elements which are linear in at least one variable. There are projections
π1 , . . . , π10−3000 n which separate S and have π1 (S), . . . , π10−3000 n (S) disjoint. If
|G | > 10−9 n, then we can additionally ensure that πj (vi ) ∈ G for all free variables
vi and projections πj .

Proof For |G | ≤ 10−9 n say that a projection π is good if it separates S. For |G | >
10−9 n say that a projection π is good if it separates S and has π(vi ) ∈ G for all vi ∈
Fk . Our task is to find 10−3000 n good projections πi (S), which have πi (S) disjoint
for different i. Consider a maximal family π1 , . . . , πt of good projections. which have
π1 (S), . . . , πt (S) disjoint. Let T = π1 (S) ∪ · · · ∪ πt (S). By maximality, we have that
all good projections π have π(S) ∩ T = ∅. Lemma 3.29 tells us that the number
of projections with π(S) ∩ T = ∅ is ≤ |T |nk−1 ≤ t|S|nk−1 ≤ 1000tnk−1 . Thus we
established that there are ≤ 1000tnk−1 good projections.
    Suppose |G | ≤ 10−9 n. Lemma 3.30 tells us that there are ≤ 0.1nk bad projections,
and hence ≥ nk − 0.1nk = 0.9nk good projections. Thus t ≥ 0.9n/1000 ≥ 10−3000 n.
    Now suppose |G | > 10−9 n: There are |G |k projections with π(vi ) ∈ G for
all vi ∈ Fk (using Lemma 3.19). By Lemma 3.30, there are ≤ nk /108900 ≤
0.1(10−9 n)k ≤ 0.1|G |k projections that don’t separate S. Hence there remain ≥
0.9|G |k ≥ 0.9 · 10−9k nk projections that both separate S and have all π(vi ) ∈ G i.e.
there are ≥ 0.9 · 10−9k nk good projections. Combining with “there are ≤ 1000tnk−1
good projections”, this gives t ≥ 0.9 · 10−9k n/1000 ≥ 10−3000 n.                          □

Lemma 3.32 Let p ≥ n−1/700 . Let RA , RB , RC be disjoint p-random symmetric sub-
sets of G and set R = RA ∪ RB ∪ RC . With high probability, the following holds:
   Let k ≤ 200, S ⊆ G ∗ Fk a set of ≤ 600 elements of length ≤ 200 which are each
linear in at least one variable, and U ⊆ G with |U | ≤ p 800 n/104000 . Then there is a
projection π : G ∗ Fk → G which separates S and has π(S) ⊆ R \ U . Moreover:
A random Hall-Paige conjecture                                                                      805

   • For any SA , SB , SC ⊆ S, with SA , SB , SC being pairwise strongly separable sets,
     we can ensure π(SA ) ⊆ RA , π(SB ) ⊆ RB , π(SC ) ⊆ RC .
   • If |G | > 10−9 n, then we can additionally ensure that π(vi ) ∈ G for all free
     variables vi .

Proof We can assume that n is sufficiently large (otherwise the lemma is vacuous
since “with high probability” wouldn’t mean anything). First    fix k ≤ 200, and some
set S ⊆ G, and SA , SB , SC ⊆ S as in the lemma. Note | Ŝ| ≤ 2|S| ≤ 1200. Fix-
 m := n/10 
ing               3000 , apply Lemma 3.31 to get projections π , . . . , π which separate
                                                               1         m
   Ŝ and have π1 ( Ŝ), . . . , πm ( Ŝ) disjoint (and additionally, when |G | > 10−9 n,
having that πj (vi ) ∈ G for all free variables vi and projections πj ).
    Note that for each i we have πi (ŜA ), πi (ŜB ), πi (ŜC ) pairwise disjoint. In-
deed if say πi (ŜA ) ∩ πi (ŜB ) = ∅, then there would be some a ∈ SA , b ∈ SB with
πi (â) = πi (b̂). We know that a, b separable,
                                              which implies that â, b̂ are separable
(by Observation 3.23). But πi separates Ŝ, which shows that π(â), π(b̂) are dis-
joint.
    For each i, ĝ ∈ πi (Ŝ), let
                                              ⎧
                                              ⎪
                                              ⎪A if ĝ ∈ πi (ŜA )
                                              ⎪
                                              ⎨B if ĝ ∈ πi (ŜB )
                                    ABC(ĝ) =                                .
                                              ⎪
                                              ⎪C if ĝ ∈ πi (ŜC )
                                              ⎪
                                              ⎩
                                               C otherwise

Note that this is well defined by the previous paragraph. For each i, ĝ ∈ πi (S),
     ĝ                                                    ĝ                   ĝ
let Ei be the event“ĝ ⊆ RABC(ĝ) ”. Note that we have P (Ei ) = p. Note that Ei ,
                                             ĝ
Ejĥ are independent for ĝ = ĥ (Ei depends only on the coordinate ĝ, Ejĥ depends
                                                         
only on ĥ). Let Ei = ĝ∈πi (Ŝ) Ei . We have P(Ei ) = ĝ∈πi (Ŝ) P(Ei ) ≥ p |S| . For all
                                      ĝ                               ĝ

i = 1, . . . , m, the events Ei are independent (since Ei , Ej depend on the coordinates
                   
in πi ( Ŝ), πj ( Ŝ) respectively. These are disjoint for i = j ). By linearity of ex-
pectation, the expected number of indices i for which Ei occurs is at least p |S| m.
By Chernoff’s Bound, there are at least p |S| m/2 indices for which Ei occurs with
probability
                        1   |S| m             1   −1/700 )600 n/103000
                                                                         ≥ 1 − 2e−n
                                                                                  1/9 /106000
            ≥ 1 − 2e 6 p            ≥ 1 − 2e 6 (n                                               .

Since |U | ≤ p 800 n/104000 ≤ p 600 n/(2 · 103000 ) = p |S| m/2, there is at least one such
index with πi (S) ∩ U = ∅. This projection πi satisfies the lemma.
   To get the lemma for all possible families {k, S, SA , SB , SC }, notice that there
         1/7
are o(en /36,000 ) such families. Indeed, there are 200 choices for k and for each
k, there are ≤ 201(400n)201 length ≤ 200 elements w ∈ G ∗ Fk . There are ≤
(201(400n)201 )600 sets of ≤ 600 such words. Hence, there are ≤ ((201(400 ×
                    1/37
n)201 )600 )4 = o(en /36,000 ) families of 4-tuples of such subsets. So we can take
a union bound over all such families.                                                    □
806                                                                   A. Müyesser, A. Pokrovskiy

Corollary 3.33 Let p ≥ 3n−1/1400 . Let R be random set which is either p-random or
symmetric p-random. With high probability, the following holds:
   Let k ≤ 200, S ⊆ G ∗ Fk a set of ≤ 600 elements of length ≤ 200 which are each
linear in at least one variable, and U ⊆ G with |U | ≤ p 1600 n/104002 . Then there is a
projection π : G ∗ Fk → G which separates S and has π(S) ⊆ R \ U .

Proof Using Lemma 3.16, we can choose random sets RA , RB , RC ⊆ R such that
the joint distribution on RA , RB , RC is that of disjoint symmetric p 2 /9-random sets.
Now, the lemma follows from Lemma 3.32.                                              □

      We end with a simple application of the above lemma for later use.

Lemma 3.34 Let p ≥ n−1/700 . Let G be a group R a symmetric p-random subset of
G. With high probability, the following holds.
   For any generic xφ ∈ G and U ⊆ V (HG ) with |U | ≤ p 800 n/104001 , there are
distinct and φ-generic x, x  ∈ R \ U with xx  = xφ .

Proof With high probability, Lemma 3.32 applies. Let xφ , U be as in the lemma. Add
all non-φ-generic elements to U in order to get a set U  with |U  | ≤ p 800 n/104000 . Let
xφ ∈ G and consider the set {v1 , xφ v1−1 } ⊆ G ∗ F1 . Note that v1 , xφ v1−1 are separable
(by part (b) of the definition), and so Lemma 3.32 gives a projection π : G ∗ F1 → G
with π(v1 ), π(xφ v1−1 ) distinct and contained in R \ U  setting x = π(xφ v1−1 ), x  =
π(v1 ) gives the lemma.                                                                   □


4 The main theorem and its variants

This section is devoted to stating the main technical result of the paper, and collecting
various consequences thereof (including Theorem 1.1) which will be more convenient
to use for various applications we give. For the applications, we need variants of
Theorem 1.1, where the probability distributions on R 1 , R 2 , R 3 are different from
the one given (e.g. it is sometimes useful to sample R 1 , R 2 , R 3 disjointly rather than
independently). We begin by stating a more technical version of Theorem 1.1 which
covers all the different distributions of these sets that we might need. The following
definition is the most general case.

Deﬁnition 4.1 Let G be a group and let R 1 , R 2 , R 3 be random subsets of G. We say
that R 1 , R 2 , R 3 are q-slightly-independent, if there are random subsets Q1 ⊆ R 1 ,
Q2 ⊆ R 2 , Q3 ⊆ R 3 such that the joint distribution on Q1 , Q2 , Q3 is that of disjoint
symmetric, q-random subsets of G.

   Note that q-slightly-independent sets R 1 and R 2 do not necessarily have the same
size (even in expectation). The following observation about this definition is useful.

Observation 4.2 If R 1 , R 2 , R 3 are q-slightly-independent, then so are R 1 , (R 2 )−1 ,
R3 .
A random Hall-Paige conjecture                                                       807

Proof We have Q1 ⊆ R 1 , Q2 ⊆ R 2 , Q3 ⊆ R 3 such that the joint distribution on Q1 ,
Q2 , Q3 is that of disjoint, symmetric, q-random subsets of G. Note that since Q2 is
symmetric, Q2 = (Q2 )−1 . Also, (Q2 )−1 ⊆ (R 2 )−1 . Thus, Q1 , Q2 , Q3 witness R 1 ,
(R 2 )−1 , R 3 being q-slightly-independent.                                      □

   The following is the strongest version of the main theorem that we prove in this
paper. It is proved in Sect. 5.

Theorem 4.3 Let q ≥ n−1/10 . Let G be a group of order n. Let R 1 , R 2 , R 3 ⊆ G be
                                 101


p-random, q-slightly-independent subsets. Then, with high probability, the following
holds.
    Let X, Y , Z be equal-sized subsets of GA , GB , and GC respectively, satisfying the
following properties.
   • |(RA1 ∪ R 2 ∪ R 3 )  (X ∪ Y ∪ Z)| ≤ q 1017 n/ log(n)1017
              B     
                      C
   •     X + Y + Z = 0 (in Gab )
   • eG ∈/ X∪Y ∪Z
Then, HG [X, Y, Z] contains a perfect matching.

   We now state and prove a number of consequences of this theorem, where the
distributions on R 1 , R 2 , R 3 are more natural. Firstly, the following theorem easily
implies Theorem 1.1 (we will prove this formally later on in the section).

Theorem 4.4 Let p ≥ n−1/10 . Let G be a group of order n. Let R 1 , R 2 , R 3 ⊆ G be
                                 102


p-random subsets, sampled independently. Then, with high probability, the following
holds.
    Let X, Y , Z be equal-sized subsets of GA , GB , and GC respectively, satisfying the
following properties.
   • |(RA1 ∪ R 2 ∪ R 3 )  (X ∪ Y ∪ Z)| ≤ p 1018 n/ log(n)1018
              B     
                      C
   •     X + Y + Z = 0 (in Gab )
Then, HG [X, Y, Z] contains a perfect matching.

   When R 1 , R 2 , R 3 are sampled disjointly, then the statement of the theorem needs
to change slightly. In this case, when the group is Zk2 , then it is impossible to cover
e with a hyperedge contained in R 1 ∪ R 2 ∪ R 3 . Thus to get a matching, we need to
additionally have the condition “eG ∈  / X ∪ Y ∪ Z if G ∼= Zk2 ” (Proposition 3.12 shows
that this is the only local obstruction of this type).

Theorem 4.5 Let p ≥ n−1/10 . Let G be a group of order n. Let R 1 , R 2 , R 3 ⊆ G be
                                 102


p-random disjoint subsets. Then, with high probability, the following holds.
    Let X, Y , Z be equal-sized subsets of GA , GB , and GC respectively, satisfying the
following properties.
   • |(RA1 ∪ R 2 ∪ R 3 )  (X ∪ Y ∪ Z)| ≤ p 1018 n/ log(n)1018
              B     
                      C
   •     X + Y + Z = 0 (in Gab )
   • eG ∈/ X ∪ Y ∪ Z if G ∼ = Zk2 .
Then, HG [X, Y, Z] contains a perfect matching.
808                                                                    A. Müyesser, A. Pokrovskiy

   Finally, we have two versions of the theorem which are intermediate between the
previous two. First one which asks R 1 , R 2 to be sampled disjointly, and R 3 to be
sampled independently.

Theorem 4.6 Let p ≥ n−1/10 . Let G be a group of order n. Let R 1 , R 2 ⊆ G be
                                102


disjoint p-random subsets, and let R 3 ⊆ G be a p-random subset, sampled indepen-
dently with R 1 and R 2 . Then, with high probability, the following holds.
    Let X, Y , Z be subsets of GA , GB , and GC be equal sized subsets satisfying the
following properties.
   •    1 ∪ R 2 ∪ R 3 )(X ∪ Y ∪ Z)| ≤ p 1018 n/ log(n)1018
      |(RA    B     
                     C
   •     X + Y + Z = 0 (in the abelianization of G)
   • If G ∼
          = (Z2 )k for some k, suppose that e ∈/ Z.
Then, HG [X, Y, Z] contains a perfect matching.

  The next theorem is almost the same as the previous one, with the difference that
we sample (R 1 )−1 , R 2 disjointly (as opposed to R 1 , R 2 ).

Theorem 4.7 Let p ≥ n−1/10 . Let G be a group of order n. Let (R 1 )−1 , R 2 ⊆
                                 102


G be disjoint p-random subsets, and let R 3 ⊆ G be a p-random subset, sampled
independently with R 1 and R 2 . Then, with high probability, the following holds.
    Let X, Y , Z be subsets of GA , GB , and GC be equal sized subsets satisfying the
following properties.
   •    1 ∪ R 2 ∪ R 3 )(X ∪ Y ∪ Z)| ≤ p 1018 n/ log(n)1018
      |(RA    B     
                     C
   •     X + Y + Z = 0 (in the abelianization of G)
   • If G ∼
          = (Z2 )k for some k, suppose that e ∈/ Z.
Then, HG [X, Y, Z] contains a perfect matching.

    These theorems all have almost the same proof. The idea is to first show that the
distribution of R1 , R2 , R3 is q-slightly-independent (and so Theorem 4.3) applies.
When the sets X, Y , Z don’t contain the identity, then this already gives what we
want. When X, Y , Z do contain the identity, then we first find a small matching
covering all copies of the identity in X, Y , Z, and then find another matching covering
all remaining vertices using Theorem 4.3.

Proof of Theorem 4.5 Note that R 1 , R 2 , R 3 are q-slightly-independent for q = p 2 /9.
To see this, consider disjoint 1/3-random sets T 1 , T 2 , T 3 ⊆ G, chosen independently
of R 1 , R 2 , R 3 . We have that R 1 ∩ T 1 , R 2 ∩ T 2 , R 3 ∩ T 3 are disjoint p/3-random
subsets of G. Indeed for every g ∈ G, we have P(g ∈ R i ∩ T i ) = P(g ∈ R i )P(g ∈
3) = p/3,      and P(g ∈ R i ∩ T i ∩ R j ∩ T j ) ≤ P(g ∈ T i ∩ T j ) = 0. These imply P(g ∈
T i                                                                                          /
   i=1 R   i ∩ T  i ) = 1 − 3αp. Also for different g, h, their locations are independent of

each other (since there was no correlations between distinct g, h, in any of R 1 , R 2 ,
R 3 , T 1 , T 2 , T 3 ), giving that R 1 ∩ T 1 , R 2 ∩ T 2 , R 3 ∩ T 3 are disjoint p/3-random
subsets of G. Use Lemma 3.16 to pick disjoint, symmetric, q-random subsets Q1 ⊆
R 1 ∩ T 1 , Q2 ⊆ R 2 ∩ T 2 , Q3 ⊆ R 3 ∩ T 3 . Now Q1 , Q2 , Q3 demonstrate R 1 , R 2 , R 3
being q-slightly-independent.
    So Theorem 4.3 applies to R 1 , R 2 , R 3 . We also have the following property if
G = Zk2 :
A random Hall-Paige conjecture                                                                809

  P: For each i, j ∈ {1, 2, 3}, i = j , R i × R j contains ≥ p 2 n/1000 pairs of the form
     (x, x −1 ) where for each such pair of pairs {x, x −1 } ∩ {y, y −1 } = ∅ (this follows
     by Chernoff’s bound).

Now consider sets X, Y , Z as in the theorems. Use (P ) to pick distinct elements gA ,
                             −1
gB , gC with gA ∈ R 2 , gA        ∈ R 3 , gB ∈ R 1 , gB−1 ∈ R 3 , gC ∈ R 1 , gC−1 ∈ R 2 . Noting
that we have p 2 n/1000 choices for each gA , gB , gC , we can choose them to have
       −1
{gA , gA  }, {gB , gB−1 }, {gC , gC−1 } disjoint from each other and from R 1 \ X, R 2 \ Y ,
                                                                    −1
R 3 \ Z. The result is that the three edges fA := (eA , gA , gA        ), fB := (gB , eB , gB−1 ),
               −1
fC := (gC , gC , eC ) form a matching with all vertices, other than possibly eB , eB , eC
contained in X ∪ Y ∪ Z. Let N = {fi : ei ∈ X ∪ Y ∪ Z} to get a matching contained
in X ∪ Y ∪ Z covering all copies of the identity in X ∪ Y ∪ Z.
   Let X  = X \ N  , Y  = Y\ N , Z  = Z \ N , noting that these have the same size
                
and have X + Y  + Z  = 0 in Gab (due to N being a matching). Thus the
property of Theorem 4.3 applies to give a perfect matching M in HG [X  , Y  , Z  ].
Now M ∪ N satisfies the theorem.                                                               □

   Next we show how to modify the above proof to obtain Theorems 4.4, 4.6, 4.7.

Proof of Theorems 4.4, 4.6, 4.7 First notice that in all three theorems, we have that
R 1 , R 2 , R 3 are q-slightly-independent. In Theorems 4.4, 4.6 this is exactly the first
paragraph of the proof of Theorem 4.5. For Theorem 4.7, that paragraph shows that
(R 1 )−1 , R 2 , R 3 are q-slightly-independent. But, then by Observation 4.2, we have
that R 1 , R 2 , R 3 are q-slightly-independent.
    Next note that property (P) holds in the following cases:

   • Theorem 4.4: here property (P) always holds.
   • Theorem 4.6: here property (P) always holds for (i, j ) = (2, 3) and (i, j ) =
     (1, 3). For (i, j ) = (1, 2) property (P) holds when G = Zk2 .
   • Theorem 4.7: here property (P) always holds for (i, j ) = (2, 3) and (i, j ) =
     (1, 3). For (i, j ) = (1, 2) property (P) holds when G = Zk2 .

The rest of the proofs are the same as in Theorem 4.5 — property (P) produces a
matching of size ≤ 3 covering all copies of the identity in X ∪ Y ∪ Z, and then the
property of Theorem 4.3 gives a matching covering the rest of X ∪ Y ∪ Z.         □

   Finally we show how to derive Theorem 1.1 as stated in the introduction.

Proof of Theorem 1.1 via Theorem 4.4 Let R 1 , R 2 , R 3 ⊆ G be p-random subsets, in-
dependently sampled. Observe that R 1 , R 2 , (R 3 )−1 ⊆ G are also p-random sub-
sets, independently sampled, so with high probability Theorem 4.4 applies. Let
X, Y, Z ⊆ G be subsets with the properties as in the statement of Theorem 1.1. Then,
the sets X, Y, Z −1 ⊆ G clearly satisfy the two properties required by Theorem 4.4
with respect to R 1 , R 2 , (R 3 )−1 ⊆ G. Thus, HG [X, Y, Z −1 ] contains a perfect match-
ing, say M. Define the bijection φ : X → Y so that x maps to the unique element
y of Y such that x and y are contained in an edge together in M. As for each edge
(x, φ(x), z) of M, xφ(x)z = e, x → xφ(x) is a bijection X → (Z −1 )−1 = Z, as
desired.                                                                                □
810                                                                 A. Müyesser, A. Pokrovskiy

4.1 Complete mappings and orthomorphisms

We conclude this section with a version of the main theorem that fits better with the
results proved in Sect. 6.2. Given a triple of subsets of a group G as (X, Y, Z), a
complete mapping is a bijection φ : X → Y such that the induced map from X to Z
via x → xφ(x) is also a bijection, whereas an orthomorphism is a bijection φ : X →
Y such that the induced map from X to Z via x → x −1 φ(x) is also a bijection.

Observation 4.8 Let X, Y , Z be subsets of a group G. Then,
  • (X, Y, Z) admits a complete mapping if and only if HG [X, Y, Z −1 ] has a perfect
    matching.
  • (X, Y, Z) admits an orthomorphism if and only if HG [X −1 , Y, Z −1 ] has a per-
    fect matching.

Proof The proof is routine and we refer the reader to an earlier version of the paper
available at arXiv:2204.09666v2 for a proof.                                       □

Theorem 4.9 Let p ≥ n−1/10 . Let G be a group of order n. Let R 1 , R 2 ⊆ G be
                               102


disjoint p-random subsets, and let R 3 ⊆ G be a p-random subset, sampled indepen-
dently with R 1 and R 2 . Then, with high probability, the following holds.
   Let X, Y , Z be equal-sized subsets of GA , GB , and GC satisfying the following
properties.
   • |(RA1 ∪ R 2 ∪ R 3 )(X ∪ Y ∪ Z)| ≤ p 1018 n/ log(n)1018
               B      C
   • One of
            the following
                          identities holds in the abelianization of G.
     C.  X +  Y =  Z
     O.       Y − X= Z
   • If G = (Z2 )k for some k, then e ∈ / Z.
Then, if C holds, (X, Y, Z) admits a complete mapping, and if O holds, (X, Y, Z)
admits an orthomorphism.

Proof We refer the reader to an earlier version of the paper available at arXiv:2204.
09666v2 for a short and routine proof.                                             □


5 Proof of the main theorem

In this section, we prove the main result of the paper, Theorem 4.3. We begin by clari-
fying that for every (sufficiently large) group G, we fix aφ , bφ , cφ ∈ G with properties
as in Sect. 3.4. Definitions such as φ-generic, pair, and coset-paired are with respect
to these fixed choices of aφ , bφ , cφ ∈ G given by Lemma 3.14.

5.1 Absorbers

In this section we give constructions of absorbers i.e. subsets R ⊆ V (HG ) which can
be extended into a matching in several different ways. Lemma 5.24 is the main result
of this section, and the only result we need for the rest of the paper. The following
definition precisely describes what we will be looking for.
A random Hall-Paige conjecture                                                                        811

Deﬁnition 5.1 Let F = {S1 , . . . , St } be a family of subsets of V (H ) for a hypergraph
H . We say that a set of vertices R m-absorbs F if for every subfamily            
                                                                              F ⊆ F of
size m, there is a hypergraph matching whose vertex set is exactly R ∪ Si ∈F  Si .

   It will be convenient to note that when t = 2 and m = 1, then the above definition
is equivalent to “Let X, Y be sets of vertices in a hypergraph H . We say that a set
of vertices R 1-absorbs {X, Y } if there are hypergraph matchings R − , R + whose
vertex sets are exactly V (R − ) = R ∪ X and V (R + ) = R ∪ Y .”
   The following lemma shows how the parameter h changes when we pass to a
subfamily of F .

Lemma 5.2 Let F be a family of disjoint subsets of V (H ) and F  ⊆ F a subfamily
with |F \ F  | = t. If R h-absorbs F then
  1. R h-absorbs
                    F .
  2. R ∪ S∈F \F  S (h − t)-absorbs F  .

Proof Part (1) is immediate from the definition of absorbing. For part (2), notice
that for any subfamily F  ⊆ F  of size h − t, the subfamily   
                                                           F ∪ (F \ F ) has
                                                                               

size
 h. Therefore   there is a matching with vertex set R ∪ S∈F  ∪(F \F  ) S = (R ∪
   S∈F \F  S) ∪ S∈F  S.                                                         □

   We build larger absorbers from smaller ones. The following lemma allows us to
take unions of 1-absorbers to get another 1-absorber.

Lemma 5.3 Suppose that     {R1 , . . . , Rt }, {X1 , . . . , Xt }, {Y1 , . . . , Yt } are three families
of disjoint sets with          Ri disjoint from
                                                      (Xi    ∪ Yi ). Suppose     that Ri 1-absorbs
{X
  i , Yi } for
               i = 1, . . . , t. Set Z =  (     X i ) ∩    (   Y  i ). Then,         Ri ∪ Z 1-absorbs
{ Xi \ Z, Yi \ Z}.

Proof By the definition of 1-absorbs we have matchings Ri− and Ri+ with vertices
                                                                                  
V (Ri− ) = Ri ∪ Xi and V (Ri+ ) = Ri ∪ Yi . Note that Ri− and Ri+ are matchings                     
                 . , Rt }, {X1 , . . . , Xt }, {Y
(since {R1 , . .                                            t } are families
                                               1 , .−. . , Y                  disjoint sets with
                                                                              of                    Ri
disjoint from (Xi ∪Yi )). Also V ( Ri ) = Ri ∪ Xi = ( Ri ∪Z)∪( Xi \Z)
                                                                                  −           +
and V ( Ri+ ) = Ri ∪ Yi = ( Ri ∪ Z)                          ∪ ( Yi \ Z). Thus  Ri and  Ri
are matchings satisfying the definition of “ Ri ∪ Z 1-absorbs { Xi \ Z, Yi \
Z}”.                                                                                                  □

   We state a technical consequence of the above lemma for later use.

Lemma 5.4 Suppose that we have distinct vertices a, b, c, d ∈ V (HG ), vertices
w1 , . . . , wk ∈ V (HG ) \ {a, b, c, d} and disjoint sets R0 , R1 , . . . , Rk−1 ⊆ V (HG ) \
{w1 , . . . , wk , a, b, c, d} with R0 1-absorbing {{a, w1 , b}, {a, wk , b}} and   Ri 1-
absorbing {wi , wi+1 } for i = 1, . . . , k − 1. Then, there is a subset R  ⊆ k−1  i=0 Ri ∪
{w1 , . . . , wk } which 1-absorbs {{a, b}, {c, d}}.
812                                                                           A. Müyesser, A. Pokrovskiy

Proof Without loss of generality, we can assume that w1 , . . . , wk are distinct (by pass-
ing to a subset of {w1 , . . . , wk } of distinct vertices, and a corresponding subfamily of
{R1 , . . . , Rk−1 }). Now, the lemma follows from Lemma 5.3 with {R0 , . . . , Rk },

                 {X0 , . . . , Xk } := {{a, w1 , b}, {w2 }, {w3 }, . . . , {wk }},

and

                 {Y1 , . . . , Yt } := {{c, wk , d}, {w1 }, {w2 }, . . . , {wk−1 }}.                 □

5.1.1 Constructing 1-absorbing sets

The following lemma shows that there are many edges through generic vertices in
HG .

Lemma 5.5 Let p ≥ n−1/700 . Let HG be a multiplication hypergraph, R 1 , R 2 , R 3
disjoint, symmetric p-random subsets of G and set R = RA 1 ∪ R 2 ∪ R 3 . With high
                                                                B     C
probability, the following holds:
   For any generic v ∈ V (HG ) and U ⊆ V (HG ) with |U | ≤ p 800 n/104000 , there is
an edge e of HG passing through v and having the other two vertices in R \ U .

Proof With high probability, Lemma 3.32 applies. We’ll just look at the case v ∈ GA ,
the other two cases are symmetric. Fix some generic v ∈ GA . Thinking of b as a
free variable, consider the set S = {b, b−1 v −1 } ⊆ G ∗ F1 . Note that this is a set of
linear elements with w = b, w  = b−1 v −1 separable (by (b) since v −1 is generic).
Lemma 3.32 now implies what we want.                                                  □

   The following is the basic building block for the absorbers that we construct. It
shows that we can 1-absorb sets of the form {[a, b]c, c}.

Lemma 5.6 Let p ≥ n−1/700 . Let HG be a multiplication hypergraph, R 1 , R 2 , R 3
disjoint, symmetric p-random subsets of G and set R = RA      1 ∪ R 2 ∪ R 3 . With high
                                                                    B      C
probability, the following holds:
   For any a, b, c ∈ GC with c, c−1 bab−1 a −1 , c−1 bab−1 , c−1 ba, c−1 b generic and
U ⊆ V (HG ) with |U | ≤ p 800 n/104010 , there is a set R  ⊆ R \ U of size ≤ 14 which
1-absorbs {[a, b]c, c}.

Proof With high probability, the properties of Lemmas 3.32 and 5.5 hold. Fix some
a, b, c ∈ GC with

                       c, c−1 bab−1 a −1 , c−1 bab−1 , c−1 ba, c−1 b

all being generic and U ⊆ V (HG ) with |U | ≤ p 800 n/104010 . First suppose that
[a, b] = e i.e. that [a, b]c = c. From Lemma 5.5 we know that there is an edge
f = {s, t, c} of HG with s, t ∈ R \ U . Then R  = {s, t} satisfies the lemma (with
both M − and M + for the definition of “1-absorbs” equal to the single edge f ).
   Now suppose [a, b] = e. Notice that this implies that a, b, bab−1 a −1 , bab−1 , ba,
 −1
b a −1 , ab−1 a −1 , ab−1 = e also. Thinking of x, y, z as free variables in G ∗ F3 ,
A random Hall-Paige conjecture                                                                          813




Fig. 2 The set S ⊆ G ∗ F3 in Lemma 5.6. Black letters x, y, z are free variables, while pink letters are
elements of G. The two elements [a, b]c, c are not part of S (and are just pictured to show how S 1-absorbs
{[a, b]c, c}) (Color figure online)




Fig. 3 Proofs for weak/strong separability and linearity of all pairs w, w ∈ S in Lemma 5.6 to jus-
tify the application of Lemma 3.32. For strong separability, first we have partitioned S into five sub-
sets S = Sx ∪ Sx,y ∪ Sx,z ∪ Sz ∪ Sy based on which free variables appear in each w ∈ S (as in Ob-
servation 3.24). By Observation 3.24, any w, w in different subsets are strongly separable by part (a)
of the definition. For each of the sets Sx , Sx,y , Sx,z , Sz , Sy we give a table explaining why the w,
w in that set are strongly/weakly-separable. Note that for words coming from different SA /SB /SC
we need to show strong separability, but for words coming from the same part, weak separabil-
ity suffices. Blue cells represent w, w being strongly separable via part (b) of the definition, green
cells represent w, w being weakly separable via part (b’), and grey cells represent w, w not be-
ing separable/weakly-separable. The group element inside each blue cell is a generic element g so that
w ∈ {gw, g −1 w, gw−1 , g −1 w−1 , wg, wg −1 , w−1 g, w−1 g −1 } (thus checking (b) for w, w ). The group
element inside the green cells is a non-identity element g so that w = w rearranges into e = g (thus check-
ing (b’) for w, w ). Observe that green cells are used only between pairs of words coming from the same
part of SA /SB /SC , meaning that we have strong separation for pairs of words coming from different parts
SA /SB /SC , as needed. To see that every s ∈ S is linear notice that every word pictured has no repetitions
of black letters (Color figure online)


consider the set S given in Fig. 2, with partition S = SA ∪ SB ∪ SC . Notice that
all words in S are linear, all pairs of words weakly-separable, and SA , SB , SC are
pairwise strongly separable (see Fig. 3 for justification). Using Lemma 3.32, there is
some projection π : G ∗ F3 → G which separates S and has π(S) ⊆ R \ U . Any such
π(S) 1-absorbs {[a, b]c, c} (using the red/blue matchings in Fig. 2).               □

   The following lemma is identical to the previous one, except that it weakens the
assumption on what elements are generic.
814                                                                     A. Müyesser, A. Pokrovskiy

Lemma 5.7 Let p ≥ n−1/700 . Let HG be a multiplication hypergraph, R 1 , R 2 , R 3
disjoint, symmetric p-random subsets of G and set R = RA       1 ∪ R 2 ∪ R 3 . With high
                                                                    B     C
probability, the following holds:
   For any a, b, x ∈ GB with x, x[a, b] generic and U ⊆ V (HG ) with |U | ≤
p 800 n/104020 , there is a set R  ⊆ R \ U of size ≤ 16 which 1-absorbs {x[a, b], x}.

Proof With high probability, the properties of Lemmas 3.32, 5.5 and 5.6 hold.
Fix some a, b, x ∈ GB with x, x[a, b] generic and U ⊆ V (HG ) with |U | ≤
p 800 n/104020 . As in Lemma 5.6, the conclusion trivially follows from Lemma 5.5
if [a, b] = e, so assume that this doesn’t happen. With v the free variable in
G ∗ F1 , consider the sets of words T := {v, [b, a]x −1 v −1 , x −1 v −1 } and S =
{x −1 v −1 , vxaba −1 b−1 , vxaba −1 , vxab, vxa}. Define TA = {v}, TB = ∅, TC =
{[b, a]x −1 v −1 , x −1 v −1 } to get a partition of T . It is easy to check that all w ∈ T ∪ S
are linear (since v appears precisely once in each w ∈ T ∪ S), that TA , TC are strongly
separable (by part (b) of the definition, using that x, x[a, b] are generic), and that
[b, a]x −1 v −1 , x −1 v −1 are weakly separable (since [b, a]x −1 v −1 = x −1 v −1 rear-
ranges into [b, a] = e). By Lemma 3.32, there is a projection π which separates
T ∪ S and has π(T ∪ S) ⊆ R \ (U ∪ N (G)). Since TA , TB , TC are pairwise strongly
separable, we additionally get π(TA ) ⊆ RA        1 , π(T ) ⊆ R 2 , π(T ) ⊆ R 3 . Combining
                                                          B        B      C      C
this with the fact that all vertices in π(T ) are distinct (which comes from all pairs
of words in T being weakly separable, and so π(t) = π(t  ) for distingt t, t  ∈ T ), we
have that e− = (π(v), x[a, b], [b, a]x −1 π(v)−1 ) and e+ = (π(v), x, x −1 π(v)−1 ) are
edges of HG contained in R ∪ {x, x[a, b]}.
   Using Lemma 5.6 with a  = b, b = a, c = x −1 π(v −1 ) we find a set Q dis-
joint from U ∪ π(T ) which 1-absorbs {[b, a]x −1 π(v)−1 , x −1 π(v)−1 } (all the re-
quired elements are generic for that lemma as a consequence of π(S) ∩ N (G) = ∅).
Now Q ∪ π(T ) 1-absorbs {x[a, b], x}. This can be seen directly or by first noticing
that {π(v)} 1-absorbs {{x[a, b], [b, a]x −1 π(v)−1 }, {x, x −1 π(v)−1 }} (the single-edge
matchings e− , e+ witness this). Then Lemma 5.3 shows that Q ∪ π(T ) 1-absorbs
{x[a, b], x}.                                                                                □

   For two sets X, Y ⊆ G and s ∈ G, use XsY to denote {xsy : x ∈ X, y ∈ Y }. The
following lemma lets us 1-absorb a pair of size 3 sets.

Lemma 5.8 Let p ≥ n−1/700 . Let HG be a multiplication hypergraph, R 1 , R 2 , R 3
disjoint, symmetric p-random subsets of G and set R = RA       1 ∪ R 2 ∪ R 3 . With high
                                                                    B     C
probability, the following holds:
   For any distinct, generic a, b, c, d ∈ GB and X, Y, U ⊆ V (HG ) with |U | ≤
p 800 n/104000 , |X|, |Y | ≤ 5, there is a R  ⊆ R \ U of size 6 and s with XsY ⊆
R \ (U ∪ R  ) such that R  1-absorbs {{a, dsc, b}, {c, bsa, d}}.

Proof With high probability, the property of Lemma 3.32 holds. Suppose we
have generic a, b, c, d ∈ GB and X, Y, U ⊆ V (HG ) with |U | ≤ p 800 n/104000 , |X|,
|Y | ≤ 5. Let X  = X ∪ {b, d}, Y  = Y ∪ {a, c}. For free variables u, w, con-
sider the sets of words S = {u, a −1 u−1 , c−1 u−1 , w, b−1 w −1 , d −1 w −1 } with SA =
{u, b−1 w −1 , d −1 w −1 }, SB = ∅, SC = {w, a −1 u−1 , c−1 u−1 }. Notice that all words
A random Hall-Paige conjecture                                                                           815




Fig. 4 Justification for linearity and separability of pairs (w, w ) in S in Lemma 5.8. For separability,
first split S into Su = {u, a −1 u−1 , c−1 u−1 }, Sw = {w, b−1 w−1 , d −1 w−1 } based on which free variables
appear in the elements (as in Observation 3.24). By Observation 3.24, pairs (w, w ) with w, w in different
sets Su /Sw fall under part (a) of the definition of strongly separable, so it remains to check pairs inside
Su and Sw . Justification for this is given in the two tables above (with the same conventions as in Fig. 3,
in particular, green cells are used only between pairs of vertices coming from the same part SA /SB /SC ).
Relevant elements are generic/non-identity as a consequence of a, b, c, d being distinct and generic). To
see that each w ∈ S is linear, note that there are no repetitions of black letters in each w (and each w ∈ S
contains at least one black letter) (Color figure online)




Fig. 5 The set of words S ⊆ G ∗ F2 for Lemma 5.8. First, second, and third row of words represent SA ,
SB , and SC , respectively. Black letters u, w are free variables of F2 , while pink letters are elements of
G. The elements a, b, c, d, bwua, dwuc are not part of S (and are pictured just to demonstrate how the
absorption works) (Color figure online)


in S ∪ (X  wuY  ) are linear, all pairs of words in S are weakly separable (see
Fig. 4), and SA , SB , SC are pairwise strongly separable. Also the pair of sets
(S, X  wuY  ) is strongly separable (using part (a) of the definition of separable).
By Lemma 3.32, there is some projection π separating S ∪ (X  wuY  ) and having
S ∪ (X  wuY  ) ⊆ R \ U . For any such projection, R  = π(S) and s := π(wu) sat-
isfy the lemma (with the red/blue matchings in Fig. 5 satisfying the definition of
R  1-absorbing {{a, dsc, b}, {c, bsa, d}}. Note that this works regardless of whether
dwuc = bwua or not).                                                                □

     The following technical lemma allows us to 1-absorb certain pairs of sets of size
2.

Lemma 5.9 Let p ≥ n−1/700 . Let HG be a multiplication hypergraph, R 1 , R 2 , R 3
disjoint, symmetric p-random subsets of G and set R = RA      1 ∪ R 2 ∪ R 3 . With high
                                                                    B    C
probability, the following holds:
   For any g, x, y, a, b ∈ GB with yg, x, y, x[a, b]g distinct, generic and U ⊆
V (HG ) with |U | ≤ p 800 n/104030 , there is a set R  ⊆ R \ U of size ≤ 60 which 1-
absorbs {{yg, x}, {y, x[a, b]g}}.

Proof With high probability, the properties of Lemmas 5.7 and 5.8 hold. Let
g, x, y, a, b and U be as in the lemma. Fix a  = yg, b = x, c = y, d  =
816                                                                             A. Müyesser, A. Pokrovskiy

x[a, b]g and note these are distinct and generic by assumption. Define X =
{x, x[a, b]g, x[a, b], x[a, b]yg, e}, Y = {yg, y, g[a, b], yg[a, b], e}. By Lemma 5.8,
we get R  and s with R0 ∪ (XsY ) ⊆ V (HG ) \ (U ∪ N (G) ∪ {a  , b , c , d  }) with R0
1-absorbing {{a  , d  sc , b }, {c , b sa  , d  }}.
    Define w1 = d  sc = x[a, b]gsy = x[a, b]ygs[y, gs], w2 = x[a, b]ygs = x[a,
b]syg[s, yg], w3 = x[a, b]syg = xsyg[a, b][syg, [a, b]], w4 = xsyg[a, b], and w4 =
b sa  = xsyg, noting that all of these are in XsW and so are generic and dis-
joint from R0 ∪ {a  , b , c , d  }. So we can use Lemma 5.7 to find disjoint sets
R1 , R2 , R3 , R4 ⊆ R \ (R  ∪ U ) with Ri 1-absorbing {wi , wi+1 }. We also have     R0 1-
absorbing {{a  , w1 , b }, {c , w5 , d  }}. By Lemma 5.4, there is a subset R  ⊆ 4i=0 Ri ∪
{w1 , w2 , w3 , w4 , w5 } which 1-absorbs {{a  , b }, {c , d  }}.                        □

      The following lemma gives us a collection of distinct, generic elements.

Lemma 5.10 Let p ≥ n−1/700 and t ≤ p 800 n/104020 . Let G be a group and R a
symmetric p-random subset. With high probability, the following holds:
    Let g1 , . . . , gt = e be distinct and U ⊆ G with |U | ≤ p 800 n/104020 . There are
y1 , . . . , yt−1 ∈ G such that the elements y1 , y2 , . . . , yt−1 , y1 g2 , y2 g3 , . . . , yt−1 gt are
distinct, generic elements in R \ U .

Proof Lemma 3.32 applies with RA = R, and RB , RC arbitrary disjoint symmetric
p-random subsets (which won’t be used in the proof). Let g1 , . . . , gt = e be distinct
and U ⊆ G with |U | ≤ p 800 n/104020 . Thinking of y as the free variable in G ∗ F1 , let
Si = {y, ygi }. Note all w, w  ∈ Si are linear and strongly separable (by part (b) since
gi is generic). For i = 1, . . . , t, use Lemma 3.32 to pick projections
                                                                    π1 , . . . , πi such
that πi (Si ) is separated and disjoint from U  := U ∪ N (G) ∪ j <i πj (Sj ) (noting
that |U  | ≤ |U | + |N (G)| + 2t ≤ 3p 800 n/104020 + 109000 ≤ n/104010 ). Now y1 =
π1 (y), . . . , yt−1 = πt−1 (y) satisfy the lemma.                                     □

  The following theorem of Gallagher is key to our approach and shows that ele-
ments of the commutator subgroup can be written as a product of a small number of
commutators. Its proof uses character theory.

Theorem 5.11 (Gallagher, [29]) Let G be a group. Any g ∈ G can be written as g =
 t                                                  
  i=1 [ai , bi ] for some ai , bi ∈ G and t ≤ log4 |G | ≤ 10 log n.

   We now prove one of the main lemmas in this section. It strengthens several earlier
lemmas and shows that we can 1-absorb any pair of elements as long as they are in
the same coset of G .

Lemma 5.12 Let p ≥ n−1/700 . Let HG be a multiplication hypergraph, R 1 , R 2 , R 3
disjoint, symmetric p-random subsets of G and set R = RA        1 ∪ R 2 ∪ R 3 . With high
                                                                     B     C
probability, the following holds:
   For any generic h, k ∈ GA , GB , or GC with [h] = [k] and U ⊆ V (HG ) with |U | ≤
p 800 n/104040 , there is a set R  ⊆ R \ U of size ≤ 400 log n which 1-absorbs {h, k}.
A random Hall-Paige conjecture                                                                      817

Proof With high probability, the properties of Lemmas 5.5, 5.7, 5.9, and 5.10 hold.
We just prove the lemma for h, k ∈ GB , the other two cases follow by symmetry. Let
h, k ∈ GB be generic with [h] = [k] and U ⊆ V (HG ) with |U | ≤ p 800 n/104040 . As
in Lemma 5.6, the conclusion trivially follows from Lemma 5.5 if h = k,         so assume
h = k. Write h = kg for some g ∈ G . By Theorem 5.11, we have g = ti=1 [ai , bi ]
for some ai , bi ∈ G and t ≤ 10 log n. Assume this product     is as short as possible i.e.
that t is minimal. For each s = 0, . . . , t − 1, define gs = ti=s [ai , bi ]. By minimality
of t, we have [ai , bi ] = e and gi = e for all i. Set y0 = k and note that y0 , y0 g1 are
distinct, generic (since k, h are distinct, generic).
    Note that t ≤ 10 log n ≤ n1/8 /104010 ≤ p 800 n/104010 (using that n is large which
follows from “with high probability”). Use Lemma 5.10 with U  = U ∪ {y0 , y0 g1 } to
get elements y1 , . . . , yt−1 , noting that now

                           y0 , y1 , . . . , yt−1 , y0 g1 , y1 g2 , . . . , yt−1 gt

are distinct, generic. U  = U ∪ {yi , yi gi+1 : i = 1, . . . , t − 1}. Using Lemma 5.9 with
y = yi , x = yi−1 , g = gi+1 , a = ai , b = bi for all i (the conditions “yi gi+1 , yi−1 , yi ,
yi−1 [ai , bi ]gi+1 distinct, generic” coming from Lemma 5.10), gives a set Ri which 1-
absorbs {{yi gi+1 , yi−1 }, {yi , yi−1 [ai , bi ]gi+1 }} = {{yi gi+1 , yi−1 }, {yi , yi−1 gi }}. Us-
ing Lemma 5.7 with x = yt−1 , a = at , b = bt (condition “yt−1 , yt−1 [at , bt ] generic”
coming from Lemma 5.10), gives a set Rt which 1-absorbs {yt−1 [at , bt ], yt−1 } =
{yt−1 gt , yt−1 }. By enlarging the set U during the application of these lemmas,
we can assume that R1 , . . . , Rt−1 , Rt , {yi , yi gi+1 : i = 1, . . . , t − 1} are all disjoint
(there’s space to do this because |R1 ∪ · · · ∪ Ri−1 | ≤ 400 log n < 10800 n1/8 /104020 ≤
p 800 n/104030 ).
    Set R = R1 ∪ · · · ∪ Rt−1 ∪ Rt ∪ {yi , yi gi+1 : i = 1, . . . , t − 1}. Set Xi =
{yi gi+1 , yi−1 }, Yi = {yi , yi−1 gi } for i = 1, . . . , t − 1, and Xt = {yt−1 }, Yt = {yt−1 gt }.
Notice that the sets   in the families {R1 , .   . . , Rt−1                    }, {Y1 , . .
                                                             }, {X1 , . . . , Xt−1           . , Yt−1 }
are disjoint, that       Ri is disjoint from           Xi ,     Yi and that ( Xi ) ∩ ( Yi ) =
{yi , yi gi+1 : i = 1, . . . , t − 1}. By Lemma 5.3 R 1-absorbs {y0 g1 , y0 } = {kg, k} =
{h, k}.                                                                                              □

   The following lemma is similar to the previous one, except it allows us to 1-absorb
pairs of sets of size 2.

Lemma 5.13 Let p ≥ n−1/700 . Let HG be a multiplication hypergraph, R 1 , R 2 , R 3
disjoint, symmetric p-random subsets of G and set R = RA        1 ∪ R 2 ∪ R 3 . With high
                                                                       B    C
probability, the following holds:
   For any distinct, generic a, b, c, d ∈ GA , GB , or GC with [ab] = [cd] and U ⊆
V (HG ) with |U | ≤ p 800 n/104050 , there is a set R  ⊆ R \ U of size ≤ 500 log n which
1-absorbs {{a, b}, {c, d}}.

Proof With high probability, the properties of Lemmas 5.8 and 5.12 hold. We just
prove the lemma for a, b, c, d ∈ GB . The other two cases follow by symmetry. Sup-
pose that we have distinct, generic a, b, c, d ∈ B(HG ) with [ab] = [cd], and U ⊆ G
with |U | ≤ p 800 n/1021 . Let X = {d, b}, Y = {c, a}. Using Lemma 5.8, pick some R  ,
s with R  ∪ XsY ⊆ R \ (U ∪ N (G)) and R  1-absorbing {{a, dsc, b}, {c, bsa, d}}.
818                                                                        A. Müyesser, A. Pokrovskiy

When dsc = bsa, R  ∪ dsc 1-absorbs {{a, b}, {c, d}} and so satisfies the lemma.
So suppose dsc = bsa. Notice that [ab] = [cd] implies [bsa] = [dsc] and so using
Lemma 5.12 we can choose a Q ⊆ V (HG ) \ (U ∪ R  ∪ {dsc, bsa}) which 1-absorbs
{bsa, dsc} (bsa, dsc are generic because they are contained in XsC). Set R  =
R  ∪ Q ∪ {bsa, dsc} to get a set which 1-absorbs {{a, b}, {c, d}} by Lemma 5.3. □

5.1.2 Distributive absorption for pairs

In this section we prove a variety of lemmas about h-absorbing sets of the form
{{a1 , b1 }, . . . , {ak , bk }} where [a1 b1 ] = · · · = [ak bk ]. The following does this for h =
k − 1.

Lemma 5.14 Let p ≥ n−1/700 . Let HG be a multiplication hypergraph, R 1 , R 2 , R 3
disjoint, symmetric p-random subsets of G and set R = RA        1 ∪ R 2 ∪ R 3 . With high
                                                                       B      C
probability, the following holds:
    Let k ≤ 200 and x1 , y1 , . . . , xk , yk ∈ GA , GB or GC be distinct, generic with
[x1 y1 ] = · · · = [xk yk ] and let U ⊆ G with |U | ≤ p 800 n/104060 . Then there is a set
R  ⊆ R \ U of size ≤ 600k log n which (k − 1)-absorbs {{x1 , y1 }, . . . , {xk , yk }}.

Proof With high probability, the property of Lemma 5.13 holds. Let x1 , y1 , . . . , xk , yk
be distinct, generic with [x1 y1 ] = · · · = [xk yk ] and let U ⊆ G with |U | ≤ p 800 n/
104060 . Apply the property of Lemma 5.12 to get disjoint sets R1 , . . . , Rk−1 ⊆ R \ U
              {{xi , yi }, {xi+1 , yi+1 }} for each i ∈ [k − 1] (for disjointness use
which 1-absorb
U  = U ∪ i−1  j =1 Rj at each application. This set has size ≤ |U | + k500 log n ≤
p 800 n/104060 ). Set R  = R1 ∪ · · · ∪ Rk−1 . For each i, we have matchings Ri−
and Ri+ with vertex sets Ri ∪ {xi , yi } and Ri ∪ {xi+1 , yi+1 }. Now the matchings
                −     |Y |−1 +                                           
Mi = ( i−1j =1 Ri ) ∪ ( j =i Ri ) have vertex sets exactly V (Mi ) = R ∪ Y \ {xi , yi },
and so they satisfy the definition of R  (k − 1)-absorbing Y .                           □

   We’ll need the following lemma which finds a common neighbour of a set of
vertices in Hk .

Lemma 5.15 Let p ≥ n−1/700 and let HG be a multiplication hypergraph, R 1 , R 2 , R 3
disjoint, symmetric p-random subsets of G and set R = RA         1 ∪ R 2 ∪ R 3 . With high
                                                                           B     C
probability, the following holds:
   Let k ≤ 200 and a1 , . . . , ak ∈ GA be distinct and generic and let U ⊆ V (HG ) with
|U | ≤ p 800 n/104001 . Then there are distinct, generic b, c1 , . . . , ck ∈ G \ U such that
for each i, {ai , b, ci } is an edge of HG .

Proof With b the free variable in G ∗ F1 , consider the set S = {b, b−1 a1−1 , . . . ,
b−1 ak−1 }, SA = ∅, SB = {b}, SC = {b−1 a1−1 , . . . , b−1 ak−1 }. Notice that all w ∈ S are
linear, that SA , SB , SC are pairwise separable (by part (b) of the definition since
a1 , . . . , ak are generic), and all w, w  ∈ SC are weakly separable (by (b’) since equal-
ities between w, w  rearrange to e = ai aj−1 and we know ai aj−1 = e by distinctness).
Thus the lemma follows from Lemma 3.32 applied with U  = U ∪ N (G).                      □
A random Hall-Paige conjecture                                                                    819

   The following lemma 1-absorbs a set of k pairs.

Lemma 5.16 Let p ≥ n−1/700 . Let HG be a multiplication hypergraph, R 1 , R 2 , R 3
disjoint, symmetric p-random subsets of G and set R = RA          1 ∪ R 2 ∪ R 3 . With high
                                                                        B     C
probability, the following holds:
   Let k ≤ 200 and x1 , y1 , . . . , xk , yk ∈ GA be distinct, generic with [x1 y1 ] = · · · =
[xk yk ] and let U ⊆ G with |U | ≤ p 800 n/104070 . Then there is a set R  ⊆ R of size
≤ 600k log n which 1-absorbs {{x1 , y1 }, . . . , {xk , yk }}.

Proof With high probability, the conclusions of Lemmas 5.15 and 5.14 apply. Let
x1 , y1 , . . . , xk , yk ∈ GA be distinct, generic with [x1 y1 ] = · · · = [xk yk ] and let
U ⊆ G with |U | ≤ p 800 n/104070 . Use the conclusion of Lemma 5.15 twice to
                                          y           y
get elements bx , by and c1x , c1 , . . . , ckx , ck outside U , such that x1 , y1 , . . . , xk , yk ,
                     y            y                                                              y
                x            x
bx , by , c1 , c1 , . . . , ck , ck are all distinct, generic and also xi bx cix , yi by ci are
edges for all i (to get distinctness of all the vertices, enlarge U to include pre-
viously found vertices between the two applications). Notice that this implies
that [cix ci ] = [xi−1 bx−1 yi−1 by−1 ] = [x1−1 bx−1 y1−1 by−1 ] for all i (using [x1 y1 ] = · · · =
              y

[xk yk ]). Thus using the conclusion of Lemma 5.14, we get a set R which (k − 1)-
                       y              y
absorbs {{c1x , c1 }, . . . , {ckx , ck }}. In other words we have matchings M1 , . . . , Mk with
V (Mi ) = R ∪ {{cjx , cj } : j = i}. Set R  = R  ∪ {bx , by , c1x , c1 . . . , ckx , ck }. Now for
                             y                                             y              y

each i, Mi ∪ {xi bx cix , yi by ci } is a matching with vertex set exactly R  ∪ {xi , yi },
                                       y

verifying the definition of “1-absorbs”.                                                            □

   The below was shown by Montgomery in [46], and is the essence of the distribu-
tive absorption approach.

Lemma 5.17 (Montgomery, [46]) There is a constant h0 such that for every h ≥ h0
there exists a bipartite graph K with maximum degree at most 100 and vertex classes
X and Y ∪ Y  with |X| = 3h, |Y | = |Y  | = 2h, so that the following holds. For any
Y0 ⊆ Y  with |Y0 | = h, there is a perfect matching between X and Y ∪ Y0 .

  Graphs produced by this lemma are called robustly matchable bipartite graphs.
Combining this lemma with the previous one, we can h-absorb sets of pairs.

Lemma 5.18 Let p ≥ n−1/700 . Let HG be a multiplication hypergraph, R 1 , R 2 , R 3
disjoint, symmetric p-random subsets of G and set R = RA                 1 ∪ R 2 ∪ R 3 . With high
                                                                               B    C
probability, the following holds:
   Consider sets Y , Y  of disjoint pairs of generic elements (a1 , a2 ) ∈ (A \ e) × (A \
e) having [a1 a2 ] = [a1 a2 ] for (a1 , a2 ), (a1 , a2 ) ∈ Y, Y  and also 2h = |Y | = |Y | ≤
   p 800 n
104080 log n
             . Let U ⊆ G with |U | ≤ p 800 n/104080 . Then there is a subset R  ⊆ R \ U of
size ≤ 800|Y | log n such that R  ∪ Y  h-absorbs Y .

Proof With high probability the property of Lemma 5.16 holds.
     Let Y , Y  be disjoint sets of pairs of elements (a1 , a2 ) ∈ A × A having [a1 a2 ] =
                                                                            p 800 n
[a1 a2 ] for (a1 , a2 ), (a1 , a2 ) ∈ Y and also 2h := |Y | = |Y | ≤ 104080 log n
                                                                                       . Let U ⊆ G
820                                                                          A. Müyesser, A. Pokrovskiy

with |U | ≤ p 800 n/104080 . Consider a robustly matchable bipartite graph D with
Δ(D) ≤ 100 whose sets are Y , Y  and X as in Lemma 5.17 (here X is just an abstract
set of size 3h unrelated to the hypergraph we have). For all x ∈ X use Lemma 5.16
to pick a set Rx ⊆ R \ (U ∪ Y ∪ Y  ) which 1-absorbs N (x). We can choose all these
sets to be disjoint by enlarging U to contain the union of previously picked sets at
each application   (whose total size is at most 100|X| × 700 log n ≤ p 800 n/104070 ).
                                            
    Letting R x∈X Rx we claim that R ∪ Y  will h-absorb Y , and so satisfy the
lemma. Let Y0 ⊆ Y be a set of |Y |/2 = h pairs. Since D is robustly matchable, there
is a matching M with vertex set Y0 ∪ Y  ∪ X. For each x ∈ X, let xyx be the matching
edge of M through x, and let Nx be a matching         with vertex set Rx ∪ yx (which
exists because Rx 1-absorbs N (x)). Now x∈X Nx is a matching with vertex set
Y0 ∪ R  ∪ Y  .                                                                        □

   The following is a version of the previous lemma with more versatility with choos-
ing h.

Lemma 5.19 Let p ≥ n−1/700 . Let HG be a multiplication hypergraph, R 1 , R 2 , R 3
disjoint, symmetric p-random subsets of G and set R = RA                 1 ∪ R 2 ∪ R 3 . With high
                                                                               B       C
probability, the following holds:
   Consider sets Y , Z of disjoint pairs of generic elements (a1 , a2 ) ∈ A × A having
                                                                              p 800 n
[a1 a2 ] = [a1 a2 ] for (a1 , a2 ), (a1 , a2 ) ∈ Y, Z and 4|Y | ≤ |Z| = 104090 log n
                                                                                         . Let h ∈ N.
Let U ⊆ G with |U | ≤ p 800 n/104090 . Then there is a subset R  ⊆ R \ U , Y  ⊆ Z of
size ≤ 800|Y | log n such that R  ∪ Y  h-absorbs Y .

Proof With high probability Lemma 5.18 applies. If h > |Y |, then the definition of
“h-absorbs Y ” is vacuous, so we can suppose that h ≤ |Y |. If |Y |/2 ≤ h ≤ |Y |, pick
subsets Ŷ , Y  ⊆ Z with |Ŷ | = 2h − |Y | and |Y  | = 2h. Apply Lemma 5.18 to g, Y ∪ Ŷ ,
Y  , and h to get a set R  such that R  ∪ Y  h-absorbs Y ∪ Ŷ . By Lemma 5.2 (1), R  ∪ Y 
h-absorbs Y also.
     If h ≤ |Y |/2, pick subsets Ŷ , Y  ⊆ Z with |Ŷ | = |Y | − 2h and |Y  | = 2|Y | − 2h.
Apply Lemma 5.18 to g, Y ∪ Ŷ , Y  , and h = |Y | − h to get a set R  such that R  ∪ Y 
(|Y | − h)-absorbs Y ∪ Ŷ . By Lemma 5.2 (2) with t = |Ŷ | = |Y | − 2h, R  ∪ Y  ∪ Ŷ
(|Y | − h − |Ŷ |)-absorbs Y . This implies the lemma since |Y | − h − |Ŷ | = h.           □

5.1.3 Distributive absorption for singletons

Everything in this section is almost identical to the previous one (though often a bit
easier). We give constructions of h-absorbers of sets of vertices Y contained in a coset
of G . The following lemma does this with h = |Y | − 1.

Lemma 5.20 Let p ≥ n−1/700 . Let HG be a multiplication hypergraph, R 1 , R 2 , R 3
disjoint, symmetric p-random subsets of G and set R = RA     1 ∪ R 2 ∪ R 3 . With high
                                                                    B     C
probability, the following holds:
    For g ∈ G, let Y ⊆ GA , GB , or GC with Y ⊆ [g] be a set of generic elements
               p 800 n
with |Y | ≤ 104100 log n
                         and let U ⊆ G with |U | ≤ p 800 n/104100 . Then there is a set
R  ⊆ R \ U of size ≤ 700|Y | log n which (|Y | − 1)-absorbs Y .
A random Hall-Paige conjecture                                                                        821

Proof With high probability, the property of Lemma 5.12 holds.
                                                               p 800 n
   Let g ∈ G and Y = {y1 , . . . , y|Y | } ⊆ [g] with |Y | ≤ 104100 log n
                                                                          and U with |U | ≤
p 800 n/1017 . Apply the property of Lemma 5.12 to get disjoint sets R1 , . . . , R|Y |−1 ⊆
                                                                         
R \ U which 1-absorb {yi , yi+1 } (for disjointness use U  = U ∪ i−1       j =1 Rj at each
application. This set has size ≤ |U | + |Y |500 log n ≤ p n/10
                                                             800     4090 ). Set R  = R1 ∪
                                                   −         +
· · · ∪ R|Y |−1 . For each i, we have matchings Ri and Ri with vertex sets Ri ∪ {yi }
                                                         −      |Y |−1 +
and Ri ∪ {yi+1 }. Now the matchings Mi = ( i−1      j =1 Ri ) ∪ ( j =i Ri ) have vertex
sets exactly V (Mi ) = R  ∪ Y \ {yi }, and so they satisfy the definition of R  (|Y | − 1)-
absorbing Y .                                                                              □

   The next lemma builds 1-absorbers of small sets Y .

Lemma 5.21 Let p ≥ n−1/700 . Let HG be a multiplication hypergraph, R 1 , R 2 , R 3
disjoint, symmetric p-random subsets of G and set R = RA         1 ∪ R 2 ∪ R 3 . With high
                                                                        B       C
probability, the following holds:
   Let k ≤ 200 and s1 , . . . , sk ∈ GA be distinct, generic with [s1 ] = · · · = [sk ] and let
U ⊆ G with |U | ≤ p 800 n/104110 . Then there is a set R  ⊆ R \ U of size ≤ 700k log n
which 1-absorbs {s1 , . . . , sk }.

Proof With high probability, the conclusions of Lemmas 5.15 and 5.20 apply. Let
s1 , . . . , sk ∈ G be distinct, generic with [s1 ] = · · · = [sk ] and let U ⊆ G with |U | ≤
p 800 n/104110 . Use the conclusion of Lemma 5.15 to get distinct, generic elements
b and c1 , . . . , ck ∈ G \ U , such that also si bci are edges for all i. Thus using the
conclusion of Lemma 5.20, we get a set R which (k − 1)-absorbs {c1 , . . . , ck }. From
the definition of (k − 1)-absorbs, we have matchings M1 , . . . , Mk with V (Mi ) =
R ∪ {c1 , . . . , ci−1 , ci+1 , . . . , ck }. Set R  = R  ∪ {b, c1 , . . . , ck }. Now for each i, Mi ∪
si bci is a matching with vertex set exactly R  ∪ {si }, verifying the definition of “1-
absorbs”.                                                                                                □

   The next lemma uses distributive absorption to build h-absorbers.

Lemma 5.22 Let p ≥ n−1/700 . Let HG be a multiplication hypergraph, R 1 , R 2 , R 3
disjoint, symmetric p-random subsets of G and set R = RA           1 ∪ R 2 ∪ R 3 . With high
                                                                        B      C
probability, the following holds:
   Let g ∈ G, and consider disjoint sets Y, Y  ⊆ [g] of generic elements of GA of size
                        p 800 n
2h := |Y | = |Y  | ≤ 104120 log n
                                   . Let U ⊆ G with |U | ≤ p 800 n/104120 . Then there is are
subset R  ⊆ R \ U of size ≤ 105 |Y | log n such that R  ∪ Y  h-absorbs Y .

Proof With high probability the property of Lemma 5.21 holds. Let g ∈ G, every
                                                          p 800 n
disjoint sets Y, Y  ⊆ [g] of size 2h = |Y | = |Y  | ≤ 104120 log n
                                                                     . Let U ⊆ G with |U | ≤
p 800 n/104120 . Consider a robustly matchable bipartite graph D with Δ(D) ≤ 100
whose sets are Y , Y  and X as in Lemma 5.17 (here X is just an abstract set of size
3h unrelated to the hypergraph we have). For all x ∈ X fix a set Rx ⊆ R which 1-
absorbs N(x). We can choose all these sets to be disjoint by letting U be the union
822                                                                     A. Müyesser, A. Pokrovskiy

of previously picked sets at each application (whose total size is at most 100|X| ×
700 log n ≤ p 800 n/104110 ).
   We claim that for R  := x∈X Rx , we have R  ∪ Y  h-absorbing Y , and so satisfy-
ing the lemma. Let Y0 ⊆ Y be a set of |Y |/2 = h pairs. Since D is robustly matchable,
there is a matching M with vertex set Y0 ∪ Y  ∪ X. For each x ∈ X, let xyx be the
matching edge of M through x, and let Nx be amatching with vertex set Rx ∪ yx
(which exists because Rx 1-absorbs N (x)). Now x∈X Nx is a matching with vertex
set Y0 ∪ R  ∪ Y  .                                                                □

    The next lemma is a version of the previous one which allows for more flexibility
in the value of h.

Lemma 5.23 Let p ≥ n−1/700 . Let HG be a multiplication hypergraph, R 1 , R 2 , R 3
disjoint, symmetric p-random subsets of G and set R = RA       1 ∪ R 2 ∪ R 3 . With high
                                                                       B    C
probability, the following holds:
   Let g ∈ G, and consider disjoint sets Y, Z ⊆ [g] of generic elements of GA with
                  p 800 n
4|Y | ≤ |Z| = 104130  log n
                            . Let h ∈ N. Let U ⊆ G with |U | ≤ p 800 n/104130 . Then there
is are subset R  ⊆ R \ U , Y  ⊆ Z of size ≤ 105 |Y | log n such that R  ∪ Y  h-absorbs
Y.

Proof With high probability Lemma 5.22 applies. If h > |Y |, then the definition of
“h-absorbs Y ” is vacuous, so we can suppose that h ≤ |Y |. If |Y |/2 ≤ h ≤ |Y |, pick
subsets Ŷ , Y  ⊆ Z with |Ŷ | = 2h − |Y | and |Y  | = 2h. Apply Lemma 5.22 to g, Y ∪ Ŷ ,
Y  , and h to get a set R  such that R  ∪ Y  h-absorbs Y ∪ Ŷ . By Lemma 5.2 (1), R  ∪ Y 
h-absorbs Y also.
     If h ≤ |Y |/2, pick subsets Ŷ , Y  ⊆ Z with |Ŷ | = |Y | − 2h and |Y  | = 2|Y | − 2h.
Apply Lemma 5.22 to g, Y ∪ Ŷ , Y  , and h = |Y | − h to get a set R  such that R  ∪ Y 
(|Y | − h)-absorbs Y ∪ Ŷ . By Lemma 5.2 (2) with t = |Ŷ | = |Y | − 2h, R  ∪ Y  ∪ Ŷ
(|Y | − h − |Ŷ |)-absorbs Y . This implies the lemma since |Y | − h − |Ŷ | = h.           □

5.1.4 Main absorption lemma

The following lemma summarises everything from Sect. 5.1 that we use in other
sections.

Lemma 5.24 Let p ≥ n−1/700 . Let HG be a multiplication hypergraph, R 1 , R 2 , R 3
disjoint, symmetric p-random subsets of G and set R = RA     1 ∪ R 2 ∪ R 3 . With high
                                                                      B    C
probability, the following holds:
   Let U ⊆ G with |U | ≤ p 800 n/104140 . Let ∗ ∈ {A, B, C}. Suppose that Y and h are
one of the following:
                                                          800  |
 (1) For some g ∈ G, Y ⊆ [g] ∩ ∗ \ N (G) with |Y | ≤ 10p4140|G
                                                             log n
                                                                   , and h ≤ |Y |.
                                                      p n       800
(2) For some g ∈ G, Y ⊆ [g] ∩ ∗ \ N (G) with |Y | ≤ 104140 log n
                                                                 , and h = |Y | − 1.
                                                                     p n800
(3) For some generic aφ , we have Y ⊆ G \ G a set of |Y | ≤ 104140      log n
                                                                              disjoint pairs
    of generic elements, with [a1 a2 ] = [aφ ] for (a1 , a2 ) ∈ Y , and h ≤ |Y |.
A random Hall-Paige conjecture                                                          823

Then there is a subset R  ⊆ R \ U of size ≤ 106 |Y | log n which h-absorbs Y .

Proof With high probability, Lemmas 3.34, 5.20, 5.19, and 5.23 apply. Addition-
ally when |G | ≥ 104140 p −800 log n, we can assume that |Ri ∩ [g]| ≥ p|G |/2 ≥
4 × p 800 |G |/104140 log n for all cosets [g] and i = 1, 2, 3 (using Chernoff’s bound).

 (1) We can suppose that |G | ≥ 104140 p −800 log n, since otherwise Y would have to
     be empty and the conclusion is vacuous. In this case, we have that for every g,
     there is a subset Zg ⊆ [g] of size 4×p 800 |G |/104140 log n. Let g ∈ G, Y ⊆ [g]∩
                                   
     ∗ of size |Y | ≤ 10p4140|G  |
                             800
                              log n
                                    , and h ≤ |Y |. The result follows from Lemma 5.23
     applied to Y , Zg , U .
 (2) This is strictly weaker than Lemma 5.20.
 (3) We’ll just prove the lemma when Y ⊆ GA × GA , the other cases are symmetric.
                                                                                p 800 n
     Use Lemma 3.34 in order to find a set Z ⊆ (RA \ U ) × (RA \ U ) of 4 × 104140  log n
     pairs (a, a  ) of generic elements having aa  = aφ . Using Lemma 5.19, there is a
     R  ⊆ R \ (U ∪ Z) and Z  ⊆ Z with R  ∪ Z  h-absorbing Y .                       □

5.2 Absorbing coset-paired sets

In this section we prove results about absorbing coset-paired sets. The main lemmas
in this section are all along the lines of “given a set Q, there exists a set R  with
the property that for every coset-paired S ⊆ Q, there is a matching with vertex set
R  ∪ (Q \ S)”.
    For all g ∈ G, define i[g] = 2 if [g] is self-paired and 1 otherwise. The following
lemma allows us to absorb the complement of a coset-paired set.

Lemma 5.25 Let p ≥ n−1/700 . Let HG be a multiplication hypergraph, R 1 , R 2 , R 3
disjoint, symmetric p-random subsets of G and set R = RA    1 ∪ R 2 ∪ R 3 . With high
                                                                 B     C
probability, the following holds:
   Let s ∈ (0, 1]. Let m ∈ N. Let U ⊆ G and Q ⊆ G (for some  ∈ {A, B, C}) be
disjoint, and suppose |U | ≤ p 800 n/104150 . Suppose also that Q is generic, |Q| ≤
   p 800 n
104150 log n
             , and that Q satisfies:
 (i) For all pairs g, h either Q ∩ [g] = Q ∩ [h] = ∅ or |Q ∩ [g]|, |Q ∩ [h]| ≥
       i[g] 12s|G |.
                                                                                   
(ii) If |G | > s −1 /12 then for all pairs g, h |Q ∩ [g]|, |Q ∩ [h]| ≤ 10p4150|G  |
                                                                             800
                                                                                log n
(iii) If |G | ≤ s −1 /12, then Q doesn’t intersect any self-paired cosets.
Then, there exists an R  ⊆ R \U such that for all coset-paired, s|G |-coset-bounded
S ⊆ Q of size m, there is a matching with vertex set R  ∪ (Q \ S).

Proof With high probability Lemma 5.24 applies to R. Let s, m, U , Q be as
in the lemma. Let K be the set of cosets [g] with Q ∩ [g] nonempty. Partition
Q = Q1 ∪ Q2 where, for each coset [g] ∈ K, we have |Q1 ∩ [g]| = i[g] 12s|G |
(and so |Q2 ∩ [g]| = i[g] |Q ∩ [g]| − 12s|G |). Note that Q1 is coset-paired (since
it has even intersection with self-paired cosets and intersection 12s|G | with other
824                                                                    A. Müyesser, A. Pokrovskiy

                                                                                 p n     800
pairs of cosets) and so we can partition it into a set of |Q1 |/2 ≤ |Q| ≤ 104150   log n
pairs P1 . For each g, let hg = |Q ∩ [g]| − i[g] s|G |, noting that this is nonnega-
tive by (i). Use Lemma 5.24 (1) or (2) to pick a subset Rg ⊆ R which hg -absorbs
Q ∩ [g] (if |G | ≥ s −1 /12, then, using condition (ii), part (1) of that lemma gives
this. Otherwise, we have that Q intersects
                                           no self-paired cosets and s|G | = 1 and
so part (2) gives it). Set hP = [g]∈K i[g] s|G |, noting that this is even. Also
note that we can assume that m is even and ≤ hg (otherwise there could be no
coset-paired, s|G |-coset-bounded S of size m contained in Q). So, we can use
Lemma 5.24 (3) to pick a subset RP which 12 (hP − m)-absorbs P1 . We can ensure
that these are all disjoint by enlarging U as we choose them(the maximum total
size of sets we need to avoid is |U | + [g]∈K |Rg | ≤ |U | + [g]∈K 106 log n|Q ∩
                                                           p n   800
[g]| ≤ |U | + 106 log n|Q| ≤ p 800 n/104150 + 106 log n( 104150       ) ≤ p 800 n/104140 ).
                                                              log n
Let R  = RP ∪ P1 ∪ g∈K Rg .
   Consider some coset-paired, s|G |-coset-bounded S ⊆ Q of size m. Since S is
coset-paired, |S ∩ [g]|/i[g] is an integer for all [g].

Claim 5.25.1 There is a subset P1 ⊆ P1 of pairs disjoint from S which have s|G | −
|S ∩ [g]|/i[g] pairs intersecting each [g] ∈ K.

Proof First suppose that s|G | = 1. Note that for each [g] ∈ K this means that we
need to select at most one pair intersecting [g], and we only need to do so when S ∩
[g], S ∩ [φ(g)] = ∅. In this case we have |Q1 ∩ [g]| = |Q1 ∩ [φ(g)]| = i[g] |12s|G |
and so there is at least one pair in P1 contained [g] ∪ [φ(g)] (and choosing that pair
works).
    Next suppose that s|G | > 1, which implies that s|G | ≥ s|G | − 1 ≥
s|G |/2. Then |Q1 ∩ [g]| = i[g] 12s|G | ≥ 12s|G | ≥ 6s|G |. Thus there are
at least 3s|G | pairs contained in [g] ∪ [φ(g)]. At most 2s|G | of them can in-
tersect S ∩ ([g] ∪ [φ(g)]) and so we can choose s|G | − |S ∩ [g]|/i[g] of them
disjointly from S.                                                                         □
                                     
    Note that |P1 | = 12 | P1 | = 12 [g]∈K i[g] (s|G | − |S ∩ [g]|/i[g] ) = 12 (hP − m).
                                                                              
By the property of RP , there is a matching MP with vertex set RP ∪ P1 . For each
g ∈ K, note that |[g] ∩ (S ∪ P1 )| = i[g] s|G | and so |[g] ∩ (Q \ (S ∪ P1 ))| = hg .
By the property of Rg , there is a matching Mg with vertex set 
                                                                    Rg ∪ ([g]∩ (Q \ (S ∪
   P1 ))). The union of these matchings has vertex set (RP ∪ P1 ) ∪ [g]∈K Rg ∪
                                                     
([g] ∩ (Q \ (S ∪ P1 ))) = R  ∪ P1 ∪ (Q \ (S ∪ P1 )) = R  ∪ (Q \ S) as required.
                                                                                           □

      The following simple lemma covers generic sets by matchings.

Lemma 5.26 Let p ≥ n−1/700 . Let HG be a multiplication hypergraph, R 1 , R 2 , R 3
disjoint, symmetric p-random subsets of G and set R = RA 1 ∪ R 2 ∪ R 3 . With high
                                                               B     C
probability, the following holds:
   For any U ⊆ V (HG ) and any generic X ⊆ V (HG ) with |X|, |U | ≤ p 800 n/104010 ,
there is a matching M of size |X| in HG covering X and having all other vertices in
R \ U.
A random Hall-Paige conjecture                                                          825

Proof With high probability, the property of Lemma 5.5 applies i.e. for any generic
v ∈ V (HG ) and U ⊆ V (HG ) with |U | ≤ p 800 n/104000 , there is an edge e of HG
passing through v and having the other two vertices in R \ U . Now let U ⊆ V (HG )
and any generic X ⊆ V (HG ) with |X|, |U | ≤ p 800 n/104010 . Applying the property
of Lemma 5.5 to each v ∈ X we get edges ev passing through v and having other
vertices in R \ U . By enlarging U as we choose these to include previously found
vertices, we can ensure that all ev are disjoint i.e. they give us a matching like the
lemma asks for.                                                                     □

   The following is a variant of Lemma 5.25 where Q is a random set.
                                                 800
Lemma 5.27 Let p ≥ n−1/701 and q ≤ 104160
                                      p
                                          log n
                                                . Let HG be a multiplication hy-
pergraph, R 1 , R 2 , R 3 disjoint, symmetric p-random subsets of G and Q a disjoint
q-random subset. Set R = RA     1 ∪ R 2 ∪ R 3 . With high probability, the following holds:
                                      B    C
              q 2 p 800
   Let s ≤                . For every m ∈ N and U ⊆ G with |U | ≤ q 2 p 800 n/104160 , there
            104160 log3 n
is a U  with U ⊆ U  ⊆ U ∪ Q, |U  | ≤ 5q −1 |U | + 50s −1 , and R  ⊆ R \ U such that
for all coset-paired, s|G |-coset-bounded S ⊆ Q \ U  of size m, there is a matching
with vertex set R  ∪ (Q \ (S ∪ U  )).
                                                                            i , Ri .
Proof Randomly split each R i into two disjoint, symmetric p/2-random sets R−    +
            1 ∪ R 2 ∪ R 3 and R + = R 1 ∪ R 2 ∪ R 3 . Note that the following
Set R − = R−A      −B      −C              +A      +B    +C
hold with high probability.

(A1) R − satisfies Lemmas 5.25 while R + satisfies Lemma 5.26.
(A2) When |G | ≥ q −2 log2 n, then |Q ∩ [g]| ∈ [q|G |/2, 2q|G |] for all g ∈ G (from
     Chernoff’s bound).
                  √             p 800 n
(A3) |Q| ≤ qn + n log n ≤ 104150    log n
                                          (from Chernoff’s bound).

                q 2 p 800
Now let s ≤                 ≤ q 2 log−2 n/12, m ∈ N, and U ⊆ G with |U | ≤ q 2 p 800 n/
              104160 log3 n
104160 . When |G | ≤ s −1 /12, let U1 be the union of self-paired cosets, not-
ing that |U1 | ≤ 30|G | ≤ 30s −1 . When |G | > s −1 /12, let U1 be the union of
cosets [g] and their pairs for which |(U ∪ N (G)) ∩ [g]| ≥ q|G |/10, noting that
                  |+|N (G)|
|U1 | ≤ 2|G | |Uq|G                                                 
                      |/10 . Set U = U ∪ N (G) ∪ U1 , noting that |U | ≤ 5q
                                                                             −1 |U | +

6q −1 |N (G)| + 30s −1 ≤ 5q −1 |U | + 6q −1 109000 + 30s −1 ≤ 5q −1 |U | + 50s −1 . Set
Q1 = Q \ U  . Let Q2 ⊆ Q1 be the subset formed by deleting all pairs of cosets for
which Q1 ∩ [g] or Q1 ∩ [φ(g)] is empty. Note that Q2 satisfies all of the following
properties.

  1. Q2 is generic (since it’s disjoint from N (G)).
               p 800 n
  2. |Q2 | ≤ 104150 log n
                          (by (A3) and Q2 ⊆ Q).
  3. When |G | ≤ s −1 /12, Q2 doesn’t intersect self-paired cosets (since it’s disjoint
     from U1 ).
  4. When |G | ≤ s −1 /12, for all g ∈ G we have that either Q2 ∩ [g] = Q2 ∩ [h] = ∅
     or i[g] 12s|G | = 1 ≤ |Q2 ∩ [g]|, |Q2 ∩ [h]| (by construction of Q2 from Q1 ).
826                                                                            A. Müyesser, A. Pokrovskiy

  5. When |G | > s −1 /12, for all [g] either Q2 ∩ [g] = Q2 ∩ [h] = ∅ or we have
     i[g] 12s|G | ≤ 24s|G | ≤ q|G |/4 ≤ q|G |/2 − q|G |/10 ≤ |Q2 ∩ [g]|, |Q2 ∩
                                      
       [h]| ≤ 2q|G | ≤ 10p4150|G  |
                                800
                                log n
                                      (by (A2), since Q2 is disjoint from U1 , and since
              q 2 p 800            p 800
       s≤                 , q ≤ 104160       ).
            104160 log3 n              log n


Thus Lemma 5.25 applies to Q2 . This gives us a set R  − ⊆ R − \ U . By Lemma 5.26,
there is a matching M1 covering Q1 \ Q2 with V (M1 ) \ (Q1 \ Q2 ) ⊆ R + \ U . Set
R  = R  − ∪ (M1 \ Q) ⊆ R \ U . This is possible as Q1 \ Q2 ⊆ Q and (A3).
    Now consider a coset-paired, s|G |-coset-bounded S ⊆ Q \ U  = Q1 of size m.
Note that we must have S ⊆ Q2 because S is coset paired (and for every g ∈ Q1 \ Q2
we have [φ(g)] ∩ Q1 empty). Therefore, Lemma 5.25 gives us a matching M2 with
vertex set R  − ∪ (Q2 \ S). Combining this with M1 gives a matching with vertex set
R  − ∪ (Q2 \ S) ∪ (M1 \ Q) ∪ (Q1 \ Q2 ) = R  ∪ (Q1 \ S) = R  ∪ (Q \ (S ∪ U  )) as
required.                                                                          □

      The following shows that large coset-paired matchings exist inside random sets.

Lemma 5.28 Let p ≥ n−1/700 . Let HG be a multiplication hypergraph, R 1 , R 2 , R 3
disjoint, symmetric p-random subsets of G and set R = RA       1 ∪ R 2 ∪ R 3 . With high
                                                                      B      C
probability, the following holds:
   Let U ⊆ G with |U | ≤ p 800 n/104140 . For any k ∈ [1, |G |], there is a coset-paired,
                                     800
k-coset-bounded matching of size 10p4140nk
                                         |G |
                                               in R \ U .

Proof With high probability, Lemma 3.32 applies. When |G | ≤ n/ log10 n, consider
                                                                                       20


the set

                     S = {x, x −1 aφ , y, bφ y −1 , y −1 x −1 , ycφ x} ⊆ G ∗ F2 .

      When |G | > n/ log10 n, consider the set
                               20



                    S = {x1 , x2 aφ , y1 , y2 bφ , y1−1 x1−1 , y2 cφ x2 } ⊆ G ∗ F4 .

   Note that in either case all words in S are linear and all pairs of words are
separable (using part (a) or (c) of the definition of “separable”. For checking
(c), we use that for any (w, w  ) = (x, x −1 aφ ), (y, bφ y −1 ), (y −1 x −1 , ycφ x) we
have π0 (ww  ), π0 (w −1 w  ) ∈ {aφ , bφ , cφ , aφ−1 , bφ−1 , cφ−1 }, which all satisfy (c) from
Lemma 3.14).
   Let U ⊆ G with |U | ≤ p 800 n/104120 . If |G | ≤ p 800 n/104120 add all self-paired
cosets to U in order to get a set U  with |U  | ≤ p 800 n/104110 (otherwise set U  = U ).
Use Lemma 3.32 to get a projection π which separates S and has π(S) ⊆ R \ U  .
This gives us a coset-paired matching of size 2 as in the lemma (whose edges are
(π(x), π(y), π(y −1 x −1 )) and (π(x −1 aφ ), π(bφ y −1 ), π(ycφ x))). To get one of size
 p 800 nk
104140 |G |
             , keep selecting multiple matchings like this, enlarging U at every step in
order to keep them disjoint (we can do this as long as 3|G ||M|k −1 ≤ p 800 n/104130 .
A random Hall-Paige conjecture                                                            827

Indeed for a matching M, letting UM be the union of cosets [g] having |V (M) ∩
[g]| ≥ k, note that |UM |/|G | ≤ |V (M)|/k which gives |UM | ≤ 3|G ||M|/k. For any
pair of edges outside U ∪ UM , adding them to M gives a bigger matching like we
want).                                                                            □

   Now we arrive at the main lemma of this section. The following again shows that
we can absorb the complement of a coset-paired set. Unlike Lemmas 5.25 and 5.27,
this one allows the coset-paired set to have variable size.
                                                   801
Lemma 5.29 Let q, p ≥ n−1/701 with q ≤ 104170
                                          p
                                              log n
                                                    . Let HG be a multiplication hy-
pergraph, let R 1 , R 2 , R 3 , Q1 , Q2 , Q3 be disjoint, symmetric subsets of G with R 1 ,
R 2 , R 3 p-random and Q1 , Q2 , Q3 q-random subsets. Set R = RA       1 ∪ R 2 ∪ R 3 and
                                                                              B    C
Q = QA ∪ QB ∪ QC . With high probability, the following holds:
         1     2     3
                        7
               q 1600 p 10
   Let s ≤        7        , U ⊆ G with |U | ≤ q 9 p 800 n/104170 . There is a U  ⊆ U with
            1010 log2400 n
|U  | ≤ 500q −3 |U | + 1010 s −3 , and R  ⊆ R \ U such that for all coset-paired, s|G |-
coset-bounded, balanced S ⊆ Q \ U  , with |S| ≤ s 2 n there is a matching with vertex
set R  ∪ (Q \ (S ∪ U  )).

Proof Set m := 8sn and s  := s 1/800 104140 . Split R into three disjoint, symmetric
p/3-random subsets R1 , R2 , R3 of V (HG ) (by placing each ĝ in R1 /R2 /R3 with
probability 1/3, and making these choices independently of those for the random
sets R 1 , R 2 , R 3 in the lemma. So now for all i Ri ∩ RA1 , R ∩ R 2 , R ∩ R 3 are three
                                                                i     B     i      C
disjoint, symmetric p/3-random subsets of G partitioning Ri ). Lemma 5.27 applies
to each pair R  = Ri , Q = Qi for i = 1, 2, 3 (with R  1 = Ri ∩ RA   1 , R 2 = R ∩ R2 ,
                                                                                      i     B
  
R = Ri ∩ RC ). Lemma 5.28 applies to Q. Let U0 := U be as in the lemma. For
    3             3

i = 1, 2, 3 build U1 , U2 , U3 , R1 , R2 , R3 by applying Lemma 5.27 to Ri , Qi with
U = Ui−1 , m = m, s = 4s  . The end result is sets R1 ⊆ R1 , R2 ⊆ R2 , R3 ⊆ R3 and
a set U  with |U  | ≤ 500q −3 |U | + 1010 s −3 such that for all coset-paired, 4s  |G |-
coset-bounded Si ⊆ Qi \ U  of size m, there are matchings with vertex sets Ri ∪ (Qi \
(Si ∪ U  )). Set R  = R1 ∪ R2 ∪ R3 . Use Lemma 5.28 with k = s  |G | to find a coset-
                                                                800
paired, s  |G |-coset-bounded matching M0 of size 10p4140nk
                                                             |G |
                                                                   ≥ q 800 s  n/104140 ≥
8m in Q1 ∪ Q2 ∪ Q3 \ U  .
   Now, consider a coset-paired, s|G |-coset-bounded, balanced S ⊆ Q \ U  with
|S| ≤ s 2 n. Let m0 = |S ∩ GA | = |S ∩ GB | = |S ∩ GC | ≤ s 2 n, noting that these are
even by coset-pairedness.

Claim 5.29.1 There is a coset-paired submatching M0 ⊆ M0 of size m − m0 disjoint
from S. Additionally when |G | ≤ s −1 , then M0 and S never intersect the same cosets.

Proof When |G | ≤ s −1 let S  be the union of cosets intersecting S, otherwise let
S  = S. Note that in either case |S  | ≤ |S|s −1 ≤ sn ≤ m. Since |M0 | ≥ 8m, there is a
paired submatching M0 ⊆ M0 of size m − m0 disjoint from S  .                         □

   Now set S1 := (S ∪ M0 ) ∩ GA , S2 := (S ∪ M0 ) ∩ GB , S3 := (S ∪ M0 ) ∩ GC
and note that these are coset-paired, 4s  |G |-coset-bounded sets of size m. By the
828                                                                    A. Müyesser, A. Pokrovskiy

properties of R1 , R2 , R3 , we get matchings M1 , M2 , M3 with vertex sets V (Mi ) =
Ri ∪ (Qi \ (Si ∪ U  )). Now M = M0 ∪ M1 ∪ M2 ∪ M3 is a matching with vertex
              
set V (M0 ) ∪ 3i=1 Ri ∪ (Qi \ (Si ∪ U  )) = R  ∪ V (M0 ) ∪ (Q \ (S ∪ M0 ∪ U  )) =
R  ∪ (Q \ (S ∪ U  )) as required.                                                     □

5.3 Absorbing zero-sum sets

The goal of this section is to prove a lemma which can absorb arbitrary balanced zero-
sum sets (Lemma 5.32). To do this we first prove results about covering zero-sum sets
using coset-paired matchings.

5.3.1 Covering zero-sum sets

Here we prove Lemma 5.31, which roughly states that given a random vertex subset
R of HG and a small zero-sum set S, there exists a coset-paired set R  ⊆ R such
that S ∪ R  contains a perfect matching. As explained in Sect. 2, this will allow us to
reduce the task of absorbing arbitrary zero-sum sets to absorbing coset-paired sets.
   The following lemma does the majority of the work for this section. It allows us to
find the desired set R  iteratively by reducing the size of the set of vertices we need
to cover by 3 at every step.

Lemma 5.30 Let p ≥ n−1/700 . Let HG be a multiplication hypergraph, R 1 , R 2 , R 3
disjoint, symmetric p-random subsets of G and set R = RA      1 ∪ R 2 ∪ R 3 . With high
                                                                   B     C
probability, the following holds.                                     
   Let F ⊆ V (HG ) be a balanced φ-generic set of size 6, h ∈ [ F ], and U ⊆
V (HG ) with |U | ≤ p 800 n/104001 . Then there is a matching M in HG of size 15 and a
disjoint set {a, b, c} such that F ⊆ V (M), {a, b, c} ∪ V (M) \ F ⊆ R \ U , {a, b, c} ∪
V (M) \ F is coset-paired and abc = h. Furthermore, if |G | ≤ log5 n/p 2000 , then for
each  ∈ {A, B, C}, and g ∈ G we have that |({a, b, c} ∪ V (M) \ F ) ∩ G ∩ [g]| ≤ 1.


Proof With high probability, the property of Lemma             3.32 holds. Let F ⊆ V (HG )
be a balanced φ-generic set of size 6, h ∈ [ F ], and U ⊆ V (HG ) with |U | ≤
p 800 n/104001 . Let F = {a1 , a2 , b1 , b2 , c1 , c2 } with ai ∈ GA , bi ∈ GB , ci ∈GC . Let
k = ha2−1 c1−1 c2−1 b2−1 b1−1 a1−1 and note that by the assumption that h ∈ [ F ], we
know that k ∈ G . Depending on whether |G | ≥ log5 n/p 2000 or not, consider the set
of words S given in Fig. 6 or 7, noting that blue/green/red vertices represent a parti-
tion as SA /SB /SC . Note that in either case, all the words in S are linear and all pairs
of words in S are weakly separable and words in S coming from different SA /SB /SC
are strongly separable (see the figure captions for justification). In fact, it will be the
case that every pair of words are strongly separable, meaning we never use condition
(b ), so this distinction will not be essential in the justification.
    For ∗ = A, B, C, let T∗ = {w −1                 w  ∈ S∗ and w, w  do not have the same
                                       |Sw∗ | : w,14
free variables}, noting that |T∗ | ≤ 2 = 2 = 91 and that elements of T∗ are all
linear in at least one variable. If |G | > log5 n/p 2000 , let U  = U ∪ F . If |G | ≤
log5 n/p 2000 , then let U  be U together with all the self-paired cosets and all the
A random Hall-Paige conjecture                                                                                    829




Fig. 6 The set S when |G | ≤ 10−9 n. Black letters represent free variables, while pink ones represent
elements of G. The words are grouped into rectangles ST based on which free variables occur where, as
in Observation 3.24. To see that all words in S are linear, check that there are no repetitions of black letters
in any word (and every word has at least one black letter). To see that any pair w, w is strongly separable,
note that by Observation 3.24, any w, w coming from different rectangles fall under part (a) of the defi-
nition of separable. In the coloured rectangles, there are always two words w, w which fall under part (c)
of the definition of strongly separable (to check this first notice that w, w have the same free variables,
verifying the 2nd bullet point. The free variables occur with opposite signs in w, w verifying the 4th bul-
let point. We have π0 (ww ) ∈ [aφ ] ∪ [bφ ] ∪ [cφ ] so in particular π0 (ww ) ∈       / G , verifying the 3rd bullet
                                                                            
point. Finally, since π0 (ww ) ∈ [aφ ] ∪ [bφ ] ∪ [cφ ], there are ≤ 90|G | solutions to x 2 ∈ [aφ ] ∪ [bφ ] ∪ [cφ ]
verifying the last bullet point). This leaves the grey rectangles. In each such rectangle the four elements
are v, v −1 di−1 , v −1 eφ , di fφ v for a free variable v, i ∈ {1, 2}, and (d, e, f ) some permutation of (a, b, c).
• The pair w = v −1 di−1 , w = di fφ v falls under (c) because π0 (ww ) = π0 (v −1 di−1 di fφ v) = fφ .
• All other pairs fall under (b), as witnessed by the following equations v = v −1 di−1 , v = di fφ v,
v = v −1 eφ , v −1 di−1 = (v −1 eφ )(eφ−1 di−1 ), v −1 eφ = (di fφ v)−1 (di fφ eφ ). The elements g in these equa-
tions are eφ , di , di fφ , eφ−1 di−1 , di fφ eφ , which are all generic (since di is φ-generic) (Color figure online)



cosets intersecting F , and G . Note that in both cases, |U  | ≤ |U | + 36 log5 n/p 2000 ≤
p 800 n/104000 .
   Use Lemma 3.32 to get a projection π with π(S ∪ TA ∪ TB ∪ TC ) ⊆ R \ (U ∪ F )
that separates S ∪ TA ∪ TB ∪ TC and ensures that SA ⊆ R1 , SB ⊆ R2 , SC ⊆ R3 (so the
matching is contained in R).
   First, we prove the lemma without the “furthermore” part. Since all w, w  ∈ S are
separable, this means that all the vertices of π(S) are distinct. Recall that SA /SB /SC
are the blue/green/red vertices in the figures. Note that F ∪ π(S) has a partition into
a matching M (given by the black triangles in Figs. 8 and 9) and a set {a, b, c} having
abc = h (given by the pink triangle in the same figures where a is the top left vertex,
b is the bottom vertex, and c is the top right vertex). We claim that this matching M
830                                                                                       A. Müyesser, A. Pokrovskiy




Fig. 7 The set S when |G | ≥ n/109 . Black letters represent free variables, while pink ones represent
elements of G. The words here are exactly the same as in Fig. 6, except that there are more free variables
e.g. instead of the free variable x, we have free variables x1 , x2 , x11 , x12 with x replaced by one of x1 , x2 ,
x11 , x12 wherever it occurred. The words are grouped into rectangles ST based on which free variables
occur where, as in Observation 3.24. To see that all words in S are linear, check that there are no repetitions
of black letters in every word (and every word has at least one black letter). To see that all w, w ∈ S are
strongly separable, note that from Observation 3.24 this holds when w, w come from different rectangles.
This leaves only the pairs inside Sx1 , Sy3 , Sz5 , Sw7 , Ss9 , St16 , which are separable by (b) since a1 , a2 , b1 ,
b2 , c1 , c2 are generic (Color figure online)


together with the set {a, b, c} satisfy the lemma. The things that need to be verified
by inspecting the figure are as follows.

   • Each black triangle has that if its vertices are multiplied in the order blue/green/
     red (GA /GB /GC ), we obtain e. This shows that the black triangles are in fact
     edges of HG .
   • The product of the top left, bottom, and top right vertices of the yellow (central)
     triangle is h (here, use the definition of k). This gives that abc = h.
   • The product of the blue/green/red edges belongs to [aφ ]/[bφ ]/[cφ ]. In the
     case where |G | ≥ 10−9 n, note that we select the black (free) variables from
     G , hence they can be ignored while performing this check. This shows that
     {a, b, c} ∪ V (M) \ F is coset-paired.

For the “furthermore” part, we have that |G | ≤ log5 n/p 2000 . For ∗ = A, B, C, notice
that for all w, w  ∈ S∗ we either have that (π(w), π(w  )) is a pair, or there is a free
variable which appears in one of w/w  , but not both (to check this, note that for any
vertices w, w  of the same colour in Fig. 8, either w, w  are joined by an edge or
w and w  have different combinations of black letters). In the first case we have that
[π(w)] = [π(w  )] since π(S) is disjoint from all self-paired cosets. In the second case
A random Hall-Paige conjecture                                                                             831




Fig. 8 The set S when |G | ≤ 10−9 n. Blue, green, and red vertices give a partition of S into sets
SA /SB /SC which are pairwise strongly separable. Black letters represent free variables, while pink ones
represent elements of G. The elements a1 , a2 , b1 , b2 , c1 , c2 are not part of S, they are depicted only to
illustrate the matching. The grey triangles are matching edges, while the yellow triangle is the set {a, b, c}.
Note that the yellow triangle is an edge if and only if k = e (Color figure online)


                                                   / G (since G ⊆ U  ), or equivalently
we have w −1 w  ∈ T∗ , which implies π(w −1 w  ) ∈
[π(w)] = [π(w  )].                                                                    □

   Now, we may prove the main result of this section.

Lemma 5.31 Let p ≥ n−1/10 . Let HG be a multiplication hypergraph, R 1 , R 2 , R 3
                                     20

                                                       1 ∪ R 2 ∪ R 3 . With high
disjoint, symmetric p-random subsets of G and set R = RA    B     C
probability, the following holds:
832                                                                                 A. Müyesser, A. Pokrovskiy




Fig. 9 The set S when |G | > 10−9 n. Blue, green, and red vertices give a partition of S into sets
SA /SB /SC which are pairwise strongly separable. Black letters represent free variables, while pink ones
represent elements of G. The elements a1 , a2 , b1 , b2 , c1 , c2 are not part of S. This set is exactly the
same as Fig. 8, except that there are more free variables. More precisely, for every grey/yellow triangle we
introduce new variables and use them only in words occurring inside that triangle. The grey triangles are
matching edges, while the yellow triangle is the set {a, b, c} where a is the top left vertex, b is the bottom
vertex, and c is the top right vertex (Color figure online)


                                                                                  
      Let S ⊆ V (HG ) be a balanced and φ-generic subset with                         S ∈ G and |S| ≤
          13
      p 10 n
      6        8   . Let U ⊆ V (HG ) with |U | ≤ p 800 n/104100 . Then, there exists a match-
1010 log(n)10
ing M in HG with the following properties.
Q1 S ⊆ V (M)
Q2 V (M) \ S ⊆ R \ U
A random Hall-Paige conjecture                                                                            833

Q3 V (M) \ S is coset-paired
Q4 If |G | ≤ log(n)8000 /p 10 , then for each  ∈ {A, B, C}, and g ∈ G we have that
                              10


   |(V (M) \ S) ∩ G ∩ [g]| ≤ 1.

Proof With high probability, the property of Lemma 5.30 holds and Lemma 3.34
applies to each R 1 , R 2 , R 3 . Let S ⊆ V (HG ) be a balanced and φ-generic subset
                                  1013
with S ∈ G and |S| ≤ 10p6 n 108 and U ⊆ V (HG ) with |U | ≤ p 800 n/104010 .
                                  10     log(n)
Without loss of generality, we can assume that |S| ≥ 6 (if this doesn’t hold, then
pick φ-generic vertices a, a  , b, b , c, c ∈ R \ (S ∪ U ) with aa  = aφ , bb = bφ , cc =
cφ using Lemma 3.34, and define S  = S ∪ {a, a  , b, b , c, c }. Now S  is a set with
|S  | ≥ 6, so we can continue the proof with S  rather than S. (In the case when |G | ≤
                                                            √
log(n)8000 /p 10 we can include in U the 30|G |  n many elements of G in self-
                       10


paired cosets before applying Lemma 3.34 to guarantee that the pairs we are adding
come from distinct cosets. This way, Q4 is not violated.)
      Set t = |S|/3. Since S is balanced we can write S = {a1 , . . . , at , b1 , . . . , bt , c1 , . . . ,
ct } with ai ∈ GA , bi ∈ GB , ci ∈ GC .
      We build matchings M2 , . . . , Mt and φ-generic vertices {a2 , . . . , at , b2 , . . . , bt , c2 ,
. . . , ct } as follows. Define a2 = a1 , b2 = b1 , c2 = c1 . Given a subset S ⊆ G, de-
note by ψ(S) the set of all g in G such that there exists some s ∈ S with [s] = [g].
Observe that |ψ(S)| ≤ |S| · |G |. For i = 2, . . . , t − 1 apply Lemma 5.30 to Fi =
{ai , bi , ci , ai , bi , ci } and
                                                      
                                      U = U ∪ N (G) ∪   ψ(V (Mi ))
                                                         j <i


in the case when |G | ≤ log(n)8000 /p 10 and
                                                   10


                                                            
                                    U = U ∪ N (G) ∪                V (Mi )
                                                            j <i

otherwise. This way, we obtain a matching Mi and a set {ai+1              , b , c } (use an ar-
                                                                              i+1 i+1
                                                           
bitrary choice of h from the corresponding G -coset for these applications). Further,
                             
Q4 is maintained for j ≤i Mi in the case when |G | ≤ log(n)8000 /p 10 by our inclu-
                                                                                     10


sion in U of all previously used G -cosets. To see that the necessary upper bound on
U holds for this application, note thatwhen |G | ≤log(n)8000 /p 10 , we have that
                                                                                   10

                                                            13
                                                        p 10 n
| j <i ψ(V (Mi ))| ≤ 100t|G | ≤ 100
                                                                                       10
                                                      106       108  (log(n)8000 /p 10 )  p 800 n/
                                                    10 log(n)
                                                                          
104001 . Otherwise, when |G | is large, we have that | j <i V (Mi )| ≤ 100t 
p 800 n/104001 as well.
     Notice that at bt ct at bt ct ∈ G (to see this, show that for all i we have ai bi ci ai bi ×
ci ai+1
      bi+1 ci+1  . . . at bt ct ∈ G by induction. The initial case is just the assump-
tion S ∈ G . For the induction step use that Lemma 5.30 gives [ai bi ci ai bi ci ] =
                
    b c ]). Now apply Lemma 5.30 to F = {a , b , c , a  , b , c } with h = e ∈
[ai+1
   
        i+1 i+1                                              t     t t t t t t
G and U = U ∪ N (G) ∪ j <t V (Mi ) in order to obtain a matching Mt and a set
                                          
{a, b, c} with abc = e. Let M = ti=2 Mi ∪{abc} in order to get a matching satisfying
834                                                                    A. Müyesser, A. Pokrovskiy

the lemma. Checking Q1-Q2 is routine. To verify Q3, note that Lemma 5.30 tells us
               , b , c } ∪ V (M ) \ F is coset-paired for i = 2, . . . , t − 1 and also
that Ni := {ai+1    i+1 i+1            i     i                                
that Nt := {a, b, c} ∪ Mt \ Ft is coset-paired. Note that j <i Ni ⊆ Fi ∪ j <i V (Mi )
                       that N1 , . . . , Nt are disjoint (Ni is trivially disjoint from Fi ,
for each i, which shows
and is disjoint from j <i V (Mi ) by choice of U when applying Lemma 5.30). Also,
t
  i=1 Ni = V (M) \ S, which shows that this set is coset-paired as well.                  □

5.3.2 The zero-sum absorption lemma

Now we arrive at the main lemma of this section.

Lemma 5.32 Let n−1/10 ≤ p. Let R 1 , R 2 , R 3 ⊆ G be disjoint, symmetric p-
                           100


random subsets and set R = RA     1 ∪ R 2 ∪ R 3 . With high probability, the following
                                        B      C
holds.
   Let U ⊆ G with |U | ≤ p 10 n/ log(n)10 . Then, there exists a subset R  ⊆ R \ U
                               14           14


such that for all balanced and φ-generic subsets S ⊆ V (HG ) \ R  with |S| ≤
     p 10
         13      
  108       108
                , S = 0, there exists a matching with vertex set R  ∪ S.
10    log(n)

    We remark that the set R  in this lemma is always balanced and zero-sum. To see
this, notice that the conclusion of the lemma applies with S = ∅ (since the empty set
is balanced and zero-sum). This gives a matching with vertex set R  ∪ ∅ = R  . Since
matchings are balanced and zero-sum, we get that R  is balanced and zero-sum.

                     801                       7
                 p               q 1600 p 10
Proof Let q = 104180 log n
                           and s =  6         . For each i ∈ {1, 2, 3}, let Qi , W i be q-
                               1010 log2400 n
random and s 4 -random, symmetric subsets of G respectively, satisfying W i ⊆ Qi ⊆
R i . Note that Q1 , Q2 , Q3 and W 1 , W 2 , W 3 are disjoint, symmetric q-random and
disjoint, symmetric s-random subsets of G, respectively. The following all hold si-
multaneously with high probability.

  1. Lemma 5.29 holds for R 1 , R 2 , R 3 and Q1 , Q2 , Q3 .
  2. Lemma 5.31 holds for W 1 , W 2 , W 3 (observe that s 4 ≥ n−1/10 ).
                                                                          20


  3. If |G | ≥ s −5 , each W i is 2s 4 |G |-coset-bounded. (This follows by Chernoff’s
     bound,
             as 1/s  log(n)10 .)
  4. | Wi | ≤ 100s 4 n, by Chernoff’s bound.
                                        14             14
Fix some U ⊆ G such that |U | ≤ p 10 n/ log(n)10 as in the statement of the lemma.
Note that it also follows that |U | ≤ q 9 p 800 n/104170 . Then, Lemma 5.29 gives us a set
U  ⊇ U with |U  | ≤ 500q −3 |U | + 1010 s −3 and R  ⊆ R \ U with the property that for
all coset-paired, s|G |-coset-bounded, balanced, S ⊆ Q \ U  , with |S| ≤ s 2 n there
is a matching with vertexset R  ∪ (Q \ (S ∪ U  )).
    We claim that R  ∪ i∈[3] Qi \ U  satisfies the property required of R  in the
statement of the lemma, and the rest of the proof will justify this. Fix some set S  with
the properties of S as in the statement of the lemma, that is, S  is φ-generic, balanced,
                                               1013
disjoint with R  ∪ i∈[3] W i , |S  | ≤ 108p        108
                                                         , and S  is zero-sum. Note it easily
                                         10   log(n)
A random Hall-Paige conjecture                                                             835

follows that |S| ≤ p 4000 n/ log(n)10 , and we also have that |U  | ≤ p 800 /104100 , so we
may invoke the property of W i coming from Lemma 5.31 with S = S  and U = U  to
deduce
 i the existence of a matching M1 with properties         Q1-Q4. Then, the set S  :=
                                                      
    W ∩ (V (M1 ) \ S ) is coset-paired by Q3, s|G |-coset-bounded (if |G | ≥ s −5 ,
this follows by (3), and if |G | < s −5 ≤ log(n)8000 /p 10 this follows by Q4, as we
                                                           10


have
 i1-coset-boundedness in this case), balanced,      and have size at most s 2 n (as S  ⊆
    W and (4)). By property of the set R  , we have that R  ∪ (Q \ (S ∪      U  )) has a
perfect matching, M2 say. Then, M1 ∪ M2 is a perfect matching of (R  ∪ i∈[3] Qi \
U  ) ∪ S  , as desired.                                                                  □

5.4 Proof of Theorem 4.3

Our goal in this section is to prove the main result of the paper, Theorem 4.3, as stated
in Sect. 4. We first prove the following slight variant which changes the 3rd bullet
point from “e ∈/ X, Y, Z” to the more restrictive condition “X, Y , Z are φ-generic”.

Theorem 5.33 Let α ≥ n−1/10 . Let G be a group of order n. Let R 1 , R 2 , R 3 ⊆ G be
                                 101


p-random, α-slightly-independent subsets. Then, with high probability, the following
holds.
                                            1 , R 2 , and R 3 respectively, satisfying the
    Let X, Y , Z be equal-sized subsets of RA     B        C
following properties.
   • |(RA1 ∪ R 2 ∪ R 3 ) \ (X ∪ Y ∪ Z)| ≤ α 1015 n/ log(n)1015
              B    C
   •     X + Y + Z = 0 (in Gab )
   • All elements of X, Y and Z are φ-generic.
Then, HG [X, Y, Z] contains a perfect matching.

Proof By the definition of R 1 , R 2 , R 3 being α-slightly-independent, we have Q1 ⊆
R 1 , Q2 ⊆ R 2 , Q3 ⊆ R 3 such that the joint distribution of Q1 , Q2 , Q3 is that of
disjoint α-random subsets of G.
    Partition G into a (1/105 )-random subset G− and disjoint (1 − 1/105 )-random
subset G+ , making the choices independently of R 1 , R 2 , R 3 , Q1 , Q2 , Q3 . For each
i = 1, 2, 3, let R+i = R i ∩G to get three (1/105 )p-random subsets. Use Lemma 3.17
                              +
to pick Q− ⊆ Q1 ∩ G− , Q2− ⊆ Q2 ∩ G− , Q3− ⊆ Q3 ∩ G− , so that their joint dis-
            1

tribution is that of disjoint, symmetric α/1010 -random subsets of G. Let Q− :=
(Q1− )A ∪ (Q2− )B ∪ (Q3− )C , R := RA1 ∪ R 2 ∪ R 3 , and R := (R 1 ) ∪ (R 2 ) ∪ (R 3 ) .
                                           B      C          +       + A        + B       + C
With high probability, the property in Lemma 5.32 holds for Q− . As the multi-
plication hypergraph HG is (0, 1, n)-typical, with high probability, the property in
Lemma 3.9 holds with the random sets (A , B  , C  ) = (R+     1 , R 2 , R 3 ). Finally, as a
                                                                      +     +
consequence of Chernoff’s bound, with high probability, |Q− | ≤ |R+ |/100, and for
i we have |R+  i | = (p(1 − /105 ) ± n−0.27 )n and |R i |(p ± n−0.27 )n

    Now, given subsets X, Y , Z, define U := (RA    1 ∪ R 2 ∪ R 3 ) \ (X ∪ Y ∪ Z) and note
                                                            B    C
|U | ≤ α n/ log(n) . From the property in Lemma 5.32, we find a set Q− ⊆
          1015          1015


Q− \ U that can combine with balanced zero-sum sets to produce perfect matchings.
By the remark after Lemma 5.32, Q− is balanced and zero-sum.
    Let L := R \ (Q− ∪ R+ ). Note that as R+  1 , R 2 , R 3 each have size (p(1 − /105 ) ±
                                                    +     +
n −0.27            
        )n, and Q− is a balanced set contained in R, there exists a q ≤ p/105 such that
836                                                                 A. Müyesser, A. Pokrovskiy

L ∩ X, L ∩ Y , L ∩ Z each have size (q ± n−0.26 )n. Note that q ≤ (1 − 10−5 )p/100,
so we may apply Lemma 3.9, to conclude that there exists a matching M1 with
                                          −4
V (M1 ) ⊆ L ∪ R+ covering all but n1−10 vertices of L ∪ R+ . Of the edges forming
                           15           15
this matching, at most α 10 n/ log(n)10 many of them can meet U , hence we find a
                                                          15            15         −4
matching M1 of HG [X, Y, Z] covering all but at most α 10 n/ log(n)10 + n1−10 ≤
(α/1010 )10 / log(n)10 vertices of (X ∪ Y ∪ Z) \ Q− . Call this uncovered set of ver-
           14          14


tices S.
   We claim that S is a balanced zero-sum set. This is as the sets Q− , V (M1 ), and
X ∪ Y ∪ Z are each balanced and zero-sum, and S is obtained by removing all of the
former two sets from the latter set, and the former two sets are disjoint. Further, S is
φ-generic, as by assumption, X ∪ Y ∪ Z is φ-generic. Then, by property of the set
Q− , S ∪ Q− spans a perfect matching, M2 say. M1 ∪ M2 then is the desired perfect
matching of X ∪ Y ∪ Z.                                                                □

      It remains to prove Theorem 4.3. We will need the following intermediary result.

Lemma 5.34 Let p ≥ n−1/10 . Let G be a group of order n. Let Q1 , Q2 , Q3 ⊆ G
                                100


be disjoint, symmetric p-random subsets and set Q = Q1A ∪ Q2B ∪ Q3C . With high
probability, the following holds.
                                            10          10
    Let S, U ⊆ V (HG ) with |S|, |U | ≤ p 10 n/ log(n)10 and e ∈
                                                               / S. Then, there ex-
                                                        10         10
ists a matching M in HG [Q] \ U of size at most 2p n/ log(n)10 saturating S,
                                                      10

meaning S ⊆ V (M).

Proof Let g ∈ G be an arbitrary element of the group such that g = e. Then, by
Proposition 3.12, it follows that g is contained in at least n/5 edges {g, x, y} such
       / {y, y −1 }, regardless of whether g ∈ GA , GB , or GC . For any i, j , and any
that x ∈
such {x, y}, x ∈ Qi and y ∈ Qj with probability p 2 . For each of the n/5 such edges,
the corresponding pairs {x, y} are disjoint. Hence, we may apply Chernoff’s bound
to deduce that with probability at least 1 − 1/n2 , g has degree at least p 2 n/1000
in HG [Q1A , Q2B , Q3C ], as long as g ∈ V (HG [Q1A , Q2B , Q3C ]). By a union bound, this
property holds for all g ∈ G such that g = e in the case that G = (Z2 )k for some k.
    Now, let S, U be given. By the minimum degree property from the previous
                                                                         10          10
paragraph, all elements of S have degree at least p 2 n/1000 − 2p 10 n/ log(n)10 ≥
p 2 n/2000 in HG [Q] \ U . As p 2 n  |S|, we may greedily pick a matching saturating
                                            10            10
S and disjoint from U of size |S| ≤ 2p 10 n/ log(n)10 as claimed.                       □

      We can now give the final proof of the section.

Proof of Theorem 4.3 from Theorem 5.33 and Lemma 5.34 By the definition of q-
slightly-independent, we have disjoint, symmetric, q-random sets Q1 , Q2 , Q3 with
Q1 ⊆ R 1 , Q2 ⊆ R 2 , Q3 ⊆ R 3 . With high probability Theorem 5.33 holds R 1 ,
R 2 and R 3 and Lemma 5.34 holds for Q1 , Q2 , Q3 . Given X, Y , Z, let S =
(X ∪ Y ∪ Z) \ (RA1 ∪ R 2 ∪ R 3 ) together with the non-φ-generic elements of X ∪ Y ∪ Z
                       B     C
(of which there are at most 109010 many). Let U = (RA    1 ∪ R 2 ∪ R 3 ) \ (X ∪ Y ∪ Z).
                                                               B    C
                          16            16
Note that |S|, |U | ≤ p 10 n/ log(n)10 and e ∈    / S in the case that G = Zk2 . Apply
A random Hall-Paige conjecture                                                              837

Lemma 5.34 to find a matching M, and set X  , Y  , Z  to be X \ V (M), Y \ V (M),
Z \ V (M) respectively. Observe that X  , Y  , Z  satisfy the hypothesis of X, Y , Z
in Theorem 4.3. Indeed, X  /Y  /Z  is contained in R 1 /R 2 /R 3 and does not con-
tain
 non-φ-generic
                                    allsuch elements
                        elements since                   are inS ⊆ V (M). We have
   X  + Y  + Z  = 0, as X + Y + Z = 0, and V (M) = 0 (as V (M)
spans a perfect matching). We have |X  | = |Y  | = |Z  | for the same reason. Hence,
HG [X  , Y  , Z  ] spans a perfect matching by Theorem 4.3, and this together with M
gives a perfect matching of HG [X, Y, Z] as desired.                                  □


6 Applications

6.1 Characterising subsquares with transversals

The goal of this section is to prove a far-reaching generalisation of Snevily’s conjec-
ture as stated in the introduction (Theorem 1.5).

6.1.1 Preliminaries

The below lemma allowing us to find zero-sum sets of prescribed size will also be
useful in Sect. 6.3.

Lemma 6.1 Let k ∈ {3, 4, 5}. Let p ≥ 3n−1/1400 . Let G be an abelian group, and let
R be a p-random subset of G. Then, the following holds with high probability.
  Let X ⊆ R with |R \ X| ≤ p 8000 n/106000 . Then, there exists at least p 800 n/104010
many disjoint zero-sum sets of size k in X.

Proof With high probability, Corollary 3.33 applies to R. If it is the case that
k = 3, consider the set S = {xy, x −1 , y −1 } ⊆ G ∗ F2 and note that all pairs of
words in S are linear and separable (by part (a) of the definition of separa-
ble). Thus, setting U := R \ X there is a projection π : G ∗ F2 → G which has
π(S) ⊆ X and which separates S. Resetting U to include the vertices in the pro-
jection, and invoking Corollary 3.32 iteratively, we can conclude that there exists
at least (p 800 n/104000 − p 8000 n/106000 )/10  p 800 n/104010 disjoint zero-sum sets
of size 3 contained in X. If k = 4 set S = {xyz, x −1 , y −1 , z−1 }, and if k = 5 set
S = {xyzw, x −1 , y −1 , z−1 , w −1 } to obtain sets of words which are linear and pair-
wise strongly separable, and proceed in the same way as the case k = 3.              □

   For this section, we will only need the following easy corollary of Lemma 6.1

Lemma 6.2 Let G be a group, and let         3 ≤ t ≤ n/3 − 1, and let g ∈ G. Then, there
exists distinct c1 , . . . , ct ∈ G such that ci = g in Gab .

Proof Let c4 , . . . , ct be arbitrary distinct elements of G, and set g  = g(c4 · · · ct )−1 .
Observe there exists at least n2 − 3n choices of c1 , c2 and c3 such that c1 c2 c3 = g  and
c1 , c2 , c3 are distinct. Among those choices, at most 3tn of them have {c1 , c2 , c3 } ∩
{c4 , . . . , ct } = ∅. This implies that if n2 − 3n − 3tn > 0, i.e. if t ≤ n/3 − 1, there
exists a choice of c1 , . . . , ct with the desired properties.                              □
838                                                                    A. Müyesser, A. Pokrovskiy

   The below result has essentially appeared in [47]. For our application here, we pro-
vide a more precise formulation as well as a full proof for the sake of completeness.
We remark that the following proof was suggested to us by an anonymous referee.

                                                                       100
Lemma 6.3 Let n be sufficiently large and set γ := 1/ log(n)10 . Let S = A × B
be a subsquare of a multiplication table of a group G defined by two n-element
sets A, B ⊆ G. Then, either S has at most (1 − γ )n symbols occurring more than
(1 − γ )n times or there is a subgroup H ⊆ G and elements g, g  ∈ G such that
|AΔgH |, |BΔHg  | ≤ γ 1/10 n.

Proof We will use a theorem of Fournier as stated as Theorem 1.3.3 in the lec-
ture notes of Green [36]. Towards this goal, we recall the definition of multiplica-
tive energy of a subset A of a group. It is defined to be the quantity E(A) :=
|{(a1 , a2 , b1 , b2 ) ∈ A4 : a1 a2−1 = b1 b2−1 }|. We set E(A, B) := |{(a1 , a2 , b1 , b2 ) ∈
A2 × B 2 : a1 a2−1 = b1 b2−1 }|, note that E(A) = E(A, A). Denote by rA (x) :=
{(a1 , a2 ) ∈ A2 : a1 a2−1 = x}, and rB (x) is defined analogously. Then, by the Cauchy-
Schwarz inequality, we have that
                                
                E(A−1 , B) =          rA−1 (x)rB (x) ≤ E(A−1 )1/2 E(B)1/2 .
                                x∈G

Note also that E(A−1 , B) := {(a1 , a2 , b1 , b2 ) ∈ A2 × B 2 : a1 b1 = a2 b2 }. Suppose
now that S has more than (1−γ )n symbols occurring more that (1−γ )n times. Thus,
E(A−1 , B) ≥ (1 − 2γ )3 n3 . As E(A−1 ), E(B) ≤ n3 , we can deduce using the above
that E(A−1 ), E(B) ≥ (1 − 2γ )6 n3 . From Theorem 1.3.3 in [36], it follows that there
exists a subgroup H and g ∈ G such that |AΔgH | ≤ γ 1/9 n. Consider an element t of
S that repeats at least (1 − γ )n times. So we have a1 b1 = · · · = a(1−γ )n b(1−γ )n = t.
Let i ∈ [(1−γ )n] so that ai ∈ gH , and note that there are at least (1−2γ 1/9 )n indices
i with this property. So we have that t = (gh)bi for some h ∈ H . Then, bi = h−1 g −1 t,
so bi ∈ H (g −1 t) for each such i. Then, the statement holds for g  = g −1 t.        □

Observation 6.4 Let A × B be a subsquare of a multiplication table of a group G
defined by two n-element sets A, B ⊆ G. Let g, g  ∈ G. Suppose that A × B contains
a transversal. Then, gA × Bg  also contains a transversal.

Proof Let (ai , φ(ai )), i ∈ [n] be a transversal of A × B, where φ is a bijection
A → B. Then, (gai , φ(ai )g  ) is a transversal of gA × Bg  , since ai φ(ai ) = aj φ(aj )
implies that gai φ(ai )g  = gaj φ(aj )g  .                                            □

Lemma 6.5 Let ε > 0 be sufficiently small and let n be sufficiently large. Let γ ≥ n−ε .
Let S be a subsquare of a group G of order n such that S has at most (1−γ )n symbols
occuring more than (1 − γ )n times. Then, S contains a transversal.

Proof As subsquares of G correspond to edge-coloured balanced complete graphs,
this lemma is a direct corollary of Lemma 8.1.3 from [47].                  □
A random Hall-Paige conjecture                                                            839

6.1.2 The characterisation

We first prove the following weakening of the main theorem which characterises
when subsquares which are close to the whole multiplication table have transversals.
                                  30
Lemma 6.6 Let t ≤ n/ log(n)10 . Let G be a sufficiently large group and A, B ⊆ G
with |A| = |B| = n − t. Then A × B has a transversal unless one of the following
holds.
  1. G is a group that does not satisfy the Hall-Paige condition, and A = B = G.
  2. G ∼= (Z2 )k , A = G \ {a1 , a2 }, B = G \ {b1 , b2 } for some distinct a1 , a2 ∈ G and
     distinct b1 , b2 ∈ G such that a1 + a2 + b1 + b2 = 0.

Proof If t = 0 then there is a transversal (by any proofs of the Hall-Paige Conjecture
                                                                                    30
e.g. by Theorem
           4.4with−1     p = 1). Thus, we can suppose that 1 ≤ t ≤ n/ log(n)10 .
Let α := G( A B) (where the terms in the products are multiplied in any
fixed order).

Claim 6.6.1 There are distinct elements c1 , . . . , ct ∈ G such that c1 + · · · + ct = α in
Gab .

Proof If t = 1, one can trivially choose c1 = α. If t = 2, and α = e, then we could
select c1 = e and c2 = α. The case t = 2, α = e, G = (Z2 )k is excluded by the
hypothesis. Indeed, in this case we’d have A = G \ {a1 , a2 }, B = G \ {b1 , b2 } for
some distinct
         a1 ,  a2 ∈ H and distinct b1 , b2 ∈ G.But then     in Gab we’d have 0 = α =
   G − A − B = a1 + a2 + b1 + b2 − (Z2 ) = a1 + a2 + b1 + b2 . When
                                                          k

t = 2, α = e, G = (Z2 )k , then, there must exist distinct c1 , c2 ∈ G such that c1 c2 = e.
Finally, when t ≥ 3, then the claim follows from Lemma 6.2.                               □

   Let C = G \ {c1 , . . . , ct } to get a set with |C| = |A| = |B|. Now Theorem 4.4
applies with p = 1 to give a perfect matching {(a1 , b1 , c1 ), . . . , (an−1 , bn−1 , cn−1 )}
in HG [A, B, C −1 ]. The entries (a1 , b1 ), . . . , (an−t , bn−t ) give a transversal in A ×
B.                                                                                          □

   We now prove the main result of this section.

Theorem 6.7 There exists a n0 ∈ N such that the following holds for all n ≥ n0 . Let
G be a group, and let A, B ⊆ G with |A| = |B| = n. Then, A × B has a transversal,
unless there exists some k ≥ 1, g1 , g2 ∈ G and a subgroup H ⊆ G such that one of
the following holds.
  1. H is a group that does not satisfy the Hall-Paige condition, and A = g1 H and
     B = Hg2 .
  2. H ∼ = (Z2 )k , g1 A = H \ {a1 , a2 }, g2 B = H \ {b1 , b2 } for some distinct a1 , a2 ∈ H
     and distinct b1 , b2 ∈ H such that a1 + a2 + b1 + b2 = 0.
                                              100
Proof of Theorem 6.7 Set γ = 1/ log(n)10 . Suppose that A × B does not have a
transversal. Then, by Lemma 6.5, we may assume that A × B contains more than
840                                                                                  A. Müyesser, A. Pokrovskiy

(1 − γ )n symbols occuring more than (1 − γ )n times. By Lemma 6.3, it follows that
there is a subgroup H ⊆ G and elements g, g  ∈ G such that |AΔgH |, |BΔHg  | ≤
γ 1/10 n. As A × B does not contain a transversal, by Observation 6.4, g −1 A × Bg  −1
does not contain a transversal either. Set A × B  = g −1 A × Bg  −1 and observe that
|A ΔH |, |B  ΔH | ≤ γ 1/10 n.
    Set A1 = A ∩ H , A2 = A \ H , B1 = B  ∩ H , B2 = B  \ H , noting that
|A2 |, |B2 | ≤ γ 1/10 n. If A2 = B2 = ∅, then the theorem follows from Lemma 6.6
applied with G = H . Thus we can suppose that A2 and/or B2 are nonempty. Note
that all the elements in the multiplication table in A1 × B2 and A2 × B1 are outside
H . Let A2 = {a1 , . . . , a|A2 | }, B2 = {b1 , . . . , b|B2 | }. We can greedily select a partial
transversal T1 = {(a1 , b1 ), . . . , (a|A2 | , b|A 
                                                         2|
                                                                                       ,b
                                                            ), (a1 , b1 ), . . . , (a|B2| |B2 | )} by selecting
                                                
elements b1 , . . . , b|A2 | ∈ B1 , a1 , . . . , a|B2 | ∈ A1 in order (to see this note that there
are at least min(|A1 |, |B1 |) ≥ n/2 choices for each element and so there’s room to
avoid the |A2 | + |B2 | ≤ γ 1/10 n rows/columns/symbols previously used). Note that
since there are at least n/4 choices for the last element a|B                         , we can additionally
                                                                                     2|
ensure that                                                                 
                 A1 \ {a1 , . . . , a|B2 | } + B1 \ {b1 , . . . , b|A2 | } = 0 in H ab in the case
where H ab has at least 100 elements. Thus Lemma 6.6 applies to give a transversal
                             ) × (B \ {b , . . . , b
T2 in (A1 \ {a1 , . . . , a|B 2|       1        1             |A2 | }) (to apply Lemma 6.6, we need to
know that we are not in cases 1 and 2. We’re not in case 1 because we’re assuming
A2 ∪  B2 = ∅.We’re not in case 2 because               in this case we have |H ab | ≥ 100, and also
                                                       
that A + B = 0, and we selected ai and bi to avoid this scenario). Now T1 ∪ T2
is a transversal in A × B  as required.                                                                     □

6.2 Path-like structures in groups

The goal of this section is to give a characterisation of sequenceable, R-sequenceable,
and harmonious groups which are sufficiently large. It will be convenient to rephrase
all three of these problems as finding rainbow structures in edge-coloured digraphs.
Towards this aim, we give some definitions.
                              +
    Given a group G, by KG      we denote the complete directed edge-coloured graph
with vertex set G, edge set {ab   : a = b and a, b ∈ G}, where the edge ab  gets as-
signed the colour ab ∈ G. We call this the multiplication digraph of G. Similarly,
by K − we denote the division digraph of G. In the division digraph, the edge ab     
       G
                                                                        −
gets assigned the colour a −1 b ∈ G, and all other properties of KG        are same with
             +                                   ±
those of KG . We sometimes use the notation KG to make statements and definitions
          +        −                                                          ±
about KG    and KG   simultaneously. For subsets R, R  ⊆ G, we will use KG     [R; R  ] to
                           ±
denote the subgraph of KG induced on vertex set R consisting of all edges of colours
                                                ±
in R  . For disjoint subsets V1 , V2 ⊆ G, by KG  [V1 , V2 ; R  ] we denote the bipartite
                 ±
subgraph of KG obtained by keeping only the edges between V1 and V2 with colour
in R  .
   Recall that a subgraph of an edge-coloured graph is called rainbow if all edges
have distinct colours. The definitions of sequenceable, R-sequenceable, and harmo-
nious were given in Sect. 1.1. The following is straightforward to derive from the
definitions.
A random Hall-Paige conjecture                                                       841

                                                          +
Observation 6.8 A group G is harmonious if and only if KG   has a directed rainbow
                                              −
Hamilton cycle, sequenceable if and only if KG has a directed Hamilton path with
                                                     −
colour set G \ e, and R-sequenceable if and only if KG has a directed rainbow cycle
with colour set G \ e.

   The main trick in this section is to use our main theorem iteratively to build rain-
bow paths out of rainbow matchings. One key issue with this idea is that this does not
give us to freedom to construct paths connecting specified end-points, which is criti-
cal for building Hamilton paths, instead of an arbitrary path/cycle-factor. To remedy
this, in Sect. 6.2.1, based on ideas of Kühn, Lapinskas, Osthus, and Patel [44], we
introduce a way of building path systems allowing us to construct path-factors with
specified end-points. The key result of that section, combined with a variant of our
main theorem, allows us to deduce the following theorem.

Theorem 6.9 Let G be a sufficiently large group on n vertices. Let V , C ⊆ G and
x, y ∈ G be such that |V | + 1 = |C| ≥ n − n1/2 , x = y, x, y ∈
                                                               / V , and further suppose
                                                                 −
that e ∈
       / C if G is an elementary abelian 2-group. Then, KG         [{x, y} ∪ V ; C] has a
                                                                              +
directed rainbow Hamilton path from x to y if C = y − x       in Gab , and KG     y} ∪
                                                                                 [{x,
V ; C] has a directed rainbow Hamilton path from x to y if C = x + y + 2 V in
Gab .

   This implies the following characterisation of which rainbow Hamilton paths can
              +
be found in KG  .

                                                   not isomorphic to an elementary
Corollary 6.10 Let G be a sufficiently large group 
abelian 2-group. Let c, x1 , x2 ∈ G such that 0 = G + c − x1 − x2 in Gab , and
                  +
x1 = x2 . Then, KG contains a directed rainbow Hamilton path using the colour set
G − c and with endpoints x1 and x2 .

Proof This is immediate by applying Theorem 6.9 with V := G \ {x1 , x2 } and
(x, y) = (x1 , x2 ) and C = G \ {c}.                                      □
                                                  +
   This gives a characterisation of groups where KG has a directed rainbow Hamilton
cycle which is equivalent to G being harmonious.

Corollary 6.11 Let G be a sufficiently large group satisfying the Hall-Paige condition,
                                                                               +
and suppose G is not isomorphic to an elementary abelian 2-group. Then, KG       has a
directed rainbow Hamilton cycle, i.e. G is harmonious.

Proof Let x1 and x2 be such that x1 x2 = e and x1 = x2 . Such x1 andx2 exist as G is
not isomorphic to an elementary
                                 abelian 2-group. By assumption, G = e in Gab .
Then, 0 = e − x1 − x2 = G + e − x1 − x2 in Gab , hence by Corollary 6.10 we have
a directed rainbow Hamilton path from x1 to x2 using all colours but e. Combined
with the edge x2 → x1 , this gives the desired directed rainbow Hamilton cycle.     □

   We now characterise large sequenceable groups. Note that for abelian groups, the
below result was proved by Gordon [32] (with no assumption on the size of the
group).
842                                                                      A. Müyesser, A. Pokrovskiy

Theorem 6.12 Let G be a sufficiently large group. If G is abelian, suppose that

   G = 0, or equivalently, G has a unique element of order 2. Then, G is sequence-
able.

Proof First suppose G is abelian. Let k = 0 be the unique element of order 2 in G.
Apply Theorem 6.9 with ∗ = −, C =             (x, y) = (0, k), V = G \ {0, k}, noting
                                       G \ {0},
this is possible as y − x − k − 0 = k = G = C. This gives us the desired directed
rainbow Hamilton path with colour set G \ \{0}.
                                              
   If G is nonabelian, let y be such that y = G in Gab and y = e. Such a y exists
since each coset of the commutator subgroup has at least 2 elements. We can now
invoke Theorem 6.9     with C =G − e, (x, y) = (e, y) and V = G − e − y, this is
possible as y − e = C = G in Gab by choice of y. This again gives us the
desired directed rainbow Hamilton path.                                             □

      Using similar ideas, we characterise R-sequenceable groups.

Theorem 6.13 Let G be a sufficiently large group satisfying the Hall-Paige condition,
that is, G = 0 in Gab . Then, G is R-sequenceable.

Proof Let x, y be two distinct elements of the group G, and apply Theorem 6.9
       −
(the KG                = G \ {e, y −1 x}, (x, y) = (x, y) and V = G \ {x, y, e}, this
          case) with C 
application is valid as G = 0. This gives a path from x to y, and combined with
                                                              −
the edge from y → x, we obtain a directed rainbow cycle in KG   using all colours but
e, meaning that G is R-sequenceable.                                               □

      In the rest of this section, we are focused on proving Theorem 6.9.

6.2.1 Sorting networks

In [44] (see in particular Lemma 4.3), an ingenious method was introduced in order
to construct path systems which can connect specified endpoints. The key idea is to
use an appropriate sorting network as a template while building the path system. In
this section, we adapt the arguments from [44] to our context. First, we introduce
some terminology. For a more detailed treatment, we refer the reader to [18].

Deﬁnition 6.14 A comparison network is a union of four types of objects: in-
put nodes x1 , . . . , xm , output nodes y1 , . . . , ym , comparators C1 , . . . , Ct and wires
w 1 , . . . , ws .
   • Comparators are sets of 4 nodes Ci = {yi− , yi+ , xi− , xi+ } (which are disjoint with
        the input and output nodes).
   • Each wire joins an x-node to a y-node. Additionally, each node is in precisely
        one wire, and the directed graph formed by contracting comparators into single
        nodes is acyclic.


Deﬁnition 6.15 A comparison sorting network is a comparison network with the
following additional property. Let σ be any permutation of [m]. Assign each xi the
value v(xi ) = σ (i). Assign the values of the other nodes via the following rules.
A random Hall-Paige conjecture                                                                         843




Fig. 10 A comparison sorting network for sorting four numbers. The black circles represent nodes, the
green rectangles are comparators, and the red arrows are wires. Here the network was given input values
v(x1 ) = 1, v(x2 ) = 3, v(x3 ) = 4, v(x4 ) = 1 (represented by the yellow numbers inside those nodes). Then
all other nodes get a value based on the rules in Definition 6.15 (represented by the yellow numbers in
the other nodes). The network correctly sorted the numbers, which can be seen by the fact that each yi
contains yellow number i (Color figure online)


 1. If xy is a wire then v(y) := v(x).
 2. If Ci = {yi− , yi+ , xi− , xi+ } is a comparator, then v(xi− ) := min(v(yi− ), v(yi+ ))
    and v(xi+ ) := max(v(y − ), v(y + )).
Then, all nodes get assigned a value and moreover, v(yi ) = i for i = 1, . . . , m.

   See Fig. 10 for an example of these definitions. A classical result due to Batcher
[8] states that for all m ∈ N, there is a sorting network with m input/outputs and
100m log2 m comparators. In fact, there are sorting networks with O(m log m) com-
parators thanks to a celebrated result of Ajtai, Komlós, and Szemerédi [1] but we will
not need this sharper bound here. However, it will be convenient for us to have sorting
networks with symmetry in the following sense.

Lemma 6.16 ([1]) For all m ∈ N, there is a sorting network such that the length of
every path from xi to yj is exactly 100 log2 m (in the directed graph formed by
contracting every comparator into a single node).

    The above can be proved by inspecting any common method of constructing a sort-
ing network, for example the method of Batcher [8]. Indeed, the bound of Batcher is
in terms of the depth of the network as opposed to the total number of comparators, so
we can simply add redundant comparators to ensure the conclusion of Lemma 6.16.
    We now show how to simulate the task of a comparator in a sorting network via a
collection of paths.

Lemma 6.17 Let p ≥ n−1/700 . Let R 1 , R 2 be p-random subsets of G, sampled inde-
pendently.
   With high probability, for any U ⊆ G with |U | ≤ p 800 n/104010 , there is a sub-
               ± 1
graph C ⊆ KG     [R \ U ; R 2 \ U ] consisting of 12 vertices and 10 colours contain-
               −
ing vertices x , x + , y − , y + and directed paths Qx − ,y − , Qx + ,y + , Qx − ,y + , Qx + ,y −
with each Qx,y having length 5 and going from x to y. Additionally the vertices and
colours of the path pairs (Qx − ,y − , Qx + ,y + ) and (Qx − ,y + , Qx + ,y − ) both partition the
12 vertices and 10 colours of C.
844                                                                                 A. Müyesser, A. Pokrovskiy

Fig. 11 The analogue of Fig. 12
when proving Lemma 6.17 for
  −
KG   . Aside from replacing S
with the set of elements given in
this figure, the proof for K − is
identical to the one given for
K + (Color figure online)




                                                               +
Fig. 12 The coloured graph produced by Lemma 6.17 for KG         . Each edge is directed towards the right.
Notice that all vertices/edges are labelled by elements of S. Since all w, w ∈ S are separable, this means
that the π -image of this graph has all vertices/colours distinct (and so in particular has 12 vertices and
10 colours as required). To see that it satisfies the lemma, we need to exhibit paths Qx − ,y − , Qx + ,y + ,
Qx − ,y + , Qx + ,y − between x − = x, x + = y, y − = f −1 a, y + = f −1 c. The solid lines in the picture give
the two paths Qx − ,y + , Qx + ,y − . Replacing the coloured solid lines for the coloured dashed lines (and
keeping all grey lines) gives the two paths Qx − ,y − , Qx + ,y + (Color figure online)


                                      ±       +
Proof We prove the lemma when KG         = KG   . A slight change in variables proves
                       ±        −
the lemma also when KG = KG (see Fig. 11). With high probability, Corollary 3.33
applies with R = R 1 ∩ R 2 . Thinking of x, y, a, b, c, d, f , as free variables consider
the set

   S = {x, y, a, b, xd, yd, d −1 b, d −1 c, xf, yf, f −1 a, f −1 c, xa, yb, axd, byd, xb,
        ya, xc, yc, d −1 bxf, d −1 cyf }

(see Fig. 2). Note that all pairs w, w  are linear and separable (by (a), since they’re all
linear in different combinations of free variables). Lemma 3.32 gives a projection π
which separates S and has π(S) ⊆ R. This means that π(w) are distinct for all w ∈ S.
Now the graph given in Fig. 12 satisfies the lemma with x − = π(x), x + = π(y),
y − = π(f −1 a), y + = π(f −1 c), with paths as shown.                                   □

   We now show how to simulate the task of a wire in a sorting network via short
paths.

Lemma 6.18 Let p ≥ n−1/700 . Let HG be a multiplication hypergraph, R 1 , R 2 p-
random subsets of G, sampled independently. With high probability, for any x, y ∈
     ±                                                                                ±
V (KG  ), U ⊆ G with |U | ≤ p 800 n/104010 , there is a length 3 x to y path xuvy in KG
with u, v ∈ R1 \ U, c(xv), c(vy) ∈ R2 \ U .

                                     ±    +                    ±    −
Proof We prove the lemma when KG       = KG . To prove it for KG = KG replace the
                                     −1   −1     −1
definition of S below by S = {u, v, u v, x u, v y}.
A random Hall-Paige conjecture                                                                845

   With high probability, Corollary 3.33 applies with R = R 1 ∩ R 2 . Consider the set
S = {u, v, uv, xu, vy} ⊆ G ∗ F3 . Note that all pairs w, w  are linear and the pairs
(u, v), (xu, uy), (xu, uv), (uv, vy) are separable (since they’re all linear in different
combinations of free variables). Lemma 3.32 gives a projection π which separates
S. Now the path P = xπ(u)π(v)y satisfies the lemma — the vertices are distinct
since u, v are separable, while the colours are distinct since uv, xu, uy are pairwise
separable.                                                                             □

   We now prove the analogue of Lemma 4.3 from [44] adapted to a setting where
                       ±
the host structure is KG .

Lemma 6.19 Let p ≥ n−1/800 . Let t = 8100 log2 n. Let RV and RC be p-random
subsets of G, sampled independently. Then, the following holds with high probability.
                                                           p 1000 n
   Let A, B ⊆ G be disjoint subsets with |A| = |B| ≤ 105000    log(n)3
                                                                       , and let U ⊆ G
                   1000
with |U | ≤ p105000n . Then, there exists V ⊆ RV \ U and C ⊆ RC \ U such that for any
bijection φ : A → B, there exists a system of paths using exactly the vertices/colours
     ±
of KG  [A ∪ B ∪ V ; C] from A to B, each of length t, and connecting a to φ(a) for
each a ∈ A.

Proof With high probability, Lemmas 6.17 and 6.18 apply. Let N be a sorting
network given by Lemma 6.16, with m := |A| = |B|, noting this sorting network
has ≤ 200m log2 m comparators. For each comparator Ci = {xi− , xi+ , yi− , yi+ }, use
Lemma 6.17 to find a subgraph Ci in R \ (A ∪ B). Identify the nodes xi− , xi+ , yi− ,
yi+ of the comparator with the vertices xi− , xi+ , yi− , yi+ of Ci . Let A = {x1 , . . . , xm },
B = {y1 , . . . , ym }. For each wire xy of the sorting network use Lemma6.18 to find
a rainbow length 3 path Pxy joining corresponding vertices of A ∪ B ∪ Ci . By en-
larging the set U at all these applications, we can ensure that the subgraphs Ci are all
disjoint, and that the paths Pxy are all internally disjoint and colour-disjoint
                                                                                    from the
subgraphsCi and from     each other. We  claim  that V = A  ∪ B  ∪     V (C i ) ∪    V (Pw )
and C = C(Ci ) ∪ C(Pw ) satisfy the lemma.
    Consider a bijection φ : A → B. This gives a permutation σ of [m] so that φ(xi ) =
yσ (i) . Assign value v(ai ) := σ (i). This gives a value to each node and wire of the
sorting network as in Definition 6.15. We now translate this into values for the corre-
                                 ±
sponding paths/vertices in KG      . The values we assign come from the set {1, . . . , m} ∪
{0}. For each wire xy of the sorting network, define v(Pxy ) = v(x) = v(y) and give
all vertices/edges of Pxy this value. For each comparator C = {yi− , yi+ , xi− , xi+ } we
have either v(yi− ) = v(xi− ), v(yi+ ) = v(xi+ ) or v(yi− ) = v(xi+ ), v(yi+ ) = v(xi− ). In
the former case, define v(Qy − ,x − ) = v(yi− ) = v(xi− ), v(Qy + ,x + ) = v(yi+ ) = v(xi+ ),
                                 i   i                            i    i
and give the vertices and edges of the corresponding paths the same value. Give the
paths Qy − ,x + and v(Qy + ,x − ) as well as the unused edges of Ci (those edges of Ci not
           i   i                  i   i
on Qy − ,x − or Qy + ,x + ) value 0. In the latter case, define v(Qy − ,x + ) = v(yi− ) = v(xi+ ),
       i   i              i   i                                      i   i
v(Qy + ,x − ) = v(yi+ ) = v(xi− ), and give the vertices and edges of the corresponding
     i   i
paths the same value. As before, give the other two paths and the unused edges value
0. Note that this way every vertex/edge of U gets a value, and these values match
846                                                                                   A. Müyesser, A. Pokrovskiy

those that corresponding nodes/wires have in N . For every i = 1, . . . , m, let
                                                       
                         Pi =               Pxy ∪                     Qy 1 ,x 2 .
                                                                          i    i
                                v(Pxy )=i           v(Q 1   2 )=i
                                                       yi ,xi


We clarify that above xy is quantified over the set of wires, and j is quantified over
{+, −}. We claim that P1 , . . . , Pm are each paths and have all the required properties.
   First note that every vertex in V \ (A ∪ B) has exactly one in-going edge of non-
zero value and exactly one outgoing edge of non-zero value. The vertices ai have no
in-going edges and one out-going edge (whose value is σ (i)). The vertices bi have
no out-going edges and one in-going edge (whose value is i). Combined with the
whole graph being acyclic (which holds due to the sorting network being acyclic),
this shows that Pi is a union of paths.
   Since v(ai ) = σ (i) and v(bi ) = i, path Pσ (i) goes from ai to bσ (i) . In particular,
each Pi is a path. Also, this shows that the paths partition the vertices V and have the
correct endpoints. We now show      that their union is rainbow using exactly the colours
C. The fact that every colour of C(Pxy ) is used exactly once comes from the fact
that every wire has a value, and so every edge of each Pxy as a value. So such colours
are used at least once (and hence exactly once because these colours occur once in the
whole graph). The colours on the comparators Ci are used once as a consequence of
Lemma 6.17. To see this, note each such colour comes up exactly twice — once in the
paths Qx − ,y − ∪ Qx + ,y + and once in the paths Qx − ,y + ∪ Qx + ,y − . By the assignment
          i  i       i   i                             i   i     i   i
of the values to the comparator one of these always has value 0.
   Finally, to see that each Pi has length exactly t, observe that by Lemma 6.16 we
know each Pi has length 100 log2 n when viewed as a path in the sorting network.
As each wire gadget corresponds to a path of length 3 and each comparator cor-
responds to a path of length 5, it follows that each Pi has length 8100 log2 n, as
required.                                                                                □

6.2.2 Deducing Lemma 6.22

We will need the following technical lemma, which allows us to use the nibble
method to saturate large sets of non-random vertices. This is necessary, as after ap-
plying Lemma 6.19 to a random subset, we will be left with a large set of non-random
vertices which do not immediately fit into the setting of our main theorem.

Lemma 6.20 There exists C = C6.20 ≥ 10 sufficiently large so that the following
holds. Let 1/n  γ , and let 1 ≥ a, b, c ≥ 1/ logC n. Set m := max{an, bn, cn} and
let ζ ∈ [0, 1] be such that 1/m ≤ ζ C /C and ζ ≤ min{a, b, c}/100. Suppose  ≥ m −
m1−γ and setting (x, y, z) := ( − an,  − bn,  − cn), suppose that x + y ≤ cn/2,
x + z ≤ bn/2 and y + z ≤ an/2. Let A, B, C ⊆ G be a, b, c-random subsets of G
respectively, sampled with A and B disjoint, and C independent of A, B. Then, with
probability at least 1 − 1/n2.5 the following holds.
    Let A , B  , C  ⊆ G with |B \ B  |, |A \ A |, |C \ C  | ≤ n1−γ , (1 − ζ )|C  | = |A | =
                                                                      ± 
   
|B | = . Then, there is a perfect directed C  -matching in KG         [A , B  ; C  ].
A random Hall-Paige conjecture                                                              847

   To prove the above lemma, we will make use of the following result of Mont-
                                                                  POLY
gomery, Pokrovskiy, and Sudakov. We use the notation x  y to mean that x, y ∈
(0, 1] and there is some absolute constant C ≥ 1 such that the proof works with
x ≤ y C /C. Recall that an edge-coloured graph is globally K-bounded if each colour
occurs at most K times in the colouring. When we say an edge-coloured bipartite
graph is typical, we refer to the typicality of the underlying uncoloured bipartite
graph. We remark that in [47], the following lemma is stated with the additional hy-
                     POLY
pothesis that n−1  γ , but this is easily seen to be redundant as γ being smaller only
makes the statement easier to prove (as a (γ , δ, n)-typical graph is also (2γ , δ, n)-
typical).

                                                                                 POLY
Lemma 6.21 ([47], Corollary 8.12) Let n, δ, p, γ be such that n−1 , γ  p, δ ≤ 1.
Every properly coloured, (γ , δ, n)-typical, globally (1 − p)δn-bounded, balanced bi-
partite graph G of order 2n has (1 − p)δn edge-disjoint rainbow perfect matchings.

Proof of Lemma 6.20 Recall m := max{an, bn, cn} and note that m ≤  + m1−γ . Set
p := m/n. Note that combining the given inequalities we obtain that a + b + c ≥
12(/n)/5 ≥ 11p/5. We define the following random sets.

   • Let A1 , A2 ⊆ A be disjoint p − b and (p − c + ζ )-random subsets of A. Let
     A3 := A \ A1 \ A2 noting that this set is (a − 2p + b + c − ζ ) =: α-random.
   • Let B1 , B2 ⊆ B be (p − a) and (p − c + ζ )-random subsets of B. Let B3 :=
     B \ B1 \ B2 noting that this set is (b − 2p + a + c − ζ ) = α-random.
   • Let C1 , C2 ⊆ C be (p − a) and (p − b)-random subsets. Let C3 := C \ C1 \ C2
     noting that this set is (c − 2p + a + b) =: β-random.

Note there is space to sample these sets disjointly due to the assumptions on the size
of  and a, b, c. In particular, using that a + b + c ≥ 11p/5 and ζ ≤ p/100, we
have that α, β ≥ p/5 − ζ ≥ p/10 = 1/10 logC n and p − a, p − c + ζ, p − b ≥ 0 so
the random sets with these parameters are well-defined. For each pair of random sets
(A2 , B2 ), (A1 , C2 ), and (B1 , C1 ) such that the corresponding randomness parameters
are both at least n−1/600 (the randomness parameter for each pair is in fact equal), we
have that with probability at least 1 − 100/n3 , Lemma 3.8 holds (the linearity and
                                                                       ±
typicality of the corresponding 3-uniform hypergraph of KG               follows by a straight-
forward modification of Observation 3.3, which we omit). By Chernoff’s bound, the
sizes of all these random sets are at most n0.6 away from their expectations with
probability at least 1 − 1/n5 .
   Set ν := n−0.25 . For any v ∈ G, the expected number of (out-)neighbours of v in
  ±
KG [{v} ∪ B3 ; C3 ] is αβ(n − 1), as C is sampled independently with B and the anal-
                                                                              ±
ogous statement holds for expected number of neighbours of v in KG              [A3 ∪ {v}; C3 ].
By Chernoff’s bound and a union bound, both of these random variables are at most
νn away from their expectation with probability at least 1 − 1/n3 . Let dA (a, a  ) de-
                                            ±
note the pair degree of a and a  in KG       [{a, a  } ∪ B3 ; C3 ] (viewed as an uncoloured
                                                                                       ±
                                      
bipartite graph), and let dB (b, b ) denote the pair degree of b and b in KG            [A3 ∪
                                                                       
{b, b }; C3 ]. For each a, a and b, b , we have that E(dA (a, a )) = E(dB (b, b )) =
848                                                                      A. Müyesser, A. Pokrovskiy

αβ 2 n. Further, observe that dA (a, a  ) and dB (b, b ) are 2-Lipschitz random variables.
Hence, by Azuma’s inequality and a union bound, with probability at least 1 − 1/n3 ,
for each a, a  and b, b , dB (b, b ) = dA (a, a  ) = (αβ 2 ± ν)n. This establishes in par-
                ±
ticular that KG   [A3 , B3 ; C3 ] is (ν, β, αn)-typical as an uncoloured bipartite graph. Let
                                                        ±
d(c) denote the number of times c occurs in KG             [A3 , B3 , {c}]. Then E(d(c)) ≤ α 2 n
for each c. By Chernoff’s bound and a union bound, d(c) ≤ (1 ± ν)α 2 n for each
                                              ±
c ∈ G. In particular, this implies that KG      [A3 , B3 , C3 ] is globally (α 2 + ν)n-bounded,
which implies that it is globally (1 − ζ /10)β(αn)-bounded (using bounds on α, β
obtained earlier).
    With probability ≥ 1 − 1/n2.5 , all of the previous properties hold. Let A , B  ,
  
C be given with the indicated properties. By properties coming from Lemma 3.8,
(A2 , B2 , C  \ C), (A1 , B  \ B, C2 ) and (A \ A, B1 , C1 ) each contain matchings cov-
ering all but n1−γ /2 vertices. Here, if the corresponding random sets have parameters
smaller than n−1/600 (so we cannot apply Lemma 3.8), we simply take an empty
matching. This is sufficient as in this case by Chernoff’s bound, the random sets
themselves cannot contain more than n1−1/603 elements. Accounting for differences
A \ A , B \ B  , C \ C  (each of size ≤ n1−γ ), we have a matching covering all but
10n1−γ /2 vertices of (A2 ∩ A , B2 ∩ B  , C  \ C), (A1 ∩ A , B  \ B, C2 ∩ C  ) and
(A \ A, B1 ∩ B  , C1 ∩ C  ).
    The set of leftover vertices of A , B  and C  have a symmetric difference with A3 ,
B3 and C3 (respectively) of size at most 100n1−γ /2 . Set γ  := n−γ /100 . By the pair-
degree and vertex-degree bounds we obtained earlier, this implies that the associated
properly coloured bipartite graph with the leftover vertices is (γ  , β, αn)-typical and
globally (1 − ζ /100)β(αn)-bounded. Then, by Lemma 6.21 we can find a matching
saturating the remaining vertices of A and B  using the leftover colours from C  ,
as desired. To see that the hypothesis of Lemma 6.21 are satisfied, note first that
          POLY
(αn)−1  β holds as β ≥ p/10 ≥ 1/(10 logC n) and n is sufficiently large. Also,
          POLY
(αn)−1  ζ /100 follows from 1/m ≤ ζ C /C (supposing C is sufficiently large) and
αn ≥ 10m (as α ≥ p/10).                                                        □

      We can now give the proof of the key lemma of this section.

Lemma 6.22 Let 1/n  γ , p ≤ 1, let t be a positive integer between log7 (n) and
log8 (n), and set q := p/(t − 1). Let G be a group of order n. Let Vstr , Vmid , Vend
be disjoint random subsets with Vstr , Vend q-random and Vmid p-random. Let C be
a (q + p)-random subset, sampled independently with the previous sets. Then, with
high probability, the following holds.
           , V , V
   Let Vstr                                                 
                 end   mid be disjoint subsets of G, let C be a subset of G, and let
       
 = |Vmid |/(t − 1). Suppose all of the following hold.
                             R ∈ {Vstr                             |RΔR 
                                                                       | ≤ n  . 
  1. For each random                                                          1−γ
                   set       
                                                              that
                                                   , C}, we have
                                      , Vmid , Vend
                                                               
  2. Either O. Vend − Vstr = C or C. Vend + Vstr + 2 Vmid = C
      holds in the abelianization of G.
  3. e ∈/ C  if G is an elementary abelian 2-group.
  4.  := |Vstr | = |V  | = |V  |/(t − 1) = |C  |/t
                       end      mid
A random Hall-Paige conjecture                                                           849

                                 → V  , we have that K ∗ [V  ∪ V  ∪ V  ; C  ]
Then, given any bijection f : Vstr     end                 G str     end    mid
has a rainbow Pt -factor where each path starts on some v ∈ Vstr
                                                                and ends on f (v) ∈
   where ∗ = + if C holds and ∗ = − if O holds.
Vend

Proof Set m = 8100 log2 n, r = 10−100 . Partition Vmid into random subsets
RV , V1 , . . . , Vt−m where RV is rp-random, V1 , V2 , V3 and Vt−m are q-random
and the rest are ((1 − r)p − 4q)/(t − m − 4)-random. Note that 9q/10 ≤ ((1 −
r)p − 4q)/(t − m − 4) ≤ (1 − r 100 )q. Independently with the previous sets, par-
tition C into RC , C1 , . . . , Ct−m where RC is rp-random, C1 , C2 and Ct−m are q-
random, and the rest are ((1 − r)p − 3q)/(t − m − 3)-random. Note similarly that
9q/10 ≤ ((1 − r)p − 3q)/(t − m − 3) ≤ (1 − r 100 )q.
    With high probability, Theorem 4.9 applies with the q-random sets (V2 , V3 , C2 ),
Lemma 6.19 applies with RV , RC and Lemma 6.20 applies with all potential values
of  and all rational values of ζ with denominator at most n for all triples of random
sets
                     (Vstr , V1 , C1 ), (V3 , V4 , C3 ), (V4 , V5 , C4 ), . . . ,
                                                                                         (3)
                        (Vt−m−1 , Vt−m , Ct−m−1 ), (Vt−m , Vend , Ct−m ).

We remark that here we use a union bound over all of the ≤ n potential values of 
and p as well as all of the ≤ log5 n listed triples (note a, b, c ≥ 1/ log9 (n) in each
of these applications). This is possible as the failure probability of Lemma 6.20 is at
most 1/n2.5 . Finally, with high probability, all the random sets have sizes within n0.6
of their expectations.
     Fix all the random sets and the integer  so they have all of the collected properties.
Fix also the sets Vstr  , V  , V  , C  so that they satisfy properties (1-4). Note that
                               mid  end
as the random sets have size close to their expectations, and property (1) holds for
   /V  /V  , this implies in particular that  = qn ± n1−γ /2 . Recall that the max-
Vstr      mid    end
imum and minimum values of the randomness parameters of the random sets listed
in (3) are q and 9q/10 respectively. These imply that  satisfies the requirements for
Lemma 6.20 (with γ /2 playing the role of γ ) to be applicable for each of the triples
in (3)). We define ζ to be a rational number with denominator at most n as close as
                       10
possible to 1/ log10 n as possible while ensuring that /(1 − ζ ) is an integer, noting
ζ also satisfies the constraints of Lemma 6.20 (for any triple in (3)) if n is sufficiently
large.
     We can find some RV ⊆ RV and RC ⊆ RC such that these sets have the property
from Lemma 6.19 with respect to V1 and V2 . That is, for any bijection φ : V1 →
V2 , there exists a system of rainbow paths using exactly the vertices/colours of
  ±
KG    [V1 ∪ V2 ∪ RV ; C  ] from V1 to V2 , each of length m = 8100 log2 n, and con-
necting v to φ(v) for each v ∈ V1 . Note that the relevant inequalities hold while
applying Lemma 6.19 with (A, B) = (V1 , V2 ) and RV and RC , since |V1 | = |V2 | =
 ≤ n/ log7 n  (rp)1000 n/ log4 n since 1/n  rp.
     Distributing the leftover vertices in RV \ RV into Vi (for i ∈  / {1, 2, 3, t − m}), we
can find disjoint subsets V1 , V2 , . . . , Vt−m
                                                  ⊆ G with the following properties.

  1. RV , V1 , V2 , . . . , Vt−m
                                              
                                    partition Vmid
850                                                                                       A. Müyesser, A. Pokrovskiy

  2. For each i ∈ [t − m], |Vi | =  and |Vi \ Vi | ≤ n1−γ /2
  3. For each i ∈ {1, 2, 3, t − m}, |Vi ΔVi | ≤ n1−γ /4

We can perform a similar distribution, adding to each Ci with i = 2 ζ -fraction more
colours than necessary (to be able to apply Lemma 6.20) borrowed from C2 , we can
find disjoint subsets C1 , C2 , . . . , Ct−m
                                              ⊆ G partitioning C  \ RC with the following
property: |Ci | = /(1 − ζ ) for each i = 2, |Ci \ Ci | ≤ n1−γ /4 for each i = 2 and
|C2 ΔC2 | ≤ log9 nζ n.
   Invoke Lemma 6.20 with sets
                      
                   (Vstr , V1 , C1 ), (V3 , V4 , C3 ), (V4 , V5 , C4 ), . . . ,
                                                            
                      (Vt−m−1 , Vt−m , Ct−m−1 ), (Vt−m , Vend , Ct−m )

to find perfect matchings (saturating the vertex sets, and using all but ζ -fraction of
the colours from each of the colour sets). For each i = 2, denote the colour subset
of Ci used in the corresponding perfect matching by Ci . Let C2 be the union of C2
and all of the unused colours from each Ci , that is, Ci \ Ci (i = 2), noting that there
are pn(t − m − 1)  log10 n(ζ n) such unused colours, meaning that C2 is defined to
retake the borrowed colours from earlier.

                | =  and if O holds, we have
                                                                                   
          |C
Claim 6.22.1   0                                               V3 −       V2 =         C2 , and if C holds,
             
we have V3 + V2 = C2 .

Proof To see this, it is convenient to apply the property of RV and RC coming from
Lemma 6.19 with an arbitrary choice of φ. This gives a packing of rainbow paths
      ±
in KG     with the set of endpoints of the paths being V1 , V2 and RC being the set of
colours used on the paths. This, together with assumption (4), and that the colours in
C  \ RC \ C2 have been used to find perfect matchings in the specified sets implies the
                                                                    digraph,
first part of the claim. In the case that we work with the division           considering
                                                                                   
all
  the  directed
                  paths we have found
                                   so far, this implies that  V2 −    Vstr =    C1 +
    RC and Vend − V3 = C3 ∪ C4 ∪ · · · ∪ Ct−m             . Combining these equalities

with O, we obtain the second part of the claim. In the case that we work with the
multiplication digraph instead, a similar argument shows the second part of the claim.
                                                                                         □

   The previous claim allows us to apply Theorem 4.9 with (V2 , V3 , C2 ) to find a
perfect matching directed from V2 towards V3 both in the case of division digraphs
and multiplication digraphs (note C2 cannot contain e if G is Boolean by assump-
tion). Now, we invoke the property of the sets RV and RC with a choice of φ so that
we produce a Pt -factor connecting each v ∈ Vstr to f (v) ∈ Vend . To define such a φ,
for each v ∈ V1 , let v  be the matched neighbour of v in Vstr . Consider the vertex v 
which is obtained by starting with f (v  ) ∈ Vend , and following each matched edge
until we reach a vertex of V2 . Set φ(v) = v  . It is easy to see that this function φ has
the desired behaviour, concluding the proof.                                              □
A random Hall-Paige conjecture                                                            851

6.2.3 Deducing Theorem 6.9

Proof Set t = 2 log7 (n). Let w be the remainder when n is divided by t + 1, and
set  so that n = (t + 1) + w. Note that w ≤ t + 1 ≤ 2 log7 n. Set q := ( − 1)/n and
set p := (t − 1)q, noting 2q + p = 1 ± 3tn . Take random disjoint sets Vstr , Vend , and
Vmid where the former two are q-random and the latter is p-random (noting that this
is essentially a partition of G). Independently, take disjoint random sets C1 and C0
where C1 is (q + p)-random and C0 is q-random (hence C0 and C1 almost partition
G). With high probability, Lemma 6.22 applies with Vstr , Vend , Vmid and C1 (set to be
C in the statement of Lemma 6.22) and t. With high probability, Lemma 6.20 applies
with (Vstr , Vend , C0 ) and  − 1 (in this application, a = b = c = q and  :=  − 1 so
the relevant inequalities hold for Lemma 6.20 to apply). With high probability, all the
random sets have size close to their expectations. Fix sets V , C and vertices x, y as
in the statement of the theorem.
    As w = o(n), we can greedily find a rainbow directed path using vertices from
V \ {y} and colours from C, say P0 , on w + 1 vertices, starting on x and terminating
                                                                        , V  and V 
on some x  where x  . Now, we may partition (V \V (P0 ))∪{x  } as Vstr   end      mid
                                                       
so that x ∈ Vstr and y ∈ Vend ,  = |Vstr | = |Vend | = |Vmid |/(t − 1) (possible due to
the divisibility condition coming from the size of P0 ) and for each random set R, R
and R  have small symmetric difference. For this, it is important that 2q + p = 1 ± 3tn .
                   −5
Set k := n1−10 . We may partition C \ C(P0 ) as C  and C0 so that C0 =  + k − 1,
and C  := C \ C0 where the pairs of sets (C0 , C0 ) and (C1 , C  ) have small symmetric
difference.
   Now, invoke Lemma 6.20 with the sets (Vend       − y, V  − x  , C  ) to find a perfect
                                                              str         0
                               
directed matching from Vend − y to Vstr − x using  − 1 colours coming from C0 ,
                                                 

calling this set C0 . Re-define (without relabelling) C  to include the k unused colours
from C0 , noting that C  still has small symmetric difference with C1 . Note that C  :=
C \ C(P0 ) \ C0 .

                                                                , V  , V  , C.
Claim 6.22.2 Hypothesis 2. of Lemma 6.22 holds with the sets Vstr   end   mid

                              ±       −
Proof Suppose  first that KG      =KG , that            with
                                                is, we work        the division digraph. Then,
it must be that (Vstr     − x  ) −   (V    − y) =       C  from the perfect matching we
                                           
                                           end              0              
found. We also have C0 = C − C  − C(P0 ), and that C(P0 ) = x  − x
               we work with the division digraph). By assumption of the
(again using that                                                                     theorem,
we  also have     C  =   y −  x.   Adding    up all of these equalities, we  obtain        −
                                                                                        Vend
         
   Vstr = C as desired. An analogous argument works for multiplication digraphs
and we omit the details.                                                                     □

   The other hypotheses are easy to verify and thus we can invoke Lemma 6.22 with
                                            → V
an appropriate choice of a bijection f : Vstr      end so that the union of the path
system we obtain combined with the initial perfect matching creates a path directed
from x  to y. Combined with P0 , we obtain the desired path from x to y, concluding
the proof.                                                                        □
852                                                                A. Müyesser, A. Pokrovskiy

6.3 Zero sum partitions

In this section we apply our main theorem to solve a conjecture of Cichacz and a
problem of Tannenbaum about partitions of abelian groups into zero-sum sets.

6.3.1 The Cichacz conjecture

The following lemma makes our main theorem easier to apply by slightly modifying
a set into zero-sum sets of specified size.

Lemma 6.23 Let p ≥ n−1/700 and let R be a p-random subset of an abelian group
                   √ the following holds.
G. With high probability
   Let ∈ [2 log n/ n, p 800 /104010 ]. For any m with |m − pn| ≤ n, g ∈ G and Z
     |Z| ≥ m + 3, |R \ Z| ≤ n, there is a set R  ⊆ Z with |R  | = m, |R  R| ≤ 6 n,
with 
and R  = g.
                                                                  √
Proof By Chernoff’s bound, with high probability ||R| − pn| ≤ √     n log n ≤ n. Also
with high probability, Corollary 3.33 applies to R. Let ∈ [2 log n/ n, p 800 /104010 ],
m with |m−pn| ≤ n, g ∈ G and Z with |Z| ≥ m+3, |R \Z| ≤ n. Let X be a subset
of Z of order m + 3 which either contains or is contained in R ∩ Z (depending on
whether |R ∩ Z| ≤ m + 3 or not). Note that in both cases |X \ R| ≤ m + 3 − |R ∩ Z|
and |R \ X| ≤ |R \ Z|. These give |XR| = |R \ X| + |X \ R| ≤ |R \ Z| + (m +
3 − |R ∩ Z|) = 2|R \ Z| + 3 + m − |R| ≤ 2|R \ Z| + 3 + |m − |R|| ≤ 2|R \ Z| +
3 + ||R| − pn| + |m − pn| ≤ 5 n. Set U = R \         X to get a set of size ≤ 5 n ≤
p 800 n/104005 . Let h be an element such that h = X − g in Gab . Thinking of x
and y as free variables in G ∗ F2 , consider the set S = {hxy, x −1 , y −1 } ⊆ G ∗ F2
and note that all pairs of words in S are linear and separable (by part (a) of the
definition of separable). Thus there is a projection π : G ∗ F2 → G which has π(S) ⊆
R \ U = R ∩ X and which separates S (i.e. has π(hxy), π(x −1 ), π(y −1 ) distinct).
                                     −1       −1
Thus      R = X \ {π(hxy), π(x ), π(y )} gives a set of size |X| − 3 = m with
  setting
   R = X − h = g.                                                                   □

   The first result about zero-sum partitions that we prove gives a zero-sum partition
of a subset of a group into sets of some small fixed size.

Lemma 6.24 Let p ≥ n−1/10 and k = 3, 4, or 5. Let R be a p-random subset of an
                             100


abelian group G. With high probability the following holds.
                                   10            18          
   Let X ⊆ G with |XR| ≤ p 10 n/ log(n)10 , 0 ∈      / X,       X = 0, and |X| ≡
0 (mod k). Then, X can be partitioned into zero-sum sets of size k.

Proof Partition R into (p/k)-random sets R1 , . . . , Rk by placing each vertex of
R in each set independently with probability 1/k. Let S1 , S2 be (p/k)-random,
and chosen independently of these and each other. Note that for i = 1, 2, the
sets Si−1 = {−s : s ∈ Si } are also (p/k)-random and independent
                                                               √    of R1 , . . . , Rk .
By Chernoff’s bound, with high probability, |Ri | = pn/k ± n log n. With high
probability Lemma 6.23 applies to all these sets. Also with high probability, the
A random Hall-Paige conjecture                                                            853

conclusion of Theorems 4.5, 4.4, or 4.6 applies to any choice of 3 sets out of
R1 , . . . , Rk , S1 , S2 , S1−1 , S2−1 aside from choices which use both Si and Si−1 for
i = 1, 2.
                                             10          18 
   Let X ⊆ G with |XR| ≤ p 10 n/ log(n)10 ,                     X = 0, and |X| ≡ 0 (mod k).
                                                                                        10
Partition X into sets X1 , . . . , Xk satisfying |Xi | = |X|/k, |Xi Ri | ≤ p 10 n/
             16  
log(n)10 ,           Xi = 0 for i = 1, . . . , k (to do this, use Lemma 6.23 k − 1 times,
                                                                                   
applying it to the pairs (R, Z) = (R1 , X), (R2 , X \ X1 ), . . . , (Rk−1 , X \ k−2  i=1 Xi )
with p =                                        10            17
                 p/k, m = |X|/k, = p n/ log(n) , g = 0. Afterwards setting
                                                10            10

Xk = X \ k−1       i=1 Xi gives a set with           Xk = 0, |Xk | = |X|/k, and |Xi Ri | ≤
    16                 10
p n/ log(n) ). Use Lemma 6.23 to choose Y1 , Y2 with |Y1 S1 |, |Y2 S1 | ≤
  10                10
    10                 16                                     
p 10 n/ log(n)10 , |Y1 | = |Y2 | = |X|/k and               Y1 , Y2 = 0 (for this application,
use Z = G). We proceed differently based on the value of k:
                                                  
   • If k = 3, then we have X1 + X2 + X3 = 0 and so Theorem 4.6 applies
     to these sets giving a perfect matching (whose edges give a partition of X into
     zero-sum sets of size 3). Note that here we used that 0 ∈    / X in the case that G is
     an elementary 2-group.
                                                                             
   • If k = 4, then          X1 + X2 + Y1 = 0 and               X3 + X3 + Y1−1 =
     0. Thus Theorem 4.6 gives perfect matchings M1 , M2 in HG [X1 , X1 , Y1 ],
     HG [X3 , X4 , Y1−1 ] respectively. For each y ∈ Y1 , let (ay , by , y) and (cy , dy , −y)
     be the edges of M1 /M2 through y/−y respectively. Notice that for each y,
     we have ay + by + cy + dy = (ay + by + y) + (cy + dy − y) = 0 and so
                          : y ∈ Y1 }
     {(ay , by , cy , dy )         gives a partition
                                                        into zero-sum
                                                      of X                sets
                                                                             of size 4.
   • If
       k  =  5, then       X
                              1 +     X 2 +    Y 1 = 0,   X 4 +     X   5 +    Y2 = 0, and
         X3 + Y1−1 + Y2−1 = 0. Thus Theorems 4.4, 4.6 give perfect matchings
     M1 , M2 , M3 in HG [X1 , X1 , Y1 ], HG [X4 , X5 , Y2 ], HG [X3 , Y1−1 , Y2−1 ] respec-
     tively. For each x ∈ X3 , let (x, yx , zx ) ∈ M3 be the edge of M3 through x and let
     (ax , bx , −yx ), (cx , dx , −zx ) be the edges of M1 /M2 through −yx /−zx respec-
     tively. Notice that for each x, we have ax + bx + x + cx + dx = (ax + bx − yx ) +
     (x + yx + zx ) + (cx + dx − zx ) = 0 and so {(ay , by , x, cy , dy ) : x ∈ X3 } gives a
     partition of X into zero-sum sets of size 5.                                           □

   We now prove a version of the previous result where the sizes of the zero-sum sets
are not fixed. We remark that the p = 1, X = G \ e case of the following result proves
Conjecture 1.6 for sufficiently large groups. We’ll work with multisets in this section
and will use mi (M) to denote the number of occurrences of element i in a multiset
M.
                                     99
Lemma 6.25 Let p ≥ 1/ log(n)10 and M ⊆ {3, 4, 5, . . . } be a multiset. Let R be a
p-random subset of an abelian group G. With high probability the following holds.
                                10          24                              
   Let X ⊆ G with |XR| ≤ p 10 n/ log(n)10 , 0 ∈ / X, X = 0, and |X| = M.
Then, X has a zero-sum M-partition.

Proof Without loss of generality, we can suppose that M ⊆ {3, 4, 5}. Otherwise con-
sider a set M  formed by replacing each y ∈ M with y > 5 by y1 , . . . , yt with
854                                                                    A. Müyesser, A. Pokrovskiy

y1 + · · · + yt = y and yi ∈ {3, 4, 5}. It is easy to see that M  still satisfies the hy-
potheses of the lemma and a M  -partition of G gives a M-partition by combining
y1 , . . . , yt -sets into a single y-set for each y.
    For i = 3, 4, 5, fix mi = mi (M). Partition R = R3 ∪ R4 ∪ R5 into disjoint sets
                                                     imi
with Ri being qi -random for qi := 3m3 +4m             4 +5m5
                                                              . For each i ∈ {3, 4, 5}, either
qi ≤ n−1/10 , or with high probability, Ri satisfies the conclusions of Lemmas 6.23
            100


and 6.24. We’ll suppose that q3 ≥ q4 ≥ q5 — the proof is identical if these are or-
dered differently (switching the roles of R3 /R4 /R5 correspondingly). In particular,
we will suppose that R3 satisfies the conclusions of Lemmas 6.23, 6.24, as well as
Lemma 6.1 with high probability.
                             √         Also, with high probability, by Chernoff’s bound,
we have |Ri | = qi pn ± n log n.
                                     10            24 
    Let X ⊆ G with |XR| ≤ p 10 n/ log(n)10 , X = 0, and |X| = 3m√           3 + 4m4 +
5m5 . Notice that since |R| = |R3 | + |R4 | + |R5 | = (q3 + q4 + q5 )pn ± 3 n log n =
         √                                 10          23
pn ± 3 n log n and |R| = |X| ± p 10 n/ log(n)10 , we have pn = 3m3 + 4m4 +
            10              22
5m ± p 10 n/ log(n)10 . Using the definitions of qi , this implies that |Ri | = qi pn ±
√ 5                        10           21
   n log n = imi ± p 10 n/ log(n)10 . In particular, these imply |(R4 ∪ R3 ) ∩ X| ≥
                        10          20
4m4 + 3m3 − 2p 10 n/ log(n)10 ≥ 4m4 + 0.1pn, and |(R5 ∪ R3 ) ∩ X| ≥ 5m5 +
              10              20
3m3 − 2p 10 n/ log(n)10 ≥ 5m5 + 0.1pn (using q3 ≥ q4 , q5 ).
    If q4 (or q5 ) is less than n−1/10 , we will argue that we may assume that m4 =
                                       100


0 (or m5 = 0), only at the expense of working with a set X with a slightly larger
                                                                         10            23
symmetric difference with X, i.e. a set X for which |XR| ≤ p 10 n/ log(n)10 .
To see this, note if q4 ≤ n−1/10 , then we can find 4m4 ≤ n1−ε many zero-sum
                                    100


sets of size 4. We can achieve this by invoking the property from Lemma 6.1. As
               10              100
n1−ε  p 10 n/ log(n)10 , and the set of vertices we delete are zero-sum, we can
continue the argument with m4 = 0, and the remaining vertices of X (which are zero-
sum). If q5 is also small, the same operation can be performed disjointly to find a
small number of zero-sum sets of size 5.
    If mi = 0 for some i ∈ {4, 5}, set Xi = ∅. Otherwise, by the previous para-
graph, the corresponding lemmas apply to Ri , and X4 and X5 are defined via the
following operations. By Lemma 6.23 applied with R = R4 , Z = (R4 ∪ R3 ) ∩ X,
pick a zero-sum set X4 ⊆ (R4 ∪ R3 ) ∩ X with |X4 | = 4m4 and having |X4 R4 | ≤
     10            19
p 10 n/ log(n)10 . By Lemma 6.23 applied with R = R5 , Z = (R5 ∪ R3 ) ∩ X \ X4 ,
pick a zero-sum set X5 ⊆ (R5 ∪R3 )∩X \X4 with |X5 | = 5m5 and having |X5 R5 | ≤
     10            19
p 10 n/ log(n)10 . Let X3 = X \ (X4 ∪ X5 ) and notice that |X3 | = 3m3 , |X3 R3 | ≤
     10            18                              
p 10 n/ log(n)10 , and X3 = X − X4 − X5 = 0. From Lemma 6.24 we
have that each Xi has a zero-sum partition into mi sets of size i. Together, all of these
sets give a zero-sum M-partition of X.                                                  □

6.3.2 Tannenbaum’s problem

In the remainder of this section we characterise the multisets M for which it is possi-
ble to find a zero-sum M-partition of G \ 0 for an abelian group G, thereby resolving
an old problem of Tannenbaum [58]. It is well-known   that abelian groups with just
one involution (an order 2 element of G) have that G = 0, so a zero-sum partition
A random Hall-Paige conjecture                                                        855

in this case is impossible. Abelian groups without involutions have odd order, and for
such groups a characterisation of the multisets M for which G has a zero-sum M-
partition was given byTannenbaum [57] (the necessary and sufficient condition is that
M ⊆ {2, 3, . . . } and M = n − 1). Hence, we will be concerned with abelian groups
with at least 3 involutions for the rest of the section. For groups with 3 involutions,
a characterization was found byZeng [63] (the necessary and sufficient condition is
again that M ⊆ {2, 3, . . . } and M = n − 1). The characterization for groups with
> 3 involutions turns out to be substantially more involved, see Theorem 6.36.
    We begin with the following technical lemma that allows us to work with a random
partition which will be critical for the proof of Lemma 6.27.

Lemma 6.26 Let G be a size n set and suppose G is partitioned as G = {g1 , h1 } ∪
             m } ∪ I (with |I | + 2m = n). Let Y be a p-random subset of [m] and set
. . . {gm , h
X = I ∪ i∈Y {gi , hi }. Then, we can partition X = Q ∪ R ∪ S where Q, R are disjoint
and p/2-random subsets of G, and S is a (1 − p)-random subset of I .

Proof For any i, notice that P ({gi , hi } ∩ X = ∅) = 1 − p and P ({gi , hi } ⊆ X) = p,
and P (|{gi , hi } ∩ X| = 1) = 0, with these events being independent for different i.
In order to make sure that elements end up in Q/R/S independently, we need to
define them carefully as follows: Define Q, R, S conditional on the outcome of Y
as follows: For each {gi , hi } such that i ∈ Y , place both gi , hi in Q with probability
a = p/4, place both gi , hi in R with probability a = p/4, place gi in Q and hi in
R with probability b = 1/2 − p/4, and place gi in R and hi in Q with probability
b = 1/2 − p/4 (noting that 2a + 2b = 1). Additionally place each k ∈ I into Q with
probability p/2, into R with probability p/2, and into S with probability (1 − p).
Do these latter set of choices independently of each other, and independently of the
former choices made while choosing Y .
   It remains to show that Q and R are disjoint p/2-random subsets of G, as that Q,
R, S partitions X and that S is a (1 − p)-random subset of I follows directly. First,
note that each element g of G is included in Q with probability p(a + b) = p/2,
included in R with probability p(a + b) = p/2, and included in both Q and R with
probability 0, regardless of whether g ∈ I . Now, we show that the collection of such
events for each g ∈ G are independent. Since choices for different i are already done
independently, it is sufficient to show that for all i, {gi , hi } ∩ Q and {gi , hi } ∩ R
are p/2-random subsets of {gi , hi }. Fix some i, and note that P (gi ∈ Q) = P (hi ∈
Q) = p(a + b) = p/2, P (gi , hi ∈ Q) = pa = (p/2)2 , P (gi ∈ Q, hi ∈       / Q) = P (gi ∈/
Q, hi ∈ Q) = pb = (p/2)(1 − p/2), and P (gi , hi ∈     / Q) = 1 − p + pa = (1 − p/2)2 .
The same holds for R (since Q and R are symmetric), and so we get that {gi , hi } ∩ Q
and {gi , hi } ∩ R are p/2-random subsets of {gi , hi } as required.                    □

   Let I (G) be the set of order 2 elements of G, noting that I (G) ∪ {0} is isomor-
phic to Zk2 for some k. Define f (G) = (|G| − |I (G)| − 1)/2 and note that f (G) is
the number of inverse pairs in G (and so in particular an integer). A trivial necessary
condition to have a zero-sum M-partition of G \ 0 is that f (G) ≥ m2 (M) (other-
wise some involution would have to be contained in a zero-sum 2-set of the partition,
which is impossible). The following lemma shows that for any multiset M it is pos-
sible to find a zero-sum M-partition of a group G as long as m2 (M) is significantly
smaller than f (G).
856                                                                  A. Müyesser, A. Pokrovskiy

Lemma 6.27 Let G be a sufficiently   large abelian group with |I (G)| ≥ 3, and M ⊆
{2, 3, 4, 5, . . . } a multiset with M = n − 1 and m2 (M) ≤ f (G) − 0.0001n. Then
G \ {0} has a zero-sum M-partition.

Proof As in Lemma 6.25, without loss of generality, we can assume that M ⊆
{2, 3, 4, 5}. Define mi := mi (M) for i = 2, 3, 4, 5. The basic idea will be to parti-
tion use Lemma 6.25 to get m3 /m4 /m5 sets of orders 3/4/5 in such a way that the
remaining elements form inverse pairs. We will apply Lemma 6.25 three times in
order to achieve this, twice to random subsets R, Q in the group G, and once to a
random subset S in the group I (G) ∪ e. In the paragraphs that follow, we construct
                 and checkthe properties needed for Lemma 6.25.
these random sets,
   Note that       i≥3 imi =    M − 2m2 = n − 1 − 2m2 =       
                                                                 2f (G) + |I (G)| −
                                                                        M−2m2 −|I (G)|
                                        4 +5m5 −|I (G)|
2m2 ≥ |I (G)| + 0.0002n. Let p = 3m3 +4m2f (G)          =                  2f (G)      =1−
  m2        f (G)−m2 (G)                                 10             26               Q
f (G) ≥                    ≥ 0.0001. If |I (G)| ≥ p n/ log(n) , then set mi =
                                                       10             10
                   n
       pmi n                 1 pmi n                        1 pmi n
 12 n−1−2m   2
                , mR i =  2 n−1−2m2 , mi = mi − 2 2 n−1−2m2  for i = 3, 4, 5. If
                                           S
                  10           26           Q
|I (G)| < p 10 n/ log(n)10 , then set mi = mi /2, mR        i = mi − mi /2 and mi = 0
                                                                                        S
                                                                   Q
for i = 3, 4, 5. Note that in both cases, we have mi = mi + mR             i + mi for each
                                                                                   S
                                                    10             26             5
i = 3, 4, 5. Also note that when |I (G)| ≥ p n/ log(n) , we have i=3 mSi ±
                                                  10             10
                             
12 = 5i=3 i(mSi ± 1) = 5i=3 (imi − n−1−2m    pimi n
                                                      ) = |I (G)| + 2f (G) − 2m2 − pn =
                                                    2
                                                                                5       Q
|I (G)|(1 − p) − p ≤ |I (G)| − 3, and that in all cases we have                   i=3 imi ≤
5               5                                           ∗       ∗        ∗       ∗
    i=3 imi −        i=3 imi − 3. For ∗ = Q, R, S, define M = {m3 × 3, m4 × 4, m5 × 5}
                           S

and note that M Q ∪ M R ∪ M S ∪ {m2 × 2} = M.
     Recall 2f (G) = n − |I (G)| − 1 and enumerate G \ (I (G) ∪ {e}) as g1 , g1−1 , . . . ,
gf (G) , gf−1(G) . Pick a p-random set Y of {1, . . . , f (G)}, and set X = I (G) ∪
               −1
    i∈Y {gi , gi }, noting that E(|X|) = 2pf (G) + |I (G)| = 3m3 + 4m4 + 5m5 . Use
Lemma 6.26 to partition X = Q ∪ R ∪ S with Q, R p/2-random and S a (1 − p)-
random subset of I (G).

Claim 6.27.1 With positive
                     √      probability, the following all hold.
  1. f (G) − m2 − n log n√≤ |Y | ≤ f (G) − m2 .
  2. 3m3 + 4m4 + 5m5 − 2 n log n ≤ |X| ≤ 3m3 + 4m4 + 5m5
  3. |Q|, |R|, |S| = 3m∗3 + 4m∗4 + 5m∗5 ± p 10 n/ log(n)10 (for ∗ = Q, R, S).
                                                10           25


  4. Q, R satisfy Lemmas 6.23 and 6.25 with respect to G.
                      10          26
  5. If |I (G)| ≥ p 10 n/ log(n)10 , then S satisfies Lemmas 6.23 and 6.25 with re-
     spect to the subgroup I (G) ∪ e.

Proof We’ll show that with probability ≥ 1/2 the upper bounds of (1) and (2) both
hold, whilst all other parts of the claim hold with high probability. For the up-
per bound of (1), note that |Y | is a binomial random variable with expectation
pf (G) = (3m3 + 4m4 + 5m5 − |I (G)|)/2 = f (G) − m2 ∈ Z. For binomial ran-
dom variables, if the expectation is an integer, then it is also the median. Thus
we have that the median of |Y | is f (G) − m2 which shows that the upper bound
(1) holds with probability ≥ 1/2. The lower bound of (1) comes from Chernoff’s
A random Hall-Paige conjecture                                                                    857

bound. Note that |X| = 2|Y | + |I (G)| and 2m2 + 3m3 + 4m4 + 5m5 = n − 1 =
2f (G) + |I (G)| show                                       √ Chernoff’s bound gives
                    √ that (1) implies (2). For (3), note that
|Q|, |R| = pn/2 ± n log n and |S| = (1 − p)|I (G)| ± n log n. When |I (G)| ≥
    10           26                                          Q        
p 10 n/ log(n)10 , then pn/2 = 12 5i=3 i n−1−2m
                                             pmi n
                                                     = 5i=3 imi ± 3 = 5i=3 imR  i ±
                       5                          2
                                                                     10           26
3 and (1 − p)|I (G)| = i=3 imi ± 13 imply (3). When |I (G)| < p n/ log(n) ,
                                S                                  10           10

then |S| ≤ |I (G)| gives
                    √ (3) for “S”, while the result for Q, R then follows from (2)
and |Q| = |R| ± 2 n log n. Properties (4), (5) are immediate from Lemmas 6.23
and 6.25.                                                                          □

     Partition G \ (X ∪ {0}) into f (G) − |Y | zero-sum sets of size 2 as Z|Y          2
                                                                                         |+1 , . . . ,
Zf2 (G) . Notice that we have f (G) ≥ f (G) − m2 ≥ |Y |, and so we can set J =
     |+1 ∪ · · · ∪ Zf (G)−m2 to get a zero-sum set of size exactly 2f (G) √     − 2m2 − 2|Y | =
Z|Y2                 2

n − 1 − 2m2 − |X| = 3m3 + 4m4 + 5m5 − |Q| − |R| − |S| ≤ 3 n log n. When
                  10            26
|I (G)| ≥ p 10 n/ log(n)10 , use Lemma 6.23 (with Z = I (G)) to pick a subset
                                                                                       
S  ⊆ I (G) with |SS  | ≤ p 10 n/ log(n)10 , |S  | = 3mS3 +4mS4 +5mS5 and S  = 0.
                                   10            25

                                                                                        
Otherwise set S  = ∅ (In this application we use Z = I (G) and m = 5i=3 mSi
which satisfy m ≤ |Z| − 3 from the first paragraph). Use Lemma 6.23 to find a set
Q ⊆ (X ∪ J ) \ S  with |QQ | ≤ p 10 n/ log(n)10 , |Q | = 3m3 + 4m4 + 5m5
                                              10             24               Q        Q           Q
                                                                             
and Q = 0 (In this application we use Z = (X ∪ J ) \ S  and m = 5i=3 mi which
                                                                                         Q
                                                                               
satisfy m ≤ |Z| − 3 from the first paragraph). Set R = (X ∪ J ) \ (Q ∪ S ) and note  
                                                                                
that |RR  | ≤ p 10 n/ log(n)10 , |R  | = 3mR
                       10             23
                                                    3 + 4m4 + 5m5 , and           R = 0. Apply
                                                            R         R

Lemma 6.25 to ∗ = Q , R  , S  to get M ∗ -partitions of these sets respectively. Putting
the partitions of Q , R  , S  together with the sets Zm
                                                         2 , . . . , Z2
                                                            2         f (G) , we get a zero-sum
M-partition of G.                                                                                  □

   In the rest of the section we deal with groups and multisets having f (G) −
0.0001 ≤ m2 (M) ≤ f (G). We say that a subset of an abelian
                                                       group S is Σ-generic if
for every proper non-empty subset A ⊆ S, we have that A is generic.

Lemma 6.28 Let 3 ≤ k ≤ 10 and let G be a sufficiently large abelian group with
|I (G)| ≥ n/109000 . Then I (G) contains a zero-sum set S of size k which is Σ-generic
(in G).

Proof Let H = I (G) ∪ e and recall that this is a subgroup. Let v1 , . . . , vk be free
                                       −1
variables in H ∗ Fk−1 . Let y = vk−1       . . . v1−1 and set S = {v1 , . . . , vk−1 , y}, not-
                        
ing that pairs w, w ∈ S are linear and separable (using part (a) of the           definition
of “separable”). For all nonempty A ⊆ {v1 , . . . , vk−1 }, define gA = A and set
T = {gA : {v1 , . . . , vk−1 } ⊇ A = ∅}. Notice that all elements of T are linear. By
Lemma 3.32, there is a projection π : H ∗ Fk−1 → H which separates π(S ∪ T ) and
has π(S ∪ T ) ⊆ H \ N (G) (for this application, we have p = 1, n = |H | ≥ n/109000
and U = N(G) ≤ 10−9000 ≤ p 800 n/10      4000 since n is sufficiently large). We have that

π(S) is a zero-sum set of size k (since S = e and all pairs w, w  ∈ S are separable).
The fact that π(S) is Σ-generic follows from π(T ) being generic (for A ⊆ S \ vk , the
definition of “Σ-generic” is immediate for π(A) due to π(gA ) being generic. For A
858                                                                  A. Müyesser, A. Pokrovskiy

                                          
containing vk , note that       π(A) = −       π(S \ A) which is generic because π(gS\A )
is generic).                                                                          □

   The following theorem was poved independently by Caccetta-Jia, Engawa, and
Tannenbaum and classifies what sorts of zero-sum partitions the groups Zm
                                                                        2 has. We
use it as a black box.

Theorem 6.29 (Cacceta-Jia
                         [15]; Engawa [21]; Tannenbaum [58]) For every multiset
M ⊆ {3, 4, . . . } with M = 2m − 1, the group Zm
                                               2 \ {0} has a zero-sum M-partition.

   The following lemma is basically a version of this theorem, but additionally guar-
antees that one set in the partition is Σ-generic.

Lemma 6.30 Let m ≥ 2 and G be a sufficiently large     abelian group of order n with
|I (G)| ≥ 3. Let M ⊆ {2, . . . , 10} be a multiset with   M = n − 1 and m2 (M) =
f (G). Fix some x ∈ M. Then, there is a zero-sum M-partition of G \ {0}. Additionally
we can assume that a size x set in this partition is Σ-generic (in G).

Proof Let M  ⊆ M be the sub-multiset               of all elements of size at least 3
                                          consisting
and let M  = {m2 (G) × 2}. Note that M  = M − 2m2 (M) = n − 1 − 2f (G) =
|I (G)| − 1 and that G \ (I (G) ∪ {0}) has a zero-sum M  -partition P.
    If |I (G)| ≤ n/109000 , then note that for every g, the number of solutions to x 2 = g
in G is either |I (G)| + 1 or 0 (for any two such solutions x, x  , we have y = x −1 x 
is a solution to y 2 = e and the set of such solutions is exactly I (G) ∪ e). This means
that when |I (G)| ≤ n/109000 , everything is generic, and so all sets are Σ-generic. To
get the lemma, use Theorem 6.29 to get a M  -partition of I (G). Extend this to a M-
partition satisfying the lemma by adding P. The same argument works if |I (G)| ≥
n/109000 and x = 2 (since there are at most 109000 ≤ f (G) non-generic elements,
one of the sets in P always has only generic elements).
    So, suppose that |I (G)| ≥ n/109000 and x ≥ 3. Let H = I (G) ∪ e, recalling
that this is a subgroup. Use Lemma 6.28 to find a Σ-generic set S1 of size x. Let
                                                               24          
X = I (G) \ (S1 ∪ e) and note that |XH | ≤ |H |/ log10 |H | and              X = 0. By
Lemma 6.25 applied to H with p = 1, X has a zero-sum (M  \ {x})-partition. To-
gether with S1 and P, this gives a zero-sum M-partition of G.                           □

  The following two lemma deals with the case when m2 and f (G) are within a
small additive constant of each other.

Lemma 6.31 Let G be a sufficiently   large abelian group with |I (G)| ≥ 3. Let M ⊆
{2, . . . , 10} be a multiset with M = n − 1, t := f (G) − m2 (M) ∈ {0, . . . , 10}. Sup-
pose that the t largest elements of M are all ≥ 3 and add up to ≥ 2t + 3. Then G \ {0}
has a zero-sum M-partition.

Proof If f (G) = 0, then G ∼ = Zk2 and m2 (M) = 0, and so the lemma follows from
Theorem 6.29. So, suppose f (G) ≥ 1. Since f (G) = (n − |I (G) ∪ {0}|)/2 > 0 and
I (G) ∪ {e} is a subgroup, Lagrange’s Theorem tells us that |I (G) ∪ {0}| ≤ n/2.
A random Hall-Paige conjecture                                                                           859

    Let y1 , . . . , yt be the t largest elements of M, noting y1 , . . . , yt ≥ 3 and
y1 + · · · + yt ≥ 2t + 3. Let y0 = y1 + · · · + yt − 2t ≥ 3, y1 , . . . , yt = 2, and set
M  =(M \ {y1       , . . . , yt }) ∪ {y0 , y1 , . . . , yt }. Note that m2 (M  ) = m2 (M) + t = f (G)
and            
            M = M = n − 1. Use Lemma 6.30 to find a zero-sum M-partition of
G having a Σ generic size y0 set A. Note that y0 = y1 + · · · + yt − 2t means
that we can partition A = A1 ∪ · · · ∪ At into sets of size |Ai | = yi − 2. Label
                        y −2                                               y −2
Ai = {ai1 , . . . , ai i } and set ai = Ai = ai1 . . . ai i . Thinking of x as the free
variable in G ∗ F1 , define S = {x, a1 x, a2 a1 x, . . . , at−1 . . . a2 a1 x}. Also define the
                                                                                                       y −2
partition S ∪ S −1 ∪ A = T1 ∪ T2 ∪ · · · ∪ Tt with T1 = {x, x −1 a1−1 , a11 , . . . , a1 1 },
                                                           −2
T2 = {a1 x, x −1 a1−1 a2−1 , a21 , . . . , a2 2 }, . . . , Tt = {at−1 . . . a2 a1 x, x −1 , at1 , . . . ,
                                                        y
  y −2
at t } (more formally, if we denote xi := ai . . . a1 x, then we have S = {x0 , . . . , xt−1 }
and Ti = Ai ∪ {xi−1 , xi−1          (mod t−1) }).
    Note that for all w ∈ S ∪ S −1 are linear and all non-inverse w, w  ∈ S ∪ S −1 are
separable (for this, first notice that by Σ-genericness, all partial product ai ai−1 . . . aj
are generic unless i = t, j = 1. Now if w, w  ∈ S or w, w  ∈ S −1 then the pair is
separable by (c), while if w ∈ S, w  ∈ S −1 the pair is separable by (b)). Using Lem-
mas 3.29 and 3.30, find a projection π which separates S and has π(x) ∈                         / I (G) ∪ {e}
(Lemma 3.30 gives us 0.9n projections which separate S, while Lemma 3.29 tells
us that there are |I (G) ∪ {0}| ≤ n/2 projections with π(x) ∈ I (G) ∪ {0}). Note
that π(x) ∈      / I (G) ∪ {0} implies that π(S) is disjoint from I (G) ∪ {0} (using that
a1 , . . . , ak ∈ I (G) ∪ {0} and I (G) ∪ {0} is a subgroup, we have that all y ∈ π(S) are
in one of the cosets π(x)(I (G) ∪ {0}) or π(x −1 )(I (G) ∪ {0})). Note that this implies
that all the elements in π(S) are distinct (all non-inverse pairs w, w  ∈ S are separable
giving π(w) = π(w  ). For w, w  ∈ S with w  = w −1 , we cannot have π(w) = π(w  )
since π(S) is disjoint from I (G) ∪ {e}). Now, in each case replace π(S) ∪ π(S −1 ) ∪ A
in the original M  -partition, by π(T1 ), . . . , π(Tt ). This gives a M-partition of G. □

  The next lemma is a stronger version of the previous one with the “t largest ele-
ments of M are all ≥ 3” condition dropped.

Lemma 6.32 Let G be a sufficiently   large abelian group with |I (G)| ≥ 3. Let M ⊆
{2, . . . , 10} be a multiset with M = n − 1, t := f (G) − m2 (M) ∈ {0, . . . , 5}. Sup-
pose that the t largest elements of M add up to ≥ 2t + 3. Then G \ {0} has a zero-sum
M-partition.

Proof The proof is by induction on t. The initial cases are t = 0 and t = 1 which
follow trivially from Lemma 6.31. Suppose that t ≥ 2 and that the lemma is true
for smaller t. Let m1 ≥ · · · ≥ mt be the t largest elements of M and note that if
           the lemma follows from Lemma 6.31. Thus we can assume that mt = 2.
mt ≥ 3, then
Note that mi ≥3 imi = |I (G)| + 2t ≥ 2t + 3 which gives m1 + · · · + mt ≥ 2t + 5.
Note that we cannot have m1 ≤ 3 since then m1 + · · · + mt−1 ≤ 3(t − 1), giving
2t + 5 ≤ m1 + · · · + mt ≤ 3t − 1 which is impossible for t ≤ 5.
   We have established that m1 ≥ 4 and m1 + · · · + mt ≥ 2t + 5. Consider the multiset
M  = (M \ {m1 }) ∪ {m1 − 2, 2}. If m1 ≥ 5, then we have f (G) − m2 (M  ) = t − 1
and the t − 1 largest elements of M  add up to ≥ (m1 − 2) + m2 + · · · + mt−1 =
860                                                                          A. Müyesser, A. Pokrovskiy

(m1 + m2 + · · · + mt ) − 4 ≥ (2t + 5) − 4 = 2(t − 1) + 3. If m1 = 4, then we have
f (G) − m2 (M  ) = t − 2 and the t − 2 largest elements of M  add up to ≥ m2 + · · · +
mt−1 = (m1 + m2 + · · · + mt ) − 6 ≥ (2t + 5) − 6 = 2(t − 2) + 3. In either case, by
induction, there is a zero-sum M  -partition of G. Combining the size m1 − 2 and 2
sets in this partition into a size m1 set produces a M-partition.                      □

      We’ll need the following result about zero-sum 3-sets.

Lemma 6.33 Let G = Zm   2 , Z2 × Z4 be a sufficiently large abelian group. Then there
                              m

are n/100 disjoint triples of distinct non-involutions x, y, z with x + y + z = 0.

Proof In any large abelian group G, Lemma 6.25 applied with p = 1, and X ⊆ G\{0}
a zero-sum set of cardinality at least n − 4 and divisible by 3 gives 0.33332n
disjoint zero-sum 3-sets (that such a subset X exists follows from Lemma 6.23).
If G = Zm   2 , Z2 × Z4 , Z2 × Z3 , then |I (G) ∪ {0}| ≤ 0.25n. At least 0.33332n −
                     m             m

0.25n ≥ 0.01n of these zero-sum 3-sets must also be disjoint from I (G) ∪ {0}.
All of these sets satisfy the lemma, so it remains to just look at Zm                   2 × Z3 . In
this case, we know from Theorem 6.29 that Zm                  2  has 0.1n disjoint zero-sum     3-sets
{x1 , y1 , z1 }, . . . , {x0.1n , y0.1n , z0.1n }. Let (0, 1) be the generator of the Z3 subgroup
of Zm 2 × Z3 . Now {(x1 , 1), (y1 , 1), (z1 , 1)}, . . . , {(x0.1n , 1), (y0.1n , 1), (z0.1n , 1)} are
zero-sum 3-sets of non-involutions.                                                                 □

                                                                    2 × Z4 , so
  Somewhat annoyingly, our proof doesn’t quite work with the group Zm
we deal with this group by hand in the following lemma.

Lemma 6.34 For sufficiently large m, let G = Zm 2 × Z4 . Let t ∈ [3, 0.001f (G)] with
|I (G)| + 2t ≡ 0 (mod 3) and consider the multiset M = {(f (G) − t) × 2, 13 (|I (G)| +
2t) × 3}. Then (Zm2 × Z4 ) \ {0} has a zero-sum M-partition.

Proof Note f (G) = 2m and |I (G)| = 2m+1 − 1. Write t = k + 3s for k ∈ {3, 4, 5}
and s ∈ Z. Note that |I (G)| + 2k ≡ |I (G)| + 2(k + 3s) ≡ |I (G)| + 2t (mod 3), and
so we can define a multiset M  = {(f (G) − k) × 2, 13 (|I (G)| + 2k) × 3}. Note that
 
   M = 2(f (G) − k) + 33 (|I (G)| + 2k) = n − 1, and that the k largest elements of M 
add up to ≥ min(3k, |I (G)| + 2k) ≥ 2k + 3. Thus Lemma 6.32 gives us               a zero-sum
M  -partition of G. Let S be the family of 3-sets in this partition. Let K = S \ I (G),
noting that |K| = 2k.
   Let (0, 1) be the generator of the Z4 subgroup of Zm          2 × Z4 . Note that I (G) =
{(x, 0), (x, 2) : x ∈ Zm   } \ (0, 0). Let K   = K ∪ (K + (0, 1)) ∪ (K + (0, 2)) ∪ (K +
                         2
(0, 3)) noting that |K  | ≤ 8k. Let S  ⊆ S be the subfamily of 3-sets which are disjoint
from K  and of the form “{(x, 0), (y, 0), (z, 0)}”. We claim that |S  | ≥ 0.01n. To see
this, first not that there are at most |K  | ≤ 24 3-sets intersecting K  . All the remaining
≥ 13 (|I (G)| + 2k) − 24 = 13 2m+1 − 24 sets must be of the form {(x, 0), (y, 0), (z, 0)}
or {(x, 2), (y, 2), (z, 0)} for some x, y, z ∈ Zm                            m
                                                    2 . There are at most 2 /2 3-sets of the
form {(x, 2), (y, 2), (z, 0)} in S (since |{(x, 2) : x ∈ Z2 }| = 2 and every triple of this
                                                             m       m

form used two elements of {(x, 2) : x ∈ Zm      2 }), leaving us with 3 2
                                                                       1 m+1
                                                                               − 24 − 2m /2 ≥
0.01n 3-sets in S .  
A random Hall-Paige conjecture                                                           861

    For each S ∈ S  , let S = {aS , bS , cS } and note that AS = {aS + (0, 1), aS + (0, 3)},
BS = {bS + (0, 1), bS + (0, 3)}, CS = {cS + (0, 1), cS + (0, 3)} must be distinct 2-
sets in the partition (using that S ∈ S  ). Define three zero-sum sets TSa = {aS , bS +
(0, 1), cS + (0, 3)}, TSb = {bS , cS + (0, 1), aS + (0, 3)}, TSa = {cS , aS + (0, 1), bS +
(0, 3)}. Now for each S ⊆ S  , replace S, AS , BS , CS in the original partition by TSa ,
TSb , TSc to get a M-partition of G.                                                       □

   The following lemma finds zero-sum M-partitions for multisets M with f (G) −
m2 (G) outside of the ranges considered by Lemmas 6.27 and 6.32.

Lemma 6.35 Let G be a sufficiently large abelian group with |I (G)| ≥ 3. Let M ⊆
{2, . . . , 10} be a multiset with f (G) − m2 (M) ∈ [3, 0.001n]. Then G \ e has a zero-
sum M-partition.

Proof As in Lemma 6.31, we can assume that |I (G) \ 0| ≤ n/2. The proof is by
induction on t. The initial cases are when t = 3, 4, 5, in which case the lemma follows
from Lemma 6.32 (to see this, we need to know that the condition “the t largest
elements of M add up to at least 2t + 3”   holds for these values           y1 ≥ · · · ≥
                                                                t of t. Letting
                                              t
yt be the t largest elements,
                                note that       y
                                              i=1 t ≥  ty t and       y
                                                                  i=1 t   ≥    i>yt imi (M)
both hold. Now, using i≥3 imi (M) = n − 1 − 2m2 (M) = |I (G)| + 2t ≥ 2t + 3,
                             
we get ti=1 yi ≥ min(3t, i≥3 imi (M)) ≥ min(3t, 2t + 3) = 2t + 3). Now suppose
that t ≥ 6 and that the lemma holds for multisets M  with f (G)− m2 (M  ) < t and
let M ⊆ {2, . . . , 10} be a multiset with f (G) − m2 (M) = t, and M = n − 1.
    Suppose that max M ≥ 4. Let M  = (M \ {max M}) ∪ {max M − 2, 2}. Note that
f (G) − m2 (M  ) = t − 1 or t − 2 (depending on whether max M = 4 or not). By
induction, there is a zero-sum M  -partition of G. Combining the size max M − 2 and
2 sets in this partition into a size max M set produces a M-partition.
    Suppose that max M ≤ 3, which implies that M ⊆ {2, 3}. If G = Zm          2 × Z4 , then
the lemma follows from Lemma 6.34, so suppose this doesn’t happen. Let M  =
(M \ {3, 3}) ∪ {2, 2, 2}. Note that f (G) − m2 (M  ) = t − 3, so by induction, we get
an M  -partition of G. In this partition there are 2(t − 3) ≤ 0.01n non-involutions
in sets of size ≥ 3. Therefore Lemma 6.33 gives us a zero sum set {x, y, z} of non-
involutions so that {x, −x}, {y, −y}, {z, −z} are sets in the M  -partition. Now replace
{x, −x}, {y, −y}, {z, −z} by {x, y, z}, {−x, −y, −z} to get an M-partition of G. □

   The following is the main result of this section. Together with earlier results of
Tannenbaum [57] and Zeng [63], it answers a problem of Tannenbaum from 1983
[58].

Theorem 6.36 Let G be a sufficiently large abelian group with |I (G)| ≥ 3 and let
M ⊆ {2, 3, 4, . . . } be a multiset. Then there is a zero-sum M-partition of G \ {0} if,
      if, all of the following are true.
and only
  1.     M = n − 1 and f (G) ≥ m2 (M).
  2. If f (G) = m2 (M) + 1, then max M ≥ 5.

Proof “If” direction: Let t = f (G) − m2 (M) and note that this is ≥ 0 by (1). As
in Lemma 6.25, without loss of generality, we can suppose that max M ≤ 10. Note
862                                                                         A. Müyesser, A. Pokrovskiy

that if t ≥ 3, then we get a zero-sum M-partition by Lemma 6.27 or Lemma 6.35.
Otherwise, we apply Lemma 6.32, where we additionally need the condition that
“the t largest elements of M add up to at least 2t + 3”. For t = 1, we have
max M ≥ 5 ≥ 2 × 1 + 3. For t =2, let x1 , x2 ∈ M be the two largest elements
of M. We have x1 , x2 ≥ 3 (since xi ≥3 xi = |I (G)| + 2t ≥ 3 + 2 × 2 which im-
plies that x1    , x2 = 2). We also have x1 ≥ 4 (otherwise we’d have M ⊆ {2, 3} giving
3m3 (M) = M − 2m2 (M) = n − 1 − 2m2 = |I (G)| + 2f (G) − 2m2 = |I (G)| + 4,
which gives a contradiction since on one hand 3m3 (M) ≡ 0 (mod 3), but on another
hand |I (G)| + 1 = 2j for some j and so |I (G)| + 4 = 2j + 3 ≡ 1 or 2 (mod 3)).
These give x1 + x2 ≥ 4 + 3 ≥ 2 × 2 + 3.
    “Only if” direction: Consider some zero-sum M-partition G \ e = S1 ∪ . . . Sk .
Then, by the definition of “M-partition”,               we have the equality between multi-
sets {|Si | : i = 1, . . . , k} = M, which gives           M = |G \ e| = n − 1. Suppose that
S1 , . . . , Sm2 (M) are the size 2 sets of this partition. Then for each i, we must have
Si = {gi , gi−1 }, where gi are distinct non-involutions of G. This means that S1 ∪ · · · ∪
Sm2 (M) ⊆ G\(I (G)∪e) giving 2m2 = |S1 ∪· · ·∪Sm2 (M) | ≤ n−1−|I (G)| = 2f (G).
Thus we have established (1).
    If f (G) = m2 (M) + 1, then we learn that there is some unique non-involution
g with g, −g ∈       / S1 ∪ · · · ∪ Sm2 (M) . Note that it’s impossible for a zero-sum set to
have precisely one non-involution (since I (G) ∪ e is a subgroup of G), and so
we get that g, −g ⊆ Sj for some zero-sum set Sj in the partition. Letting Sj =
{g, −g, a1 , . . . , a|Sj |−2 }, we get that a1 + · · · + a|Sj |−2 = 0. This implies that |Sj | ≥ 5,
since it’s impossible for 1 or 2 distinct non-identity involutions to sum to 0 in an
abelian group.                                                                                    □


7 Concluding remarks

7.1 Further applications

Our methods here have implications for several other conjectures/problems in the
area. Bors and Wang [12] used some of our results to study the group generated by
all complete mappings of a finite group G. The first author [49] used our results to
prove the Friedlander-Gordon-Tannenbaum Conjecture about possible cycle types of
orthomorphisms in groups. Another relevant problem is the conjecture of Graham
and Sloane on harmonious labellings of trees [35]. As this application requires novel
ideas, we defer exploring it to a future paper. For the interested reader wishing to get
involved in the area, we now list several directions of further research that we believe
to be of interest.

7.2 Counting aspect

Using more refined arguments in place of the nibble-type arguments we use in the
current paper (see for example [11]), the authors anticipate that Theorem 1.1 could
be strengthened to give the existence of exponentially many complete mappings, as
opposed to just one. Counting spanning structures with this approach has been quite
A random Hall-Paige conjecture                                                       863

fruitful recently to address the famous n-queens problem [13, 54]. We did not pursue
this direction in this paper, as the proof of the Hall-Paige conjecture by Eberhard,
Manners, and Mrazović [20] gives a much more precise count on the number of
complete mappings than we could hope to accomplish with our methods.
   However, we are curious if Fourier-analytic methods used in [20] could be used
to count sequencings in sequenceable groups, or transversals in subsquares of multi-
plication tables. This would potentially give alternative resolutions to conjectures of
Ringel [51] and Snevily [56].

7.3 Small n

Our methods only work for large n, and it seems hopeless to extend them to work
for all n. However some of our theorems likely do extend to all n — and it would
be interesting to reprove them for all n using different methods. One such theorem is
our classification of subsquares without transversals.

Conjecture 7.1 The following holds for all n. Let G be a group, and let A, B ⊆ G
with |A| = |B| = n. Then, A × B has a transversal, unless there exists some k ≥ 1,
g1 , g2 ∈ G and a subgroup H ⊆ G such that one of the following holds.
  1. H is a group that does not satisfy the Hall-Paige condition, and A = g1 H and
      B = Hg2 .
  2. H ∼  = (Z2 )k and g1 A = H \ {a1 , a2 }, g2 B = H \ {b1 , b2 } for some distinct
      a1 , a2 ∈ H and distinct b1 , b2 ∈ H such that a1 + a2 + b1 + b2 = 0

    It wouldn’t make sense to extend Theorem 4.4 to all n (due to the probabilistic
                                                                         1 ∪ R2 ∪
nature of the statement of that theorem). However if we set p = 1 and |(RA     B
RC )Δ(X ∪ Y ∪ Z)| to be very small, we expect that the following should hold.
  3


                                                X, Y , Z
Conjecture 7.2 Let G be a group of ordern. Let       be equal-sized subsets
of GA , GB , and GC of size n − 1 having  X + Y + Z = 0 (in Gab ). Then,
HG [X, Y, Z] contains a perfect matching.

   Note that the above implies the Hall-Paige conjecture for all n, by setting X, Y , Z
to be G \ {e}.

7.4 Bounds in the main theorem

It would be interesting to sharpen the bounds in e.g. Theorem 4.4 in various
ways. One interesting parameter to optimize is the size of the symmetric differ-
ence |(RA 1 ∪ R 2 ∪ R 3 )Δ(X ∪ Y ∪ Z)|. We proved this with the upper bound
                 B      C
                                           10           11
|(RA ∪ RB2 ∪ RC3 )Δ(X ∪ Y ∪ Z)| ≤ p 10 n/ log(n)10 , and it would be interesting
    1

to figure out what the best possible bound one could impose here is.
    One improvement that can be made with essentially no modifications to the proof
is to use the upper bound |(RA 1 ∪ R 2 ∪ R 3 )Δ(X ∪ Y ∪ Z)| ≤ p 1010 n/ log(|G |)1011 .
                                     B      C
To obtain this, simply replace instances of log n by log |G | throughout the proof (and
observe that the ultimate source of all logarithms is Theorem 5.11).
864                                                               A. Müyesser, A. Pokrovskiy

   From the other side, it is easy to see that Theorem 4.4 isn’t true with |(RA1 ∪ R2 ∪
                                                                                    B
RC3 )Δ(X ∪ Y ∪ Z)|  p 2 n — this is because under the assumptions of that theorem,
vertices have ≈ p 2 n edges going into RA   1 ∪ R 2 ∪ R 3 . If |(R 1 ∪ R 2 ∪ R 3 )Δ(X ∪
                                                  B    C          A     B     C
Y ∪ Z)|  p n, then it would be possible to choose X, Y , Z satisfying this where
              2

some vertices have no edges going into X ∪ Y ∪ Z (and so there will be no perfect
matching). It would be interesting to sharpen these bounds.
   It would also be interesting to improve the bounds on Theorem 4.4 in the special
case when p = 1. In this case, the theorem reduces to a non-probabilistic statement.

Problem 7.3 For each n, what is the largest number f (n) such that the following is
true?
   Let G be a group of order n. Let X,   Y , Z besubsetsof GA , GB , and GC re-
spectively, each of size n − f (n) with      X + Y + Z = 0 (in Gab ). Then,
HG [X, Y, Z] contains a perfect matching.

                                                                                    11
   From Theorem 4.4, we get that for large n, we have f (n) ≥ n/ log(n)10 . As
discussed above, the logarithmic factors are redundant for abelian groups, so in this
case, one could hope for a much more precise understanding of the corresponding
function f (n). Concretely, we propose the following.

Problem 7.4 For each n, what is the largest number g(n) such that the following is
true?
                                        Let X, 
   Let G be the cyclic group of order n.      Y , Z besubsets of GA , GB , and GC
respectively, each of size n − g(n) with X + Y + Z = 0. Then, HG [X, Y, Z]
contains a perfect matching.

   From our results, it follows that g(n) = Ω(n), and it is not hard to see that g(n) ≤
n/2. It would already be interesting to determine g(n) asymptotically. One can also
consider the non-partite versionof the problem. That is, what is the smallest subset
S ⊆ Zn with |S| divisible by 3, S = 0, and S cannot be partitioned into triples with
zero-sum?

7.5 Strong complete mappings

An orthomorphism of a group G is a bijection ψ : G → G such that x → x −1 ψ(x)
is also bijective. A strong complete mapping of a group G is a complete mapping
which is also an orthomorphism. Evans raised the fascinating problem of character-
ising the groups G which contain strong complete mappings (see [24]). We remark
that a strong complete mapping of cyclic groups corresponds to the placement of
non-attacking queens on a toroidal chessboard. Using this correspondence, a recent
result of Bowtell and Keevash [13] can be interpreted as an estimation on the number
of strong complete mappings of cyclic groups. It would be very interesting to see
if methods we develop in this paper for general groups can be combined with the
strategies in [13] to make progress on Evans’ problem.
A random Hall-Paige conjecture                                                                          865

7.6 Mappings of groups with other properties

Let S be a multiset with elements coming from a group G. When is there a bijection
φ : G → G such that the multiset {xφ(x) : x ∈ G} is equal to S? The Hall-Paige
conjecture corresponds to the case when S = G. In [37], Hall answers this question
for abelian groups. It would be interesting to generalise these results to non-abelian
groups. In [6], a conjecture in this direction is given in the setting of Latin squares
(quasi-groups). This seems like an exciting direction to generalise the Ryser-Brualdi-
Stein conjecture [42].

7.7 The Kézdy-Snevily conjecture

We end with another problem similar in spirit to the previous one, but this time con-
cerned only with cyclic groups. It was proposed initially by Snevily in 2000 [56], and
reiterated by Kézdy and Snevily [43].

Problem 7.5 For any positive k and n with k < n, show that any sequence
a1 , a2 , . . . , ak of not necessarily distinct elements of Zn admits a permutation π such
that the sequence aπ(1) + 1, aπ(2) + 2, . . . , aπ(k) + k are all distinct (in Zn ).

   The results in the current paper can be used to address the above problem for large
k, whenever the sequence a1 , a2 , . . . , ak does not contain repetitions. Alon addressed
the above problem whenever n is prime [4]. The previously stated result of Hall [37]
can be used to address the problem when k = n − 1. Kézdy and Snevily [43] solved
the problem when 2k ≤ n + 1. Otherwise, the problem seems to be wide open.
   We refer the reader to a 2013 survey by Ron Graham that includes an amusing in-
terpretation of the above problem [34]. The survey by Ullman and Velleman [60] also
contains a nice exposition for results of this flavour, including the aforementioned re-
sult of Hall.

Acknowledgements We would like to thank an anonymous referee for a careful reading of this manuscript
and helpful suggestions that simplified several of our proofs.

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License,
which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as
you give appropriate credit to the original author(s) and the source, provide a link to the Creative Com-
mons licence, and indicate if changes were made. The images or other third party material in this article
are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the
material. If material is not included in the article’s Creative Commons licence and your intended use is not
permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly
from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/
4.0/.



References
 1. Ajtai, M., Komlós, J., Szemerédi, E.: Sorting in c log n parallel steps. Combinatorica 3(1), 1–19
    (1983)
 2. Akbari, S., Alipour, A.: Transversals and multicolored matchings. J. Comb. Des. 12(5), 325–332
    (2004)
866                                                                               A. Müyesser, A. Pokrovskiy

 3. Alon, N.: Combinatorial nullstellensatz. Comb. Probab. Comput. 8(1–2), 7–29 (1999)
 4. Alon, N.: Additive Latin transversals. Isr. J. Math. 117(1), 125–130 (2000)
 5. Alon, N., Spencer, J.: The Probabilistic Method. Wiley, New York (2004)
 6. Anastos, M., Fabian, D., Müyesser, A., Szabó, T.: Splitting matchings and the Ryser-Brualdi-Stein
    conjecture for multisets (2022). arXiv:2212.03100. arXiv preprint
 7. Arsovski, B.: A proof of Snevily’s conjecture. Isr. J. Math. 182(1), 505–508 (2011)
 8. Batcher, K.E.: Sorting networks and their applications. In: Proceedings of the April 30–May 2, 1968,
    Spring Joint Computer Conference, AFIPS ’68 (Spring), pp. 307–314. Association for Computing
    Machinery, New York (1968)
 9. Bate, S., Jones, B.: A review of uniform cross-over designs. J. Stat. Plan. Inference 138(2), 336–351
    (2008)
10. Beals, R., Gallian, J.A., Headley, P., Jungreis, D.: Harmonious groups. J. Comb. Theory, Ser. A 56(2),
    223–238 (1991)
11. Bennett, P., Bohman, T.: A natural barrier in random greedy hypergraph matching. Comb. Probab.
    Comput. 28(6), 816–825 (2019)
12. Bors, A., Wang, Q.: Compositions and parities of complete mappings and of orthomorphisms. J.
    Comb. Theory, Ser. A 196, 105723 (2023)
13. Bowtell, C., Keevash, P.: The n-queens problem (2021). arXiv:2109.08083. arXiv preprint
14. Bray, J.N., Cai, Q., Cameron, P.J., Spiga, P., Zhang, H.: The Hall–Paige conjecture, and synchroniza-
    tion for affine and diagonal groups. J. Algebra 545, 27–42 (2020)
15. Caccetta, L., Jia, R.-Z.: Binary labeling of graphs. Graphs Comb. 13(2), 119–137 (1997)
16. Cichacz, S.: Zero sum partition of Abelian groups into sets of the same order and its applications.
    Electron. J. Comb. 25(1) (2018)
17. Cichacz, S., Suchan, K.: Zero-sum partitions of Abelian groups of order 2n . Discret. Math. Theor.
    Comput. Sci. 25(Combinatorics) (2023)
18. Cormen, T.H.: Introduction to Algorithms. The MIT Press (2009)
19. Dasgupta, S., Károlyi, G., Serra, O., Szegedy, B.: Transversals of additive Latin squares. Isr. J. Math.
    126(1), 17–28 (2001)
20. Eberhard, S., Manners, F., Mrazović, R.: An asymptotic for the Hall–Paige conjecture. Adv. Math.
    404, 108423 (2022)
21. Egawa, Y.: Graph labelings in elementary Abelian 2-groups. Tokyo J. Math. 20(2), 365–379 (1997)
22. Erdős, P., Gyárfás, A., Pyber, L.: Vertex coverings by monochromatic cycles and trees. J. Comb.
    Theory, Ser. B 51(1), 90–95 (1991)
23. Evans, A.: The admissibility of sporadic simple groups. J. Algebra 321(1), 105–116 (2009)
24. Evans, A.B.: The existence of strong complete mappings of finite groups: a survey. Discrete Math.
    313(11), 1191–1196 (2013)
25. Evans, A.: Applications of complete mappings and orthomorphisms of finite groups. Quasigr. Relat.
    Syst. 23(1), 5–30 (2015)
26. Evans, A.B.: Orthogonal Latin Squares Based on Groups, vol. 57. Springer, Berlin (2018)
27. Frankl, P., Rödl, V.: Near perfect coverings in graphs and hypergraphs. Eur. J. Comb. 6(4), 317–326
    (1985)
28. Friedlander, R., Gordon, B., Tannenbaum, P.: Partitions of groups and complete mappings. Pac. J.
    Math. 92(2), 283–293 (1981)
29. Gallagher, P.: Group characters and commutators. Math. Z. 79(1), 122–126 (1962)
30. GH from MO (https://mathoverflow.net/users/11919/gh-from mo). How many square roots can a non-
    identity element in a group have? MathOverflow. https://mathoverflow.net/q/410789 (version: 2021-
    12-15)
31. Goddyn, L., Halasz, K.: All group-based Latin squares possess near transversals. J. Comb. Des. 28(5),
    358–365 (2020)
32. Gordon, B.: Sequences in groups with distinct partial products. Pac. J. Math. 11(4), 1309–1313 (1961)
33. Gowers, W.: Probabilistic combinatorics and the recent work of Peter Keevash. Bull. Am. Math. Soc.
    54(1), 107–116 (2017)
34. Graham, R.: Juggling mathematics and magic. Not. Int. Consort. Chin. Math. 1(1), 7–9 (2013)
35. Graham, R.L., Sloane, N.J.A.: On additive bases and harmonious graphs. SIAM J. Algebraic Discrete
    Methods 1(4), 382–404 (1980)
36. Green, B., Wigderson, A.: Lecture notes for the 22nd McGill invitational workshop on computational
    complexity (2010)
37. Hall, M.: A combinatorial problem on Abelian groups. Proc. Am. Math. Soc. 3(4), 584–587 (1952)
A random Hall-Paige conjecture                                                                       867

38. Hall, M., Paige, L.: Complete mappings of finite groups. Pac. J. Math. 5, 541–549 (1955)
39. Hanani, H.: A note on Steiner triple systems. Math. Scand. 8, 154–156 (1960)
40. Keedwell, A.D.: On the sequenceability of non-Abelian groups of order pq. Discrete Math. 37(2–3),
    203–216 (1981)
41. Keevash, P.: The existence of designs (2014). arXiv:1401.3665. arXiv preprint
42. Keevash, P., Pokrovskiy, A., Sudakov, B., Yepremyan, L.: New bounds for ryser’s conjecture and
    related problems. Trans. Amer. Math. Soc. Ser. B 9(8), 288–321 (2022)
43. Kézdy, A.E., Snevily, H.S.: Distinct sums modulo n and tree embeddings. Comb. Probab. Comput.
    11(1), 35–42 (2002)
44. Kühn, D., Lapinskas, J., Osthus, D., Patel, V.: Proof of a conjecture of Thomassen on Hamilton cycles
    in highly connected tournaments. Proc. Lond. Math. Soc. 109(3) (2014)
45. Molloy, M., Reed, B.: Near-optimal list colorings. Random Struct. Algorithms 17(3–4), 376–402
    (2000)
46. Montgomery, R.: Spanning trees in random graphs. Adv. Math. 356 (2019)
47. Montgomery, R., Pokrovskiy, A., Sudakov, B.: Decompositions into spanning rainbow structures.
    Proc. Lond. Math. Soc. 119, 04 (2019)
48. Montgomery, R., Pokrovskiy, A., Sudakov, B.: A proof of Ringel’s conjecture. Geom. Funct. Anal.
    31 (2021)
49. Müyesser, A.: Cycle type in Hall-Paige: a proof of the Friedlander-Gordon-Tannenbaum conjecture
    (2023). arXiv:2303.16157. arXiv preprint
50. Ollis, M.: Sequenceable groups and related topics. Electron. J. Comb. 1000, DS10 (2002)
51. Ringel, G.: Cyclic arrangements of the elements of a group. Not. Am. Math. Soc. 21(1), A-95 (1974)
52. Ringel, G.: Map Color Theorem, vol. 209. Springer, Berlin (2012)
53. Rödl, V., Szemerédi, E., Ruciński, A.: An approximate Dirac-type theorem for k-uniform hyper-
    graphs. Combinatorica 28(2), 229–260 (2008)
54. Simkin, M., Luria, Z.: A lower bound for the n-queens problem. In: Proceedings of the 2022 An-
    nual ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 2185–2197. SIAM, Philadelphia
    (2022)
55. Skolem, T.: On certain distributions of integers in pairs with given differences. Math. Scand. 5(1),
    57–68 (1957)
56. Snevily, H.S.: The Cayley addition table of Zn . Am. Math. Mon. 106(6), 584–585 (1999)
57. Tannenbaum, P.: Partitions of Abelian groups into sets with zero sums. Congr. Numer. 33, 453–461
    (1981)
58. Tannenbaum, P.: Partitions of Zn2 . SIAM J. Algebraic Discrete Methods 4(1), 22–29 (1983)
59. Thomason, A.: Dense expanders and pseudo-random bipartite graphs. In: In Annals of Discrete Math-
    ematics, vol. 43, pp. 381–386. Elsevier, Amsterdam (1989)
60. Ullman, D.H., Velleman, D.J.: Differences of bijections. Am. Math. Mon. 126(3), 199–216 (2019)
61. Wanless, I.: Transversals in Latin Squares: A Survey. London Mathematical Society Lecture Note
    Series, pp. 403–437. Cambridge University Press, Cambridge (2011)
62. Wilcox, S.: Reduction of the Hall-Paige conjecture to sporadic simple groups. J. Algebra 321(5),
    1407–1428 (2009)
63. Zeng, X.: On zero-sum partitions of Abelian groups. Integers 15, A44 (2015)

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps
and institutional affiliations.
