How to define the code in another way to get a faster response in GAP.

79 Views Asked by At

I tried the exercise with the following code:

F:=FreeAbelianGroup(3);
<fp group of size infinity on the generators [ f1, f2, f3 ]>
x:=F.1;; y:=F.2;; z:=F.3;;
n:=145;
total:=[];
for A in [1..23] do
for B in [0..A-1] do
for C in [0.. A-1] do
for R in [1..15] do
for P in [0..R-1] do
for Q in [0..R+1] do
for V in [1..10] do
for U in [0..V-1] do
for W in [0..V-1] do
mt:=[[A,-U,-P],[-B,V,-Q],[-C,-W,R]];
G:=F/[x^A*y^-U*z^-P, y^V*x^-B*z^-Q,z^R*x^-C*y^-W];
if Size(G)=n and IsCyclic(G) then
Print(mt," size ", Size(G),"\n");
Add(total,mt);
fi;
od;od;od;od;od;od;od;od;od;

For this I received an answer after 24 hours.

Does the version of GAP depend on the speed of GAP or the capacity of laptop? When I tried for larger values of $A, V, R$ for example $A=[1...200]$,etc I can't get any answer I am using GAP 11.0 and GAP 12.0.

Thanx in advance

1

There are 1 best solutions below

3
On

Well, let's make an easy estimate. you are using 9 iterated for-loops, each in the magnitude of 10 entries (This is grossly simplified, but will give us an idea of the time required). This gives $10^9$ loop iterations, respectively (if we want to finish in 24 hours, about $10000$ iterations per second.

So, to have any chance of finishing in reasonable time, you really need to make your command sequence optimal.

I think that GAP for quotients of free abelian groups still uses coset enumeration. So I would guess that replacing creation and size of G with a determinant of mt will be faster, but I have not tried it out.