[GAP Forum] Questions

Alexander Konovalov alexander.konovalov at gmail.com
Tue Feb 17 23:57:51 GMT 2009


Dear Sandeep,

On 16 Feb 2009, at 06:45, Sandeep Murthy wrote:

> Hi.
>
> I have a couple of specific questions.
>
> 1. Is there a method that returns the inverse element of
> any given element of a group?

Yes, use x^-1 to find an inverse of x:

gap> (1,2,3)^-1;
(1,3,2)

> 2. Given that the operation
>
> subsetTriplesG := Cartesian( Combinations( Elements( groupG ) ),
>                               Combinations( Elements( groupG ) ),
>                               Combinations( Elements( groupG ) ) );
>
> constructs the set of all (ordered) triples of subsets of a given  
> group
> groupG, is there a method or combination of methods by which
> I can obtain only those distinct triples of groupG which are not
> permutations of each other, i.e. a set of distinct representatives
> of an equivalence class of subset triples of groupG where
> equivalence of two triples means one is a permutation of the
> other?

It is a bit unclear what do you mean, but if understood you correctly,
isn't it Combinations( Combinations( AsList( G ) ),3) what you need?
Do you wish to consider empty subset and the whole group?

Of course the orders of the resulting set will grow extremely fast, e.g.

gap> Combinations( Combinations( AsList( SymmetricGroup( 2 ) ) ),3);
[ [ [  ], [ () ], [ (), (1,2) ] ], [ [  ], [ () ], [ (1,2) ] ],
  [ [  ], [ (), (1,2) ], [ (1,2) ] ], [ [ () ], [ (), (1,2) ],  
[ (1,2) ] ] ]

gap> NrCombinations( Combinations( AsList( SymmetricGroup( 3 ) ) ),3);
41664

and I run out of memory for S_4 with default GAP session. Maybe you can
first check whether this is actually what you need, because maybe you
need UnorderedTuples( Combinations( AsList( G ) ), 3 ), which will make
the case even worse:

gap> UnorderedTuples( Combinations( AsList( SymmetricGroup( 2 ) ) ),  
3 );
[ [ [  ], [  ], [  ] ], [ [  ], [  ], [ () ] ], [ [  ], [  ], [ (),  
(1,2) ] ],
   [ [  ], [  ], [ (1,2) ] ], [ [  ], [ () ], [ () ] ], [ [  ],  
[ () ], [ (), (1,2) ] ],
   [ [  ], [ () ], [ (1,2) ] ], [ [  ], [ (), (1,2) ], [ (), (1,2) ] ],
   [ [  ], [ (), (1,2) ], [ (1,2) ] ], [ [  ], [ (1,2) ], [ (1,2) ] ],
   [ [ () ], [ () ], [ () ] ], [ [ () ], [ () ], [ (), (1,2) ] ],
   [ [ () ], [ () ], [ (1,2) ] ], [ [ () ], [ (), (1,2) ], [ (),  
(1,2) ] ],
   [ [ () ], [ (), (1,2) ], [ (1,2) ] ], [ [ () ], [ (1,2) ],  
[ (1,2) ] ],
   [ [ (), (1,2) ], [ (), (1,2) ], [ (), (1,2) ] ],
   [ [ (), (1,2) ], [ (), (1,2) ], [ (1,2) ] ], [ [ (), (1,2) ],  
[ (1,2) ], [ (1,2) ] ],
   [ [ (1,2) ], [ (1,2) ], [ (1,2) ] ] ]

Then you may think about further restriction of the search space and  
enumerative
procedures instead of generating the whole set in once.

Hope this helps,
Alexander



More information about the Forum mailing list