SG::Perm2Rise
--
computes the list of rises of a permutation
SG::Perm2Rise(perm <,nb,rin,corin>)
perm | - | any list denoting a permutation |
nb | - | only counts objects |
rin | - | sum of rise positions |
corin | - | sum of values |
The SG::Perm2Rise
function computes the list of rises of the permutation
perm
, i.e. the list of positions i, such that
perm
[i] < perm
[i+1].
When called with the second argument rin
, it returns the sum of the
rise positions (rise index).
When called with the second argument corin
, it returns the sum of the
values (n
- rise position), where n
is equal to nops(perm)
.
>> muEC::SG::Perm2Rise( [3,1,4,2,6,5,7,8] );
[2, 4, 6, 7]
>> muEC::SG::Perm2Rise( [3,1,4,2,6,5,7,8], nb );
4
>> muEC::SG::Perm2Rise( [3,1,4,2,6,5,7,8], rin );
9
>> muEC::SG::Perm2Rise( [3,1,4,2,6,5,7,8], corin );
13
MuPAD Combinat, an open source algebraic combinatorics package