Consider the group $\langle a,b\mid a^2,b^3,(ab)^8,(ab)^4(ab^{-1})^4 \rangle$ Which is general linear group $GL(2,3)$ by GAP as I tried below
gap> f:=FreeGroup("a","b");
<free group on the generators [ a, b ]>
gap> a:=f.1;;b:=f.2;;
gap> g:=f/[a^2,b^3,(a*b)^8,(a*b)^4*(a*b^-1)^4];;
gap> Size(g);
48
gap> StructureDescription(g);
"GL(2,3)"
Now i want all $48$ elements of the group $\langle a,b\mid a^2,b^3,(ab)^8,(ab)^4(ab^{-1})^4 \rangle$ in the form of $a$ and $b$ only i.e. words in $a$ and $b$ like $\{e,,a,b,b^{2},ab,(ab)^{2},\cdot\cdot\cdot (ab)^{7}\cdot\cdot\cdot\}.$ Please help me to find all $48$ elements of the group. Is there some algorithm in GAP to find out elements. Thank you.
In GAP, you can ask for
Elementsfor any finite group and get (memory permitting) a list of elements. So you could do this for your groupg. Caveat: GAP does (for good reasons which I do not want to elaborate here) not by default reduce word expressions. So you will get a nicer result by forcing reduced multiplication (using an ad-hoc length-based rewriting system: