[GAP Forum] Easy problem - but I can't do it!

Mathieu Dutour dutour at liga.ens.fr
Wed Apr 27 10:18:00 BST 2005


Dear professor Gordon Royle,

the problem appear when you are using the function OnSetsSets,
it assumes that gorb is a list of sets, which is not the
case. The function Orbits does not return a list of sets but a
list of lists.

If one adds the command
gorbSec:=List(gorb, x->Set(x));

then the command  Action(n, gorbSec, OnSetsSets);
returns what is expected.

Two remarks:
--would it be possible to rewrite the function Action so as
to avoid having the performance penalty related to the construction of
the homomorphism ? (see the documentation for details)
I myself rewrote Action, without this performance penalty, since I was
ignoring the already existing function Action.
--gorb[10]=[ [ 1, 12 ], [ 3, 10 ], [ 2, 9 ], [ 4, 11 ] ] is NOT a
set but somehow the commands
OnSetsSets(gorb[10], n.1);
Orbit(n, gorb[10], OnSetsSets);
are working. This should be considered as an accident.

  Mathieu

The Code of my function "Action"

TranslateElement:=function(eElt, LSET, Action)
  local eList, iElt, Pos;
  eList:=[];
  for iElt in [1..Length(LSET)]
  do
    Pos:=Position(LSET, Action(LSET[iElt], eElt));
    if Pos=fail then
      Print("Translation of the element is impossible\n");
      return false;
    fi;
    Add(eList, Pos);
  od;
  return eList;
end;
                                                                                
                                                                                
TranslateGroup:=function(GRP, LSET, Action)
  local eGen, GenNew, eList;
  if Order(GRP)=1 then
    return Group(());
  fi;
  GenNew:=[];
  for eGen in GeneratorsOfGroup(GRP)
  do
    eList:=TranslateElement(eGen, LSET, Action);
    Add(GenNew, PermList(eList));
  od;
  return Group(GenNew);
end;

-- 
Mathieu Dutour Sikiric		Researcher in Math
Tel. (+972)2 65 84 103		and Computer Science
Fax. (+972)2 56 30 702		Einstein Institute of Mathematics
E-mail: Mathieu.Dutour at ens.fr	Hebrew University of Jerusalem
http://www.liga.ens.fr/~dutour	Israel




More information about the Forum mailing list