How to find all groups of a given order with trivial center in GAP?

597 Views Asked by At

How can I find all groups of a given order with trivial center in GAP?

1

There are 1 best solutions below

1
On BEST ANSWER

The command is Center(Size(G))=$1$. $G$ has a trivial center if and only if GAP returns true.

For example : order $36$

gap> n:=36;for j in [1..NrSmallGroups(n)] do G:=SmallGroup(n,j); if Size(Center(G))=1 then Print(IdGroup(G),"   ",StructureDescription(G),"\n");fi;od;
36
[ 36, 9 ]   (C3 x C3) : C4
[ 36, 10 ]   S3 x S3
gap>

Another possibility would be :

gap> n:=36;x:=PositionsProperty(List(AllSmallGroups(n)),G->Size(Center(G))=1);List(x,s->StructureDescription(SmallGroup(n,s)));
36
[ 9, 10 ]
[ "(C3 x C3) : C4", "S3 x S3" ]
gap>

The Filtered-command allows an even shorter way :

gap> n:=36;List(Filtered(AllSmallGroups(n),G->Size(Center(G))=1),StructureDescription);
36
[ "(C3 x C3) : C4", "S3 x S3" ]
gap>