sym-0.12.0: Permutations, patterns, and statistics

CopyrightAnders Claesson 2013
MaintainerAnders Claesson <anders.claesson@gmail.com>
Safe HaskellNone
LanguageHaskell98

Sym.Perm.Pattern

Description

 

Synopsis

Documentation

type Pattern = Perm Source

Pattern is just an alias for permutation.

type SubSeq = CLongArray Source

A SubSeq is represented by an increasing array of non-negative integers.

ordiso :: Pattern -> Perm -> SubSeq -> Bool Source

ordiso u v m determines whether the subword in v specified by m is order isomorphic to u.

choose :: Int -> Int -> [SubSeq] Source

n `choose` k is the list of subsequences of [0..n-1] with k elements.

copiesOf :: Pattern -> Perm -> [SubSeq] Source

copiesOf p w is the list of sets that represent copies of p in w.

contains :: Perm -> Pattern -> Bool Source

w contains p is a predicate determining if w contains the pattern p.

avoids :: Perm -> Pattern -> Bool Source

w avoids p is a predicate determining if w avoids the pattern p.

avoidsAll :: Perm -> [Pattern] -> Bool Source

w avoidsAll ps is a predicate determining if w avoids the patterns ps.

avoiders :: [Pattern] -> [Perm] -> [Perm] Source

avoiders ps ws is the list of permutations in ws avoiding the patterns in ps.

minima :: [Pattern] -> [Pattern] Source

The set of minimal elements with respect to containment. FIX: Poor implementation

maxima :: [Pattern] -> [Pattern] Source

The set of maximal elements with respect to containment. FIX: Poor implementation

coeff :: (Pattern -> Int) -> Pattern -> Int Source

coeff f v is the coefficient of v when expanding the permutation statistic f as a sum of permutations/patterns. See Petter Brändén and Anders Claesson: Mesh patterns and the expansion of permutation statistics as sums of permutation patterns, The Electronic Journal of Combinatorics 18(2) (2011), http://www.combinatorics.org/ojs/index.php/eljc/article/view/v18i2p5.