8.17 OrbitLengths

OrbitLengths( G, D )
OrbitLengths( G, D, operation )

OrbitLengths returns a list of the lengths of the orbits of the group G on the domain D, which may be a list of points of arbitrary type. See Orbit for the definition of orbits.

It is allowed that D is proper subset of a domain, i.e., that D is not invariant under the operation of G. In this case D is silently replaced by the smallest superset of D which is invariant.

The ordering of the lengths of orbits in the list returned by OrbitLengths corresponds to the list of cycles returned by Orbits, which is ordered with respect to the smallest point in each orbit.

OrbitLengths accepts a function operation of two arguments d and g as optional third argument, which specifies how the elements of G operate (see Other Operations).

    gap> g := Group( (1,2,3)(6,7), (3,4,5)(7,8) );;
    gap> OrbitLengths( g, [1..8] );
    [ 5, 3 ]
    gap> sets := Combinations( [1..8], 3 );; Length( sets );
    56    # a list of all three element subsets of '[1..8]'
    gap> OrbitLengths( g, sets, OnSets );
    [ 10, 30, 15, 1 ] 

OrbitLengths calls
G.operations.OrbitLenghts( G, D, operation )
and returns the value. Note that the third argument is not optional for functions called this way.

The default function called this way is GroupOps.OrbitLengths, which takes an element from D, computes its orbit, removes all points in the orbit from D, and repeats this until D has been emptied. Special categories of groups overlay this default function with more efficient functions.

Previous Up Top Next
Index

GAP 3.4.4
April 1997