[GAP Forum] Creating an Orbit Function

Tim Boykett tim at timesup.org
Thu Apr 26 10:44:24 BST 2007


Hello Owen,

the technique that I used is demonstrated below.
One created an action (this can be quite complex) taking a group element
and an object in the set to another element in the set. I have done
ugly things with strange group actions on ordered pairs of sets, or sets
of ordered pairs of sets, etc.

The following code demonstrates this with:
  - creating the action congAction
  - creating the group group
  - finding the orbits of the group group on the Symmetric Group


gap> congAction := function(x,g) return x^g; end;
function( x, g ) ... end
gap> group := Group((1,2,3),(1,4));
Group([ (1,2,3), (1,4) ])
gap>   orbs := Orbits(group,SymmetricGroup(4),congAction);
[ [ () ], [ (3,4), (1,4), (1,3), (2,4), (1,2), (2,3) ],
   [ (2,3,4), (1,4,3), (1,2,3), (1,2,4), (1,3,4), (1,4,2), (2,4,3),  
(1,3,2) ],
   [ (1,2)(3,4), (1,4)(2,3), (1,3)(2,4) ],
   [ (1,2,3,4), (1,4,2,3), (1,2,4,3), (1,3,4,2), (1,4,3,2),  
(1,3,2,4) ] ]
gap>

I hope this makes sense.

If you need to see how GAP does it, you can open the gap code - or  
maybe you cannot
any more. I cannot find the implementation in the GAP files right  
now. Perhaps
it is written in C now...

Cheers,

tim






On 26/04/2007, at 3:26 AM, hetheo01 at student.uwa.edu.au wrote:

> Hi
>
> I am trying to complete a research project in which I need to  
> define my own function to compute the orbit of a point given a  
> sequence of permutations. I am aware that GAP has a predetermined  
> function for computing the orbit of a point, however the  
> requirements of this project require me to define all the functions  
> by myself.
>
> Can you tell me how the "Orbit" function works (can I access the  
> code from GAP to simplify it), or can you get me started on how to  
> program my function.
>
> Thanks
>
> Owen
>
> _______________________________________________
> Forum mailing list
> Forum at mail.gap-system.org
> http://mail.gap-system.org/mailman/listinfo/forum
>



More information about the Forum mailing list