#20445: Iteration through Coxeter groups
---------------------------------+------------------------
       Reporter:  stumpc5        |        Owner:
           Type:  enhancement    |       Status:  new
       Priority:  major          |    Milestone:  sage-7.2
      Component:  combinatorics  |   Resolution:
       Keywords:                 |    Merged in:
        Authors:                 |    Reviewers:
Report Upstream:  N/A            |  Work issues:
         Branch:                 |       Commit:
   Dependencies:                 |     Stopgaps:
---------------------------------+------------------------
Description changed by stumpc5:

Old description:

> The algorithm in chevie is very different from the algorithm we currently
> have:
> {{{
> ForEachElement:=function(W,f)local l,g;
>   if not IsFinite(W) then Error("only for finite Coxeter groups");
>   elif W.nbGeneratingReflections=0 then f(W.identity);return;
>   fi;
>   l:=List([0..W.nbGeneratingReflections],i->
>         ReflectionSubgroup(W,W.reflectionsLabels{[1..i]}));
> l:=List([1..Length(l)-1],i->ReducedRightCosetRepresentatives(l[i+1],l[i]));
>   g:=function(x,v)local y;
>     if Length(v)=0 then f(x);
>     else for y in v[1] do g(x*y,v{[2..Length(v)]});od;
>     fi;
>   end;
>   g(W.identity,l);
> end;
> }}}
>
> We should also implement that algorithm (maybe even with hard-coded coset
> representatives in the finite case) so that we can see if this is indeed
> faster.

New description:

 The algorithm in chevie is very different from the algorithm we currently
 have:
 {{{
 ForEachElement:=function(W,f)local l,g;
   if not IsFinite(W) then Error("only for finite Coxeter groups");
   elif W.nbGeneratingReflections=0 then f(W.identity);return;
   fi;
   l:=List([0..W.nbGeneratingReflections],i->
         ReflectionSubgroup(W,W.reflectionsLabels{[1..i]}));
 l:=List([1..Length(l)-1],i->ReducedRightCosetRepresentatives(l[i+1],l[i]));
   g:=function(x,v)local y;
     if Length(v)=0 then f(x);
     else for y in v[1] do g(x*y,v{[2..Length(v)]});od;
     fi;
   end;
   g(W.identity,l);
 end;
 }}}

 We should also implement that algorithm (maybe even with hard-coded coset
 representatives in the finite case) so that we can see if this is indeed
 faster.

 The two needed methods are
 {{{
 #############################################################################
 ##
 #F  ReducedInRightCoset( <W> , <w> )  . . . . . reduced element in coset
 W.w
 ##
 ##  w is an automorphism of a parent Coxeter group of W.
 ##  'ReducedInRightCoset' returns the unique element in the right
 ##  coset W.w which is W-reduced.
 ##

 AbsCoxOps.ReducedInRightCoset:=function(W,w)local i;
   while true  do
     i := FirstLeftDescending(W, w);
     if i=false then return w; fi;
     w := W.reflections[i] * w;
   od;
 end;

 #############################################################################
 ##
 #F  ReducedRightCosetRepresentatives( <W>, <H> )  . . . . . . . . . . . .
 .
 #F  . . . . . . . . . . . . . . .  distinguished right coset
 representatives
 ##
 ##  'ReducedRightCosetRepresentatives'  returns a list of reduced words in
 the
 ##  Coxeter group <W> that are distinguished right  coset representatives
 for
 ##  the right cosets H\W where  H is a reflection subgroup  of W.
 ##
 ReducedRightCosetRepresentatives:=function(W, H)local res, totest, new;
   totest:=Set([W.identity]);
   res:=Set([W.identity]);
   repeat
     new:=Concatenation(List(totest,w->List(
       W.reflections{W.generatingReflections},s->ReducedInRightCoset(H,
 w*s))));
     UniteSet(res,totest);
     totest:=Difference(new,res);
   until Length(totest)=0;
   InfoChevie2("#I nb. of cosets: ",Length(res),"\n");
   SortBy(res,x->CoxeterLength(W,x));
   return res;
 end;
 }}}

--

--
Ticket URL: <http://trac.sagemath.org/ticket/20445#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to