GAP Instructional Material

Return to Index


GAP code is shown like this.

[Press ?? to see GAP output]

You can also choose to see a page showing ALL GAP output.


Finding groups with certain properties

Problem 1

There are exactly two groups of order p2, p a prime. Both are abelian, one is cyclic. Find the smallest five values of n such that n is not the square of a prime, yet there are exactly two groups of order n with both groups abelian and one cyclic.

Some easy observations:

  1. There is always one cyclic group of order n for every n. It is abelian so we need only need to check that for a given n there are exactly 2 groups and that IsAbelian has the same value for each.

  2. We need to jump over the squares of primes. These are precisely the numbers with 2 equal factors.

  3. We could jump over other vales of n which we know will not work, such as primes. However we don't bother to write this into our code.

found:=0;;
n:=2;;
while found < 5 do
 n:=n+1;
 if Length(Factors(n)) = 2 and Factors(n)[1] = Factors(n)[2] then
  n:=n+1;
 fi;
 glist:=AllSmallGroups(Size,n);
 ablist:= List(glist,IsAbelian);
 if Length(ablist) = 2 and ablist[1] = ablist[2] then
  found:=found+1;
  Print(n,"\n");
 fi;
od;
     ??

Notes:

  1. We used found to count the number
  2. You might care to speculate on what properties these numbers have which only allow two groups of these orders to exist.

Problem 2

Is every finite group generated by its elements of order n for some n?

Some easy observations:

  1. If G is a finite simple group then G is generated by its elements of order n > 1 for every n dividing |G|. [The conjugate of an element of order n has order n so the elements of order n generate a normal subgroup.]

  2. If G is a finite abelian group then G is generated by the elements of maximum order. [The easiest way to see this is to write G as a direct product of cyclic groups where the order of each divides the order of the previous one.]

Given these facts one might look at p-groups for a counterexample. However we write code to find all groups of order up to 64 which are not generated by their elements of order n for any n.

for n in [2 .. 64] do;
 gporder:=n;
 glist:=AllSmallGroups(Size, gporder);
 for i in [1..Length(glist)] do
  found:=0;
  G:= glist[i];
  els:=Elements(G);
  elord:=List(els,Order);
  for j in Set(elord) do
   t:= Filtered(els, x->Order(x) = j);
   H:=Subgroup(G,t);
   if Size(H) = gporder then
    found:= 1;
   fi;
  od;
   if found = 0 then
    Print("Example found - group no ", i,
    " of order ", gporder, "\n");
   fi;
 od;
od;
     ??

Notes:

  1. For each group of order n we set found to be 0. If we find that all the elements of a particular order generate G then we will make found to be 1.

  2. elord is the list of orders of elements, and Set(elord) is set of orders which we need to check.

  3. t is the list of elements of the given order and H is the subgroup which they generate. If H = G then we have found that G is generated by its elements of the given order.

  4. If having tested all possible orders of elements we still have found being 0 then G was not generated by its elements of any given order.

There is a unique smallest group which is not generated by its elements of order n for any n. It has order 16.


JOC/EFR January 2003



Home   |   Members   |   Pre-prints   |   Library   |   Reports   |   Seminars   |   Conferences   |   Research   |   Publicity   |  Pictures   |   GAP   |   Webmail