Generation of finite groups with cyclic Sylow subgroups

Slattery (2007) described computational methods to enumerate, construct, and identify finite groups of squarefree order. We generalise Slattery's result to the class of finite groups that have cyclic Sylow subgroups and provide an implementation for the computer algebra system GAP.


INTRODUCTION
A finite group is squarefree if its order is not divisible by any prime-square. Hölder [5] classified and enumerated these groups at the end of the 19th century. More than 100 years later, Slattery [12] devised powerful algorithms for constructing and identifying groups of squarefree order. By describing a canonical ordering for the (isomorphism types of) groups of squarefree order n, Slattery's methods allow the direct computation of the i-th group of order n, and, for a given squarefree group of order n, the determination of its position in that ordered list, both tasks without the need to compute the full list of groups. Slattery's algorithms are implemented for the computer algebra system Magma [2]; the SmallGroups Library (based on [1]) of the computer algebra system GAP [4] contains alternative implementations for squarefree groups. Clearly, a group of squarefree order has cyclic Sylow subgroups. The aim of this note is to generalise [12] to the class of C-groups, that is, to finite groups having cyclic Sylow subgroups.
1.1. Main results. For a positive integer n denote by Cpnq the number of (isomorphism types) of C-groups of order n; a formula for Cpnq has been determined by Murty & Murty [10], see Section 2. Our first main result is a complete generalisation of the results in [12] to C-groups; specifically, for a positive integer n we describe algorithms for the following: (A) Construct a sorted list C n of all (isomorphism types of) C-groups of order n. (B) For i P t1, . . . , Cpnqu construct the i-th group in C n without creating the whole list. (C) For a C-group of order n, determine its position i in C n without creating the whole list.
This functionality furnishes every C-group with a unique ID pn, iq, meaning that it is isomorphic to the i-th group in C n , and this ID is an isomorphism invariant. This has two advantages. Firstly, it allows us to efficiently reduce a given list of C-groups up to isomorphism, by simply computing and comparing IDs. Secondly, it provides a dynamic database of C-groups that allows a direct construction of groups without the necessity to store all groups. Our second main result is an implementation for GAP. Even though our implementation started out as a proof of concept, it is remarkably efficient: restricted to squarefree groups, our implementations seem on average faster than what is provided by GAP's SmallGroups Library: we even found squarefree group orders for which our code runs more than 800 times faster than the latter, see Table 4.2. We proceed as follows: In Section 2 we discuss relevant results for C-groups. In Section 3 we describe the theory for (A), (B), and (C). In Section 4 we illustrate the capabilities of our GAP implementation. SCHOOL OF MATHEMATICS, MONASH UNIVERSITY, VIC 3800, AUSTRALIA E-mail addresses: heiko.dietrich@monash.edu, darrenlow@protonmail.com. The first author was supported by an Australian Research Council grant, identifier DP190100317. This work forms part of the Honours thesis [8] of the second author.

