[Previous] [Next] [Contents]

## `SG::Perm2Rise` -- computes the list of rises of a permutation

#### Call(s)

`SG::Perm2Rise(perm <,nb,rin,corin>)`

#### Parameters

`perm` | - | any list denoting a permutation
`nb` | - | only counts objects
`rin` | - | sum of rise positions
`corin` | - | sum of values

#### Introduction

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

#### Example 1

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

#### Related Functions

`Perm2Desc`

[Previous] [Next] [Contents]

MuPAD Combinat, an open source algebraic combinatorics package