[GAP Forum] How many elements of SymmetricGroup can be
representedby GAP ?
kohl at mathematik.uni-stuttgart.de
Mon Jul 12 16:50:39 BST 2004
Kang ByoungKwan wrote:
> I met the problem about limit # of representing elements of symmetric group.
> This is my partial code for using all elements of symmetric group
> gap: cannot extend the workspace any more
> gap: Press <Enter> to end program
> If I write idx:=9 then the above program acts well. But, If idx:=10 then they break
> Is there some solutions for solving this problem ?
There are basically two solutions to this problem:
- If you just want to loop over all group elements, then you can write
for g in SymmetricGroup(10) do
< your code, i.e. what you want to do with the group element >
- If you want to have an object which behaves like a list of all group elements,
then you can write
l := Enumerator(SymmetricGroup(10));
This does not actually compute all group elements (thus does not need much memory),
but can be used as if it would be a list of all group elements, e.g. you can write
[ (1,2,10,3,9,4,8,7,5), (1,3,9,4,8,7,5), (1,4,8,7,5)(3,9,10),
(1,5)(3,9,4,8,7,10), (1,6,10,3,9,4,8,7,5), (1,7,5)(3,9,4,8,10) ]
Hope this helps,
More information about the Forum