Skip to content

Commit 1377a4e

Browse files
authored
Enhance support for very long transversals in a permutation group by forcing down huge index steps through an intermediate subgroup (#6114)
When computing a transversal in a permutation group force down huge index steps, as they might lead to creation of infeasibly long bit lists. Incidentally, this allows for Filtering classes in A_15.
1 parent 47fa98a commit 1377a4e

File tree

3 files changed

+73
-5
lines changed

3 files changed

+73
-5
lines changed

lib/csetgrp.gi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1819,7 +1819,10 @@ DeclareRepresentation( "IsFactoredTransversalRep",
18191819
# group, subgroup, list of transversals (descending)
18201820
BindGlobal("FactoredTransversal",function(G,S,t)
18211821
local trans,m,i;
1822-
Assert(1,ForAll([1..Length(t)-1],i->t[i]!.subgroup=t[i+1]!.group));
1822+
Assert(1,ForAll([1..Length(t)-1],
1823+
i -> (not IsBound(t[i]!.subgroup))
1824+
or (not IsBound(t[i+1]!.group))
1825+
or t[i]!.subgroup = t[i+1]!.group));
18231826

18241827
m:=[1];
18251828
for i in [Length(t),Length(t)-1..2] do

lib/csetperm.gi

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ end );
4242
##
4343
#F RightTransversalPermGroupConstructor( <filter>, <G>, <U> ) . constructor
4444
##
45-
MAX_SIZE_TRANSVERSAL := 100000;
45+
MAX_SIZE_TRANSVERSAL := 100000; # try to keep transversals shorter than this
46+
BITLIST_LIMIT_TRANSVERSAL:=10^8; # absolutely must keep transversals
47+
# shorter, as otheriwse too long bit lists might be produced
4648

4749
# so far only orbits and perm groups -- TODO: Other deduced actions
4850
InstallGlobalFunction(ActionRefinedSeries,function(G,U)
@@ -121,11 +123,23 @@ BindGlobal( "RightTransversalPermGroupConstructor", function( filter, G, U )
121123
# go in biggish steps through the chain
122124
nc:=[ac[1]];
123125
nct:=[actions[1]];
124-
for i in [3..Length(ac)] do
125-
if Size(ac[i])/Size(Last(nc))>MAX_SIZE_TRANSVERSAL then
126+
i:=3;
127+
while i<=Length(ac) do
128+
if Size(ac[i-1])/Size(nc[Length(nc)])
129+
>BITLIST_LIMIT_TRANSVERSAL then
130+
# the next step would be horrible -- insert
131+
bpt:=AscendingChain(ac[i-1],nc[Length(nc)]:cheap);
132+
bpt:=bpt{[2..Length(bpt)-1]};
133+
ac:=Concatenation(ac{[1..i-2]},bpt,ac{[i-1..Length(ac)]});
134+
actions:=Concatenation(actions{[1..i-2]},List(bpt,x->fail),
135+
actions{[i-1..Length(actions)]});
136+
fi;
137+
138+
if Size(ac[i])/Size(nc[Length(nc)])>MAX_SIZE_TRANSVERSAL then
126139
Add(nc,ac[i-1]);
127140
Add(nct,actions[i-1]);
128141
fi;
142+
i:=i+1;
129143
od;
130144
Add(nc,Last(ac));
131145
Add(nct,Last(actions));

tst/testinstall/listgen.tst

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#@local g,h,l,l2,p2,perm,t,filt,lcpy,permsp
1+
#@local g,h,l,l2,p2,perm,t,filt,lcpy,permsp,old_paras,G,U,tr
22
gap> START_TEST("listgen.tst");
33
gap> List( [ 1 .. 10 ], x -> x^2 );
44
[ 1, 4, 9, 16, 25, 36, 49, 64, 81, 100 ]
@@ -156,6 +156,8 @@ gap> String( l );
156156
"[ 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 ]"
157157
gap> String( [ 1 .. 10 ] );
158158
"[ 1 .. 10 ]"
159+
160+
# right transversals
159161
gap> g:=Group((1,5)(2,6)(3,7)(4,8),(1,3)(2,4)(5,7)(6,8),(1,2)(3,4)(5,6)(7,8),
160162
> (5,6)(7,8), (5,7)(6,8), (3,4)(7,8), (3,5)(4,6), (2,3)(6,7));;
161163
gap> h:=Subgroup(g,[(5,6)(7,8),(5,7)(6,8),(2,4)(6,8),(2,5)(4,7),(1,2)(3,4)]);;
@@ -167,5 +169,54 @@ true
167169
gap> p2:=Position(t,(5,7)(6,8));
168170
fail
169171

172+
# right transversals, see pull request #6114
173+
gap> old_paras:= [ BITLIST_LIMIT_TRANSVERSAL, MAX_SIZE_TRANSVERSAL ];;
174+
gap> BITLIST_LIMIT_TRANSVERSAL:= 59;;
175+
gap> MAX_SIZE_TRANSVERSAL:= 59;;
176+
gap> G:= Group( [ # the group is equal to AtlasGroup( "J1" )
177+
> ( 1,262)( 2,107)( 3, 21)( 4,213)( 5,191)( 6, 22)( 7,133)
178+
> ( 8,234)( 9,232)( 10,151)( 11,139)( 12,176)( 13,202)( 14,253)( 15,222)
179+
> ( 17,195)( 18,206)( 19, 68)( 20, 55)( 23,179)( 24,217)( 25,216)( 26,256)
180+
> ( 27, 87)( 28, 70)( 29,131)( 30, 44)( 31,105)( 32,170)( 33, 77)( 34,104)
181+
> ( 35,198)( 36,137)( 37,243)( 38, 56)( 39,124)( 40,223)( 41,134)( 43,174)
182+
> ( 46, 51)( 47,128)( 48, 94)( 49,250)( 50,264)( 52,183)( 53,231)( 54,115)
183+
> ( 57, 85)( 58,233)( 59,261)( 60, 95)( 61,235)( 62,177)( 63,249)( 64, 91)
184+
> ( 65,247)( 66,155)( 69,219)( 71,237)( 72,211)( 73, 84)( 74,192)( 75,130)
185+
> ( 76,251)( 79,260)( 80,112)( 81,193)( 82,156)( 83,242)( 86,238)( 88,143)
186+
> ( 89,168)( 90,148)( 92,119)( 93,212)( 96,150)( 97,199)( 98,140)( 99,189)
187+
> (100,180)(101,147)(102,111)(103,159)(106,162)(108,194)(109,166)(110,200)
188+
> (113,120)(114,141)(116,182)(117,181)(118,225)(121,254)(122,125)(123,146)
189+
> (126,208)(127,221)(129,210)(132,255)(136,175)(138,207)(142,240)(144,172)
190+
> (145,185)(149,224)(152,169)(153,241)(154,190)(157,214)(158,161)(160,236)
191+
> (163,239)(164,229)(165,230)(167,188)(171,258)(173,186)(178,245)(184,205)
192+
> (187,228)(197,203)(201,252)(209,248)(215,259)(218,246)(220,227)(257,263)
193+
> (265,266), ( 1,146, 21)( 2,132, 82)( 4,156,166)( 5,242,253)
194+
> ( 6,107, 28)( 7,125, 76)( 8,245,130)( 9,174, 42)( 10,241,244)
195+
> ( 11,264, 63)( 12,248,234)( 13, 36, 44)( 14,116,128)( 15, 47, 25)
196+
> ( 16,178,112)( 17,170,110)( 18,197, 74)( 19,233,180)( 20,121, 96)
197+
> ( 22,228,155)( 23, 48,173)( 24,201,187)( 26,136,190)( 27,212, 94)
198+
> ( 29,175, 52)( 30, 77, 32)( 31,237, 34)( 33,226, 90)( 35,129, 54)
199+
> ( 37,161,114)( 38,232, 87)( 39,219,192)( 40, 78,159)( 41,139, 71)
200+
> ( 43,211,251)( 45,222,240)( 46, 97,135)( 49, 70,131)( 50,153,200)
201+
> ( 51,186,209)( 53,203,216)( 55,169, 64)( 56,140,230)( 57,260,118)
202+
> ( 58, 91,243)( 59,199,227)( 60,108,164)( 61,208,101)( 62,206,106)
203+
> ( 65,103, 66)( 67, 95,205)( 68, 73,225)( 69,151,113)( 72,221,152)
204+
> ( 75,143,202)( 79,217,254)( 80, 93,122)( 81,181,252)( 83,258,126)
205+
> ( 84,163,177)( 85,154,213)( 86,182,196)( 88,133,215)( 89,117,247)
206+
> ( 92,191,160)( 99,229,263)(100,138,188)(102,194,157)(105,149,184)
207+
> (109,123,193)(111,137,183)(115,238,235)(119,167,147)(120,134,189)
208+
> (124,185,265)(127,218,261)(141,231,210)(142,239,236)(144,224,249)
209+
> (145,158,220)(148,214,172)(150,250,259)(162,257,256)(165,179,246)
210+
> (176,195,266)(198,204,207)(223,262,255) ] );;
211+
gap> U:= TrivialSubgroup( G );;
212+
gap> tr:= RightTransversalPermGroupConstructor(
213+
> IsRightTransversalPermGroupRep, G, U );;
214+
gap> Length( tr ) = Size( G );
215+
true
216+
gap> PositionCanonical( tr, GeneratorsOfGroup( G )[1] ) <= Length( tr );
217+
true
218+
gap> BITLIST_LIMIT_TRANSVERSAL:= old_paras[1];;
219+
gap> MAX_SIZE_TRANSVERSAL:= old_paras[2];;
220+
170221
# that's all, folks
171222
gap> STOP_TEST("listgen.tst");

0 commit comments

Comments
 (0)