> < ^ Date: Mon, 30 Sep 2002 14:13:30 +0200
> < ^ From: Jan Draisma <Jan.Draisma@unibas.ch >
> < ^ Subject: Re: Complexity of group problem

Dear Gap-forum, and Christopher Jefferson,

I am dealing with a problem where I have a permutation group G defined over
the integers 1...n, generated by a set of generators S

I want to find orbit(1), orbit(2) in "stabilizer of 1", orbit(3) in
"stabilizer of 1 and stabilizer of 2", etc.

OrbitList:=function(S,n)
        local g,i,l;
        g:=Group(S); l:=[];
        for i in [1..n] do
                Append(l,[Orbit(g,i)]);
                g:=Stabilizer(g,i);
        od;
        return l;
end;

For example:
gap> OrbitList([(1,2,3),(2,4)],4);          
[ [ 1, 2, 3, 4 ], [ 2, 4, 3 ], [ 3, 4 ], [ 4 ] ]

Best regards,

Jan


> < [top]