[Previous] [Next] [Contents]

[ImplState=stable,TestState=stable,DocState=stable]

combinat::permutations::peaks -- Peaks of permutations

Introduction

Functions related to the peaks of permutations

Details

Method peaks: list of the peaks of a permutation

Method peaksNumber: number of peaks of a permutation

Example 1

The peaks of a permutation are computed as:

>> combinat::permutations::peaks([2, 1, 6, 4, 7, 3, 5])
     
                                  [3, 5]
        

The number of peaks can be directly computed using:

>> combinat::permutations::peaksNumber([2, 1, 6, 4, 7, 3, 5])
     
                                     2
        

[Previous] [Next] [Contents]


MuPAD Combinat, an open source algebraic combinatorics package