C-GROUPS
We present some known and some preliminary results for C-groups. To the best of our knowledge, the term C-group was coined by Murty & Murty [10]; some authors call them Z-groups, referencing Zassenhaus' classification.
2.1. Structure results. All groups are finite and, throughout, C k denotes a cyclic group of size k. Results of Hölder, Burnside, and Zassenhaus [11, (10.1.10)] show that every C-group G of order n is metacyclic with odd-order derived subgroup G 1 -C d and cyclic quotient G{G 1 of order e " n{d; specifically, G is isomorphic to G e,d,r " xx, y | x e , y d , y x " y r y (2.1) for some 0 ď r ă d with r e " 1 mod d and gcdpepr´1q, dq " 1. Conversely, every such G e,d,r is a C-group of order ed with derived subgroup isomorphic to C d ; note that G e,d,r is abelian if and only if d " 1 and r " 0. Murty & Murty have shown in [10, Theorem 1.1] that the number (of isomorphism types) of C-groups of order n is Cpnq " ÿ n"de gcdpd,eq"1 and p α ||d denotes the largest p-power dividing d, which we also write as d p " p α . Lemma 2.1. We have G e,d,r -G e 1 ,d 1 ,r 1 if and only if e " e 1 , d " d 1 , and r and r 1 have the same order modulo d.
PROOF. If G -G e,d,r , then |G 1 | " d and |G{G 1 | " e, so d and e are uniquely determined by the isomorphism type of G. Now [10, Lemma 3.6] proves the claim, see also [3,Lemma 4.14b].
Remark 2.2. The description in [11, (10.1.10)] and Lemma 2.1 allow, in principle, a brute-force construction of all C-groups of order n up to isomorphism and, for a given C-group G, a determination of parameters e, d, r such that G -G e,d,r . However, from the perspective of complexity theory, these are difficult tasks, and this is reflected in the practical performance of the brute-force approach. In general, Iliopulous [7] demonstrated that even for abelian (black-box) groups most problems are at least as hard as the discrete logarithm problem and integer factorisation (neither of those problems seems to have an efficient deterministic or randomised solution); this includes the problem of finding a cyclic generator of a cyclic group given by some generating set, see [7, Proposition 2.5], which is relevant when determining the parameter d for G -G e,d,r . Even if a group is given by a polycyclic presentation, which is the standard way in computational group theory to describe finite solvable groups, proving that its group multiplication has a favourable complexity is already difficult because of the challenges involving collection, see [9].
For the reasons given in Remark 2.2, we ignore complexity issues here, and we refer to [3] for a recent discussion of the complexity of (black-box) isomorphisms tests. Instead, as in [12], we assume that we can factorise integers and perform basic computations with groups, such as constructing group orders, Sylow subgroups, quotient groups, cyclic generators, etc; we refer to the Handbook of Computational Group Theory [6] for details on how to compute with groups.
Analogous to [12], our approach to construct and identify C-groups with |G 1 | " d and |G{G 1 | " e is to iterate over the prime-power divisors of d and e; in practice, this improves significantly over the brute-force approach (Remark 2.2), cf. the computational evidence in Section 4.

2.2.
Permissible sets and clusters. The next two definitions and following lemma generalise [12,Definitions 4 and 7,Lemma 5] and is motivated by [10, p. 302] Definition 2.3. Let G be a C-group and let q ą p be prime divisors of |G|. We say p acts on q (in G with exponent e) if a Sylow p-subgroup of G acts via conjugation on a Sylow q-subgroup of G, and this action describes an automorphism of order p e ‰ 1.
Remark 2.4. Let q ą 2 be a prime and m ě 1 an integer, so that the automorphism group of Q " xyy -C q m is cyclic of order q m´1 pq´1q, generated by an automorphism y Þ Ñ y r , where r is a primitive root modulo q m . For every divisor a of the automorphism group order, we now describe a canonical ordering of the automorphisms of Q of order a. For this we choose r P t2, . . . , q m´1 u as small as possible and for k ě 1 define α k : Q Ñ Q, y Þ Ñ y t k , where t k " r kq m´1 pq´1q{a mod q m . The automorphisms of Q of order a can now be ordered as tα k : k P t1, . . . , a´1u coprime to au.
If a group A acts on a group B via ϕ : A Ñ AutpBq, then A˙ϕ B denotes the corresponding split extension with underlying set AˆB and multiplication pa, bqpu, vq " pau, b ϕpuq vq. We also write A˙B if the action is not specified or understood from the context. Lemma 2.5. Every C-group G decomposes as G " pA˙DqˆC where AˆC -G{G 1 and D -G 1 ; the groups A, C, D are cyclic of coprime orders, and p divides |A| if and only if p acts on some q in G with exponent e; in this case, p e divides q´1, and q divides |D|.
PROOF. The classification (2.1) shows that G " U˙D where U -G{G 1 and D -G 1 are cyclic of coprime orders. Write U " AˆC where A is the direct product of those Sylow p-subgroups of U that have p acting on some q in G, and C is the direct product of the remaining Sylow subgroups of U. By construction, C ď ZpGq and A˙D is a complement to C in G. Let P be a Sylow psubgroup acting on a Sylow q-subgroup Q of G with exponent e. If Q has order q m , then AutpQq is abelian of order q m´1 pq´1q; since P acts with exponent e, we have p e | q´1. If p divides |D|, then P ď D, because the orders of A, C, and D are coprime and D ✂ G. In particular, P is the unique Sylow p-subgroup of D ✂ G, and hence P and Q normalise each other. This implies that x´1y´1xy P P X Q " t1u for all x P P and y P Q, so P centralises Q, a contradiction. Hence p divides |U|. Since C ď ZpGq and P acts nontrivially on Q, we have p | |A| and q | |D|. Definition 2.6. Let G " pA˙DqˆC be a C-group as in Lemma 2.5. Its acting divisor is |A|; its cluster is the set CpGq of all triples pp, q, eq such that p acts on q in G with exponent e. The acting group of G is the cyclic subgroup of AutpDq generated by the A-action on D. A permissible set for a group order n ą 1 is a set P of triples pp, q, eq such that q ą p are primes dividing n, p e ‰ 1 divides q´1, and if pp, q, eq P P, then pq,˚,˚q, p˚, p,˚q, pp, q, cq R P for all c ‰ e.
We conclude with a few remarks Remark 2.7. a) If G is a C-group, then CpGq is a permissible set for |G| by Lemma 2.5. The acting divisor of G is the product of all |G| p where p runs over tp : pp,˚,˚q P CpGqu; every such p divides the size of the acting group of G. Conversely, if P is a permissible set for a group order n ą 1, then there exists a C-group G with CpGq " P: let n " p a 1 1 . . . p a k k q b 1 1 . . . q b ℓ ℓ r c 1 1 . . . r cm m be the prime power factorisation of n and assume, without loss of generality, that pp,˚,˚q, p˚, q,˚q P P if and only if p P tp 1 , . . . , p k u and q P tq 1 , . . . , q ℓ u. A group of order n with cluster P is if and only if pp i , q j , e i,j q P P.
b) Two C-groups G andG are isomorphic if and only if they have the same order, clusters, and acting groups; equal orders and clusters imply that we can identify the decomposition sets in Lemma 2.5, hence the acting groups of G andG are both subgroups of AutpDq " AutpDq. c) If G is a C-group with largest prime divisor q, then the Sylow q-subgroup Q of G is normal, and G " H˙Q for some C-group H ă G by the Schur-Zassenhaus theorem [11, (9 PROOF. Write E 1 " H˙σ Q and E 2 " H˙ω Q and recall that E 1 and E 2 share the same under- there is a map τ : H Ñ Q such that β has the form ph, nq β " ph α , h τ n β q, where α " β| E 1 {Q is the induced automorphism of H. Since β is an isomorphism, a small calculation shows that pghq τ " g τ ωph α q h τ and n σphqβ " n βωph α q for all n P Q and g, h P H. Since AutpQq is abelian, σphq " ωph α q for all h P H, as claimed. Remark 2.9. We apply Lemma 2.8 to the set-up of Remark 2.7c), that is, H is a C-group and Q is a cyclic group. In order to describe all split extensions H˙Q up to isomorphism, one has to compute the AutpHq-orbits on HompH, AutpQqq. Since AutpQq is abelian, every such homomorphism has H 1 in its kernel, and we can identify HompH, AutpQqq " HompH{H 1 , AutpQqq " à ℓ j"1 HompS j , AutpQqq, where S 1 , . . . , S ℓ are the Sylow subgroups of H{H 1 . Note that each HompS j , AutpQqq is fixed by AutpHq. It follows that if σ, ω P HompH, AutpQqq are in the same AutpHq-orbit, then for each j the induced actions σ j , ω j P HompS j , AutpQqq are in the same AutpHq-orbit.

CONSTRUCTION OF C-GROUPS
We describe how to construct, up to isomorphism, all C-groups of order n ą 1; recall from (2.2) that there are Cpnq such groups. This construction will be canonical, that is, every C-group G of order n has a unique, isomorphism-invariant ID pn, iq, meaning that G is isomorphic to the i-th group in that list. In Section 3.4 we describe the direct construction of the group with ID pn, iq; in Section 3.5 we describe the converse and determine the ID of a given C-group. To facilitate these constructions, we first comment on a canonical ordering of permissible sets.

3.1.
Murty's counting formulas. Let n " p a 1 1 . . . p a k k be the prime-power factorisation of n with p 1 ă . . . ă p k . Let Dpnq be the set of possible acting divisors of C-groups of order n; these are the 2 k´1 numbers p im where ti 1 , . . . , i m u runs over all subsets of t1, . . . , k´1u. We sort them as d 1 ă . . . ă d 2 k´1 . For d P Dpnq denote by C d pnq the number of (isomorphism types) of C-groups of order n with acting divisor d; by (2.2) and [10, pp. 303-304], we have Moreover, let C d,m pnq be the number of (isomorphism types) of C-groups of order n with acting divisor d and acting group order m; then [10, p. 303] shows that Recall that if d is the acting divisor and m is the size of the acting group, then m | d and, if p | d is a prime, then p | m. This restricts the orders of possible acting groups.

3.2.
Ordering of permissible sets. A permissible set P is a cluster for a C-group of order n with acting divisor d and acting group order m, if and only if for every p j ||m there exists pp,˚, jq P P, but pp,˚, iq R P when i ą j. For every such pp,˚, jq we note which prime divisors q of n{d may be acted upon by p with maximal exponent e, that is, p e " gcdpp j , q´1q ‰ 1. Having done this, we are able to sort such permissible sets lexicographically, with four tiers of ordering: (1) compare the acting primes; (2) for a fixed acting prime p, compare the first prime q max it acts on with maximal exponent; (3) for a fixed acting prime p and q max , compare the other primes p acts on; (4) for a fixed acting prime p acting on q ‰ q max , compare the exponents of that action.

3.3.
Generating groups with a given cluster. Now that we have imposed a canonical ordering on the set of all permissible sets of a given group order, it remains to canonically sort the (isomorphism types of) groups that correspond to such data. We describe this process in the following. Throughout, let P be a permissible set for a group order n, with acting divisor d and acting group order m. We factorise n " p a 1 1 . . . p a k k with p 1 ă . . . ă p k . We use the extension procedure described in Remark 2.7c) to construct all C-groups G of order n with CpGq " P. Recall that any such G has a split Sylow tower T 1˙. . .˙T k , where each T i is a Sylow p i -subgroup. By induction, we can assume that we have constructed all (isomorphism types) of C-groups H of order p a 1 1 . . . p a v´1 v´1 with cluster CpHq " tpp, q, cq P P : p, q ă p v u; the induction start being H " T 1 " C p a 1 1 . We now have to consider all split extensions H˙Q with Q -C p av v whose cluster is induced by P. This requires a case distinction involving A " tp : pp, p v ,˚q P Pu, the set of primes p P tp 1 , . . . , p v´1 u that act on p v in P.
If A " H, then the only split extension we have to consider is the direct product HˆQ. Now suppose A " tp i 1 , . . . , p ia u ‰ H, that is, P contains triples pp i j , p v , e j q for each j. For each j, let P j " xx j y be a Sylow p i j -subgroup of H; note that P j ę H 1 since P j acts nontrivially, see Lemma 2.5. We need to consider actions σ : H Ñ AutpQq that map each x j to an automorphism of Q of order p e j i j . To construct all corresponding extensions H˙σ Q up to isomorphism, Remark 2.9 shows that one has to determine canonical AutpHq-orbit representatives of suitable P j -actions on Q, for each j; here "canonical" refers to the description in Remark 2.4. Note that in order to have a well-defined AutpHq-action, here we consider P j -P j H 1 {H 1 as a Sylow p i jsubgroup of H{H 1 , see Remark 2.9. The description below shows that the AutpHq-action on group actions H Ñ AutpQq can be considered separately for each prime in A.
Thus, in the following let p P A, say pp, p v , eq P P, and let P " xxy be a Sylow p-subgroup of H. Note that since p acts in P, it is not acted upon in P. We need another case distinction.
If p v is the smallest prime that p acts on in P, then p does not act in H, hence P ď H is central, and so H " UˆP for some complement U. In particular, AutpHq " AutpUqˆAutpP q, so AutpHq acts as AutpP q on P . Since AutpP q acts transitively on the generators of P , it follows that there is a unique AutpHq-orbit of nontrivial P -actions on Q with exponent e.
If p v is not the smallest prime that p acts on in P, then p acts on some prime p w in H, say with exponent c w . Let S " xyy be the Sylow p w -subgroup of H; recall that S ✂ H 1 and so S is characteristic in H. For any β P AutpHq, we have that x β acts like x t for some t coprime to p; specifically, t is determined by pxH 1 q β " x t H 1 . Furthermore, β induces an automorphism of S that commutes with x because AutpSq is abelian. Thus, we have py β q x " py x q β " py β q x β " py β q x t ; since y Þ Ñ y x has order p cw , it follows that t " 1 mod p cw , and so AutpHq acts trivially on HompP, AutpSqq. This holds for all primes that p acts on in H, so t " 1 mod p c , where c is the largest exponent among those p-actions. We make a case distinction on the exponent in pp, p v , eq.
By what is shown in the previous paragraph, if e ď c, then any action σ : H Ñ AutpQq with p acting with exponent e satisfies σ β´1 pxq " σpx β q " σpx t q " σpxq t " σpxq, and so the AutpHq-action on HompP, AutpQqq is trivial. Thus, there are p e´1 pp´1q orbits of AutpHq on actions P Ñ AutpQq with exponent e.
It remains to consider e ą c. If σ : P Ñ AutpQq with σpxq of order p e and β P AutpHq with βpxH 1 q " x t H 1 as above, then σ β´1 pxq " σpx β q " σpx t q " σpxq t mod p e . Thus, every P -action on Q in the same AutpHq-orbit as σ has the form σ s for some s P t1, . . . , p e´1 u with s " 1 mod p c . Let S " P 1 , S 2 , . . . , S v´1 be Sylow subgroups of H corresponding to p 1 , . . . , p v´1 . We claim that for each such value s there is an automorphism γ of H that takes x to x s and fixes S 2 , . . . , S v´1 . Note that H is generated by S 1 , . . . , S v´1 , so to define γ it suffices to describe how it acts on the cyclic generators x, z 2 , . . . , z v´1 of these subgroups. By von Dyck's Theorem [6, Theorem 2.53], the map γ : px, z 2 , . . . , z v´1 q Þ Ñ px s , z 2 , . . . , z v´1 q extends to an automorphism of H if and only if the conjugacy relations for these generators are preserved by γ. This is trivially true for all conjugacy relations between generators z i and z j ; likewise, if z i commutes with x, then γpz f qγpxq " γpxqγpz f q. Lastly, suppose x acts non-trivially on z i , say z i x " xz j i . Because p acts at most with exponent c in H and because s " 1 mod p c , we have z x s f " z x f , and so γpz j qγpxq " z j x s " x s z x s j " x s z x j " x s z j j " γpxqγpz j q j , as required. This proves that γ extends to an automorphism of H that maps x to x s and that fixes the other Sylow subgroups S 2 , . . . , S v´1 . As there are p e´c such numbers s, the AutpHq-orbit of the above σ : P Ñ AutpQq has size p e´c . Note that there are p e´1 pp´1q elements in AutpQq of order p e , thus in the case discussed in this paragraph (e ą c) the number of distinct AutpHq-orbits of actions of P on Q with exponent e is p e´1 pp´1q{p e´c " p c´1 pp´1q.
In conclusion, we can determine the canonical actions σ : H Ñ AutpQq by considering each prime p P A separately; this describes a partial converse to the last statement in Remark 2.9. As a corollary, our description also leads to an immediate counting procedure for the number of isomorphism types of groups of order n that have cluster P.

C-groups by ID.
We sort the C-groups of order n ą 1 first by their acting divisors (in increasing order), then by the size of their acting groups (in increasing order). Thus, to construct the C-group G with ID pn, iq, we proceed as follows. First, we determine j ě 0 such that so G must have acting divisor d " d j . Now it remains to construct the t-th group with acting divisor d, where t " i´C d 1 pnq´. . .´C d j´1 pnq. If we have prime-power factorisations d " p a 1 1 . . . p au u and n{d " q b 1 1 . . . q bv v , then every acting group order m is divisible by p 1 . . . p u and divides gcdpd, pq 1´1 q . . . pq v´1 qq. Let m 1 ă . . . ă m r be all those possible acting group orders and determine j ě 1 such that C d,m 1 pnq`. . .`C d,m j´1 pnq ă t ď C d,m 1 pnq`. . .`C d,m j pnq, so G must have an acting group of order m " m j . Now it remains to construct the ℓ-th group with acting divisor d and acting group of order m, where ℓ " t´C d,m 1 pnq´. . .´C d,m j´1 pnq. Let P 1 , . . . , P w be all the possible clusters for a C-group of size n, with acting divisor d and acting group of order m, sorted as described in Section 3.2, and let C Pc pnq denote the number of Cgroups of order n with cluster P c ; as described in Section 3.3, this number can be calculated from P c . We determine j ě 1 such that C P 1 pnq`. . .`C P j´1 pnq ă ℓ ď C P 1 pnq`. . .`C P j pnq, so G must have cluster P " P j . Now it remains to construct the s-th group of order n with this cluster, where s " ℓ´C P 1 pnq´. . .´C P j´1 pn´1q. For each triple in P, the description in Section 3.3 tells us how many non-isomorphic choices of actions there are for p acting on q with exponent e. Thus, with P sorted first by the acting primes then by the primes which are acted on, we can determine the corresponding action for each triple; the description in Remark 2.4 makes this canonical, hence the group with ID pn, iq is determined.
3.5. Identification of C-groups. For a given C-group G of order n, we determine its ID pn, iq such that G is isomorphic to the group with ID pn, iq as constructed in Section 3.4. For this, we compute the Sylow subgroups of G, and from those determine the cluster CpGq. This also provides the decomposition G " pA˙DqˆC as in Lemma 2.5, the acting divisor d " |A|, the acting group K ď AutpDq and its order m " |K|. If d 1 ă . . . ă d j " d are the possible acting divisors less-equal d, and m 1 ă . . . ă m r " m are the possible acting group orders (of a C-group of order n with acting divisor d) less-equal m, then the ID pn, iq of G satisfies C ă i ď C`C d,m pnq where It remains to determine the position of G within the clusters for C d,m pnq; those clusters are sorted (Section 3.2) and for each cluster we know how many isomorphism types of group exist (Section 3.3). The ID of G is now determined by reversing the normalisation process in Section 3.3.

PRACTICAL PERFORMANCE
A GAP implementation of our algorithms is available under github.com/heikodietrich/cgroups and provides functions AllCGroups, CGroupById, and IdCGroup; we comment on the performance below. All computations have been carried out with GAP 4.10.0 on an Intel(R) Core(TM) i5-7500 CPU@3.40GHz with 16GB RAM. We checked the correctness against GAP's SmallGroups Database and a brute-force implementation based on Remark 2.2 4.1. Squarefree groups. Since every group of squarefree order is a C-group, we first compare our implementation against the inbuilt GAP functions AllSmallGroups and IdSmallGroup. Up to order 250000 there are 566801 isomorphism types of groups of squarefree order. Our implementation of AllCGroups constructed these groups in 201 seconds; AllSmallGroups required 2844 seconds. Table 4.2 lists some runtimes for some selected squarefree orders that involve larger prime factors (some greater than 10 5 and 10 6 ). Overall, our experiments indicate that AllCGroups is often by a factor ten faster than GAP's AllSmallGroups.
AllCGroups and AllSmallGroups constructed the 208014 groups of squarefree order at most 100000 in 75 seconds and in 536 seconds, respectively. Taking GAP's list of those groups, our IdCGroup needed 161 seconds to compute all their IDs, whereas GAP's IdSmallGroup required 267 seconds to compute the IDs of our groups. 1 Table 4.2 lists some further runtimes. In general, the performance of IdCGroup seems comparable with GAP's IdSmallGroup; for both functions, when group orders with large prime divisors are involved, a main bottleneck seems to be GAP's functionality to compute Sylow subgroups. We have not included runtimes in Table 4.2 when the impact of the latter dominated the ID computation, but rather wrote 'syl'.

General orders.
There are 576093 isomorphism types of C-groups of order at most 100000. It took 247 seconds to construct all these groups with AllCGroups. Applying IdCGroup to (isomorphic copies of) these groups took 846 seconds, that is, on average 0.0015 seconds per group. In Table 1 we list runtimes for constructing all C-groups of larger orders, and for determining their IDs; the average runtime for IdCGroup was at most 0.013 seconds per group. squarefree group order # groups  TABLE 2. Some non-squarefree orders: we list the time (in seconds) required to compute all C-groups of the given order and to recognise all those groups.