muEC::SG::Perm2Desc – list of descents of a permutation
computes the list of descents of a permutation
Call:
muEC::SG::Perm2Desc(perm, <nb | maj | comaj>)
Parameters:
perm: |
any list denoting a permutation |
Options:
nb: |
only counts objects |
maj: |
sum of descent positions |
comaj: |
sum of all values |
Related Functions:
Details:
The muEC::SG::Perm2Desc function computes the list of descents of the permutation perm, i.e. the list of positions , such that .
When called with the second argument maj, it returns the sum of the descent positions.
When called with the second argument comaj, it returns the sum of all values (n - descent position), where n is equal to nops(perm).
muEC::SG::Perm2Desc( [3,1,4,2,6,5,7] );
muEC::SG::Perm2Desc( [3,1,4,2,6,5,7], nb );
muEC::SG::Perm2Desc( [3,1,4,2,6,5,7], maj );
muEC::SG::Perm2Desc( [3,1,4,2,6,5,7], comaj );