> < ^ Date: Fri, 29 Jun 2001 18:53:10 +0200
> < ^ From: Thomas Breuer <Thomas.Breuer@Math.RWTH-Aachen.DE >
< ^ Subject: Re: Counting cyclic subgroups

Dear GAP Forum,

Noam K asked

Hello, someone asked me about this :
The command :

in GAP builds the lattice of subgroups of
the group G .

Is there also a way in GAP to compute the number of cyclic subgroups of G ?

Assigning to each cyclic subgroup of a group $G$
the elements of $G$ that generate this subgroup defines a partition
of the elements of $G$.
The number of elements assigned to a cyclic subgroup of order $n$
equals $\varphi(n)$ where $\varphi$ denotes the Eulerian function.
So the number of cyclic subgroups of $G$ can be obtained by a summation
over the elements of $G$,
where an element of order $n$ counts with the value $1 / \varphi(n)$.

One way to compute this number in GAP is to compute the conjugacy classes
(or the rational conjugacy classes) of $G$,
and then to sum up the lengths of these classes divided by the
$\varphi$ values of the orders of class representatives.

For example, the following GAP code would solve the problem.

ccl:= ConjugacyClasses( G );
ord:= List( ccl, x -> Order( Representative( x ) ) );
no:= Sum( List( [ 1 .. Length( ccl ) ],
          i -> Size( ccl[i] ) / Phi( ord[i] ) ) );

Note that only class lengths and representative orders are used
in this computation,
so one can compute the result also from the GAP character table of $G$.
In the case of tables in the character table library,
this can be done without accessing the group $G$ itself.

All the best,

> < [top]