OFFSET
0,3
COMMENTS
Here we use the inverse of the left-right maxima variant of Foata's transformation, which works by rotating each cycle largest element first and then sorts the cycles to ascending order, according to that first (and largest) element of each.
REFERENCES
I.M. Gessel and R. P. Stanley, Algebraic Enumeration, chapter 21 in Handbook of Combinatorics, Vol. 2, edited by R.L.Graham et al., The MIT Press, Mass, 1995, page 1045.
LINKS
Joe Buhler and R. L. Graham, Juggling Drops and Descents, Amer. Math. Monthly, 101, (no. 6) 1994, 507 - 519.
MAPLE
[seq(PermRevLexRank(FoataInv(PermRevLexUnrank(j))), j=0..119)];
with(group); FoataInv := p -> map(op, sort([op(map(RotCycleLargestFirst, convert(p, `disjcyc`))), op(FixedCycles(p))], sortbyfirst));
sortbyfirst := (a, b) -> `if`((a[1] < b[1]), true, false);
FindLargest := proc(a) local i, m; m := 0; for i from 1 to nops(a) do if(0 = m) then m := i; else if(a[i] > a[m]) then m := i; fi; fi; od; RETURN(m); end;
RotCycleLargestFirst := proc(c) local x; x := FindLargest(c); if(x <= 1) then RETURN(c); else RETURN([op(c[x..nops(c)]), op(c[1..(x-1)])]); fi; end;
FixedCycles := proc(p) local a, i; a := []; for i from 1 to nops(p) do if(p[i] = i) then a := [op(a), [i]]; fi; od; RETURN(a); end;
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 19 2001
STATUS
approved