[Previous] [Next] [Contents]

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

combinat::permutations::haspattern -- Patterns on standard permutations

Introduction

Functions related to patterns on standard permutations

Details

Method hasPattern: Test of existence of a pattern in a standard permutation

Method patternPositions: list of the positions of a pattern in a permutation

Example 1

To check whether a permutation contains a given pattern, you can use:

>> combinat::permutations::hasPattern([3, 5, 1, 4, 6, 2], [1, 3, 2])
     
                                   TRUE
        

To look at the positions where the pattern appears, you can ask:

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

Super-Domain

combinat::words

Axioms

Ax::systemRep

[Previous] [Next] [Contents]


MuPAD Combinat, an open source algebraic combinatorics package