muEC::SG::Perm2Desc – list of descents of a permutation

computes the list of descents of a permutation

→ Examples

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:

muEC::SG::Perm2Rise

Details:

The muEC::SG::Perm2Desc function computes the list of descents of the permutation perm, i.e. the list of positions math, such that math.

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).

Example 1:

muEC::SG::Perm2Desc( [3,1,4,2,6,5,7] );

math

muEC::SG::Perm2Desc( [3,1,4,2,6,5,7], nb );

math

muEC::SG::Perm2Desc( [3,1,4,2,6,5,7], maj );

math

muEC::SG::Perm2Desc( [3,1,4,2,6,5,7], comaj );

math