# Constructing group extensions in GAP.

I have the following general question: Given two finite groups $$N$$ and $$H$$, how can we find, using GAP, all the groups $$G$$ (up to an isomorphism, of course) such that $$1 \rightarrow N \rightarrow G \rightarrow H \rightarrow 1$$ is a short exact sequence? For splitting sequences, I know how to solve the problem (computing semidirect products), but I have no idea how to construct non-splitting sequences.

• why is finite in parentheses? are they finite or not? if they are, say it very explicitly – mathworker21 Sep 16 at 20:40
• This is the closest I could find in the GAP manual. – Shaun Sep 16 at 20:54
• Unfortunately, the method for Pc groups is working only if $N$ is Abelian... and I want to construct examples in the general case. – Mircea Sep 16 at 21:03
• There is code in the development version that will make it into GAP 4.11 (function TwoCohomologyGeneric) for doing exactly this (for elementary abelian $N$). At this point you would have to install the development version from github, it is not really possible to extract the code for an older release. If you have a single example let me know and I can run the code for you. – ahulpke Sep 16 at 21:35
• I'm interested in a case when $N$ is not abelian... – Mircea Sep 17 at 7:51

Your comments indicate that you are interested in a case of $$\gcd(|N|,|H|)=1$$. In this situation (due to the Schur/Zassenhaus theorem) any extension is a semidirect product. You can classify such extensions by computing the AutomorphismGroup of $$N$$ and computing (classes of) homomorphisms from $$H$$ to $$\mbox{Aut}(N)$$: E.g.

gap> N:=AbelianGroup([5,5,5]);
<pc group of size 125 with 3 generators>
gap> H:=SymmetricGroup(4);;
gap> au:=AutomorphismGroup(N);
<group with 4 generators>
gap> homs:=AllHomomorphismClasses(H,au);
[ [ (1,3,2), (3,4) ] -> [ [ f1, f2, f3 ] -> [ f1, f2, f3 ],
[ f1, f2, f3 ] -> [ f1, f2, f3 ] ], [...]o
gap> ext:=List(homs,x->SemidirectProduct(H,x,N));
[ <pc group of size 3000 with 7 generators>,
<pc group of size 3000 with 7 generators>,
<pc group of size 3000 with 7 generators>,
<pc group of size 3000 with 7 generators>,
<pc group of size 3000 with 7 generators>,
<pc group of size 3000 with 7 generators>,
<pc group of size 3000 with 7 generators>,
<pc group of size 3000 with 7 generators> ]
gap> List(ext,x->Length(ConjugacyClasses(x))); # show they are non-isomorphic
[ 625, 253, 325, 265, 38, 165, 26, 105 ]