Skip to content

Commit

Permalink
FIX: ClosurePermGroup long run
Browse files Browse the repository at this point in the history
In some situations, it seems that ClosurePermGroup can iterate very long
time with evrification failing repeatedly. In this situation we now simply
force a new stabilizer chain computation from scratch, than trying to bend
the (apparently confused) chain in the right way.
This is not a beautiful fix but a workaround, albeit one that should have
litlle cost implications.
  • Loading branch information
hulpke committed Nov 1, 2016
1 parent e2c3270 commit 98a0ef8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/stbcrand.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1525,6 +1525,7 @@ InstallGlobalFunction( ClosureRandomPermGroup,
missing, # if a correct base was provided by input, missing
# contains those points of it which are not in
# constructed base
cnt, # iteration counter
correct; # boolean; true if a correct base is given

# warning: options.base should be compatible with BaseOfGroup(G)
Expand Down Expand Up @@ -1647,6 +1648,7 @@ InstallGlobalFunction( ClosureRandomPermGroup,
fi;
od;

cnt:=0;
ready := false;
while not ready do
if IsBound(options.limit)
Expand All @@ -1668,6 +1670,15 @@ InstallGlobalFunction( ClosureRandomPermGroup,
elif options.random = 1000 then
G.restored := SCRRestoredRecord(G);
result := VerifySGS( G.restored, missing, correct );
cnt:=cnt+1;
if cnt>99 then
# in rare cases this loop iterates for a very long time.
# In this case, rather create a new chain, than try to
# fix the problematic one
#Error("infinite loop?");
return StabChainRandomPermGroup(G.generators,G.identity,
options);
fi;
elif options.random > 0 then
result := SCRStrongGenTest
(G,param,orbits,basesize,base,correct,missing);
Expand Down Expand Up @@ -1695,6 +1706,7 @@ InstallGlobalFunction( ClosureRandomPermGroup,
Unbind(G.restored);
SCRMakeStabStrong (G,new,param,orbits,
where,basesize,base,correct,missing,true);
#Print("D ",SizeStabChain(G),"\n");
fi;
fi;
od;
Expand Down

0 comments on commit 98a0ef8

Please sign in to comment.