Macaulay2 » Documentation
Packages » Permutations :: avoidsPattern
next | previous | forward | backward | up | index | toc

avoidsPattern -- whether a permutation avoids a pattern

Description

Pattern avoidance is more easily understood through an example. A permutation $p$ is $2143$-avoiding if there do not exist indices $i < j < k < l$ such that $w_j < w_i < w_l < w_k$.

i1 : p = permutation {3,1,2,5,4}

o1 = Permutation{3, 1, 2, 5, 4}

o1 : Permutation
i2 : avoidsPattern(p, {2,1,4,3})

o2 = false

Acknowledgement

This method was ported over from the MatrixSchubert (missing documentation) package.

See also

Ways to use avoidsPattern:

  • avoidsPattern(Permutation,List)

For the programmer

The object avoidsPattern is a method function.


The source of this document is in /build/reproducible-path/macaulay2-1.25.06+ds/M2/Macaulay2/packages/Permutations/Documentation/patternAvoidanceDocs.m2:32:0.