GAP Instructional Material
GAP code is shown
[Press ?? to see GAP output]
You can also choose to see a page showing ALL GAP output.
The GAP command
Order(G) will find the order of the group G and
Elements(G) will find the elements of G and put them in a list.
To apply a function to the list called examplelist we use
To sort the list examplelist enter
Sort(examplelist) and the list examplelist is sorted into ascending order.
Length(examplelist) will return the number of elements in the list.
For example, defining G to be the cyclic group of order 12 we have:
els:= Elements(G); ??
If we wanted to see all the different orders of elements we could convert listords into a set using
or we could use the GAP function
Collected which gives a list of the elements of the set together with how often each occurs in the list.
- Orders of elements of symmetric and alternating groups.
Define G to be the symmetric group of degree 3.
Use GAP, as indicated above, to find the orders of the elements.
Do the same for the symmetric group of degree 4 and the one of degree 5.
Now do the same for the alternating groups of degrees 3, 4, and 5.
- Identifying groups of orders 8 and 12.
In GAP the dihedral group D4 of order 8 is called
DihedralGroup(8) so entering
into GAP will assign this dihedral group to D4.
Find the orders of the elements of D4.
Now the command
will return a list GG of all the groups of order 8.
Length(GG) to find how many groups of order 8 there are.
The groups are now GG, GG, ...
To find if GG is abelian, type
To check if it is cyclic, type
Find the orders of the elements of each of the groups in the list GG and hence identify which of the groups in the list is D4.
Investigate groups of order 12 in the same way. Identify the dihedral group of order 12:
and the alternating group of degree 4:
in the list of groups of order 12 by looking at the orders of their elements.
- Groups of order p2
Examine how many groups of order 52 = 25 there are and whether they are abelian or cyclic.
Do the same for other squares of primes 72 = 49, 112 = 121, 132 = 169, ...
Can you guess a general result?
- Groups of order 2p, p > 2
This question is similar to the previous one but here you are asked to examine groups of order 2p where p is a prime.
- Groups of order 3p, p > 3
The general theorem for groups of order 3p is more complicated than that for groups of order 2p. Try the following for different values of the prime p and try to guess the theorem.
- Prime residues mod n
The set of integers less than n and coprime to n forms a group. The aim of this question is to try to decide when this group is cyclic. The following puts the integers less than n and coprime to n into a list U (we give an example of n = 18).
How many elements are there in the group?
Here is how to list the orders of these elements.
Since there is an element of order equal to the number of elements in U then U is a cyclic group.
GAP can verify this
Is the group cyclic for n = 12 ?
Try other values of n and guess for which values of n the set of integers less than n and coprime to n forms a cyclic group.
GAP can save you some time, either by writing a loop, or using its list-handling capacity.
Filtered([1..40],n->not IsCyclic(Units(ZmodnZ(n)))); ??
If that doesn't give you enough evidence to guess what is happening, look at even more values -- and factorise!
Now can you spot it?
JOC/EFR January 2003