[GAP Forum] Looping over (double)coset representatives without creating the WHOLE list first
Alexander Hulpke
hulpke at math.colostate.edu
Wed Jan 12 20:22:30 GMT 2011
Dear Forum,
On Jan 11, 2011, at 1/11/11 4:44, Pornrat Ruengrot wrote:
> Hi,
>
> I have the following problem related to programming in GAP, hoping someone
> could help please.
>
> Let G be a permutation group.
> Let P be the subgroup of G consisting of all "perfect" permutations in G.
> The goal is to find P explicitly.
>
> For this it's enough to check only the (double)coset representatives, since
> if P is a subgroup of
> perfect permutations found so far and g (in G) is not perfect, then so is
> every element in PgP. So
> part of my codes is as follow:
> D:=DoubleCosetRepsAndSizes(G, P, P); # create list of double coset
> representatives to be checked
[...]
> In Magma there is the command TransversalProcess(G, H)
> http://magma.maths.usyd.edu.au/magma/handbook/text/571 that will do just
> that .
>
> I was wondering if there is a similar command in GAP?
Looking at the manual page you listed, this command only handles ordinary cosets, but not double cosets.
the same functionality is provided in GAP by the command RightTransversal which returns an object that looks and behaves like a list, but does so by calculating elements on the fly with far smaller storage requirement than an ordinary list.
For double cosets, neither magma (as far as I can read the manual), nor GAP provides similar functionality. Implementing this wouldn't be impossible (the construction algorithm basically builds a tree), but is not (in the existing code base for GAP) an easy modification. I do not expect such functionality to become available until certain future extensions towards threads have been implemented.
> (I also tried the build-in command SubgroupByProperty. This gave me the
> answer almost instantly,
> but when trying to list all elements, it took a very long time.)
However the process you are describing actually sounds like a simplified version of permutation group backtrack, and this is what is implemented by `SubgroupByProperty'. Where I am a bit puzzled now is your remark that listing all elements took a long time.
If you call `SubgroupByProperty', you get a permutation group, and enumerating the elements should be straightforward (though, if the subgroup is large, just printing them out could take time or you might have storage issues in creating them all).
Thus, if you were able to get a result from `SubgroupByProperty', but
Elements(subgroup);;
(note the double semicolon to suppress printing) please send me (privately) more information about the group and the property you're using–this really shouldn't take long.
All the best,
Alexander Hulpke
-- Colorado State University, Department of Mathematics,
Weber Building, 1874 Campus Delivery, Fort Collins, CO 80523-1874, USA
email: hulpke at math.colostate.edu, Phone: ++1-970-4914288
http://www.math.colostate.edu/~hulpke
More information about the Forum
mailing list