Let $G$ be a finite group and $x, y, z \in G$. A **hyperbolic generating triple** for $G$ is a triple $(x, y, z) \in G\times G\times G$ such that

- $\frac{1}{o(x)}+\frac{1}{o(y)}+\frac{1}{o(z)} <1$,
- $\langle x,y,z \rangle =G$, and
- $xyz=1$.

The **type** of a hyperbolic generating triple $(x, y, z)$ is the triple $(o(x), o(y), o(z))$.

My question is, how can I use GAP to determine these triples for a group and therefore their type? Take $PSL(2, 7)$ as an example.

I thought this might work, but I cannot seem to print the triples.

```
g:=Size(G);;
cl:=ConjugacyClasses(G);; n:=Size(cl);;
class:=[];; GenTrips:=[];;
for i in [1..n] do
Add(class ,AsList(cl[i]));;
od;
for i in [1..n] do
catch:=[];
x:=class[i][1];;
for j in [i..n] do
for j2 in [1..Size(class[j])] do
y:=class[j][j2];;
z:=Inverse(x*y);;
for k in [j..n] do
if z in class[k] then
trip:=[i,j,k];;
if not trip in GenTrips then
if g=Size(Group(x,y)) then
Add(GenTrips ,trip);; Add(catch ,k);
fi;
fi;
break;
fi;
if Difference([j..n],catch)=[] then
catch:=[]; break;
fi;
od;
od;
od;
od;
```

Thanks

`if trip in GenTrips then else`

you can write`if not trip in GenTrips then`

. Also, to see`GenTrips`

after running this code, you can e.g. enter`GenTrips;`

(or`Length(GenTrips);`

if you want to inspect the length first). $\endgroup$`for j`

loop you would test`if 1/Order(Representative(class[i]))+1/Order(Representative(class[j]))+1/Order(Representative(class[i])*Representative(class[j]))<1 then`

to check for being a hyperbolic triple. $\endgroup$1more comment