The property I want to check is whether there exists a finite non-supersoluble group $G$ which admits a triple factorisation $G=AB=AC=BC$, where $A, B, C$ are abnormal supersoluble subgroups of $G$. (A subgroup $H$ of $G$ is called abnormal if for all $x \in G$ we have $x \in \langle H, H^x \rangle$.)
I have begun testing for this property with the following GAP routines:
#Checks if g=hk
IsProductOf:=function(g,h,k)
if Order(g)*Order(Intersection(h,k)) = Order(h)*Order(k) then
return true;
fi;
return false;
end;;
#Checks if the subgroup h is abnormal in the group g
IsAbnormalSubgroup:=function(g,h)
local norm, y, closure;
if not IsSubset(h,Centralizer(g,h)) then
return false;
fi;
norm:=Normalizer(g,h);
if Order(norm)>Order(h) then
return false;
fi;
for y in RightTransversal(g,h) do
closure:=ClosureGroup(h,ConjugateGroup(h,y));
if not ForAll(TrivialSubgroup(g),x->x*y in closure) then
return false;
fi;
od;
return true;
end;;
and
# Checks whether the group g can be written as a product g=ab where a, b
# are abnormal supersoluble subgroups of g, and whether g has at least three conjugacy
# classes of such subgroups
IsCandidateGroup:=function(g)
local list, a, b, brep, r, reps, i, j;
list:=Filtered(List(ConjugacyClassesSubgroups(g),Representative),
x->IsSupersolvableGroup(x) and IsAbnormalSubgroup(g,x));
if Size(list)<3 then
return false;
fi;
for i in [1..Length(list)] do
a:=list[i];
for j in [i+1..Length(list)] do
brep:=list[j];
reps:=List(DoubleCosetRepsAndSizes(g,brep,a),x->x[1]);
for r in reps do
b:=brep^r;
if IsProductOf(g,a,b) then
return true;
fi;
od;
od;
od;
return false;
end;;
Next,
test:=function(g)
local i, j, k, list, h, m, n, mrep, nrep, reps, r, s, Reps;
list:=Filtered(List(ConjugacyClassesSubgroups(g),Representative),
x->IsSupersolvableGroup(x) and IsAbnormalSubgroup(g,x));
for i in [1..Length(list)] do
h:=list[i];
for j in [i+1..Length(list)] do
mrep:=list[j];
reps:=List(DoubleCosetRepsAndSizes(g,mrep,h),x->x[1]);
for r in reps do
m:=mrep^r;
if IsProductOf(g,h,m) then
for k in [j+1..Length(list)] do
nrep:=list[k];
Reps:=List(DoubleCosetRepsAndSizes(g,Normalizer(h,m),nrep),x->x[1]);
for s in Reps do
n:=nrep^s;
if IsProductOf(g,h,n) and IsProductOf(g,m,n) then
return true;
fi;
od;
od;
fi;
od;
od;
od;
return false;
end;;
Perhaps someone could suggest some concrete code to improve efficiency?
I have updated the code to account for suggestions and have simplified things in a couple of places, although I am not totally sure that the test function is correct.
A few remarks on coding for speed. Nothing changes the algorithms fundamentally or uses new mathematical ideas:
Normalizeris a comparatively expensive operation, whileCentralizeris often much faster. It might (but that is something one would have to try out in examples) give a speedup to test first (before computing the normalizer) whether the centralizer gives anything new:Next, you run through all elements of $G$:
Running through all elements will take a long time and since you call this from within loops you want to be as efficient as possible here. A first reduction would be to run instead through cosets of $h$, that is through representatives of $h\cap g$.
Even better would be to run over cosets of $N_g(h)$ first, and then test one representative of every coset of $g\cap h$ therein in a double loop.
Next:
It would be faster to test only one representative in each conjugacy class. That is:
Aside, though not needed here any longer, instead of
Append(list,[h]);useAdd(list,h);as it does not create an unneccessary list.In your test
I think testing supersolvability will typically be faster then testing abnormality (which needs a normalizer). So I would use:
instead since GAP does "lazy" left-to right evaluation, skipping parts that will not change the logical value.
If the test for permutability is more expensive, it would be sufficient to run through subgroups
bup to conjugacy by $N_G(a)$. You could do so by takingbonly up to conjugacy (i.e. changeSubgroupsOfInterest) and calculate representatives of the double cosets $N_G(b)\setminus G/N_G(a)$ and then run through conjugates $b^r$ for the representatives $r$. You can also move rgeClosuretest outside this new innermost loopIn your main loop you have the same situation:
You could run for
kup to conjugacy by $N_G(h)$ and forjup to conjugacy by $N_{N_G(h)}(k)$.Again I expect the
Closuretests to be cheaper than theIsPermutabletests. So do them before. Even more, move tests that only involvehandkoutside the innerjloop, so you avoid repeated testing.All these changes together should give you one, maybe even two magnitudes of speedup.
As for a more systematic description of such techniques, there is an old book: Jon Louis Bentley, Writing Efficient Programs, Prentice Hall, 1982 that I found useful.