From HandWiki - Reading time: 10 min
In combinatorial mathematics and theoretical computer science, a permutation pattern is a sub-permutation of a longer permutation. Any permutation may be written in one-line notation as a sequence of digits representing the result of applying the permutation to the digit sequence 123...; for instance the digit sequence 213 represents the permutation on three elements that swaps elements 1 and 2. If π and σ are two permutations represented in this way (these variable names are standard for permutations and are unrelated to the number pi), then π is said to contain σ as a pattern if some subsequence of the digits of π has the same relative order as all of the digits of σ. For instance, permutation π contains the pattern 213 whenever π has three digits x, y, and z that appear within π in the order x...y...z but whose values are ordered as y < x < z, the same as the ordering of the values in the permutation 213. The permutation 32415 on five elements contains 213 as a pattern in several different ways: 3··15, ··415, 32··5, 324··, and ·2·15 all form triples of digits with the same ordering as 213. Each of the subsequences 315, 415, 325, 324, and 215 is called a copy, instance, or occurrence of the pattern. The fact that π contains σ is written more concisely as σ ≤ π. If a permutation π does not contain a pattern σ, then π is said to avoid σ. The permutation 51342 avoids 213; it has 10 subsequences of three digits, but none of these 10 subsequences has the same ordering as 213.
A case can be made that Percy MacMahon (1915) was the first to prove a result in the field with his study of "lattice permutations".[1] In particular MacMahon shows that the permutations which can be divided into two decreasing subsequences (i.e., the 123-avoiding permutations) are counted by the Catalan numbers.[2]
Another early landmark result in the field is the Erdős–Szekeres theorem; in permutation pattern language, the theorem states that for any positive integers a and b every permutation of length at least must contain either the pattern or the pattern .
The study of permutation patterns began in earnest with Donald Knuth's consideration of stack-sorting in 1968.Cite error: Closing </ref> missing for <ref> tag Since their paper, many other bijections have been given, see (Claesson Kitaev) for a survey.[3]
In general, if |Avn(β)| = |Avn(σ)| for all n, then β and σ are said to be Wilf-equivalent. Many Wilf-equivalences stem from the trivial fact that |Avn(β)| = |Avn(β−1)| = |Avn(βrev)| for all n, where β−1 denotes the inverse of β and βrev denotes the reverse of β. (These two operations generate the Dihedral group D8 with a natural action on permutation matrices.) However, there are also numerous examples of nontrivial Wilf-equivalences (such as that between 123 and 231):
From these two Wilf-equivalences and the inverse and reverse symmetries, it follows that there are three different sequences |Avn(β)| where β is of length four:
| β | sequence enumerating Avn(β) | OEIS reference | exact enumeration reference |
|---|---|---|---|
| 1234 | 1, 2, 6, 23, 103, 513, 2761, 15767, 94359, 586590, ... | A005802 | (Gessel 1990)[7] |
| 1324 | 1, 2, 6, 23, 103, 513, 2762, 15793, 94776, 591950, ... | A061552 | unenumerated |
In the late 1980s, Richard Stanley and Herbert Wilf conjectured that for every permutation β, there is some constant K such that |Avn(β)| < Kn. This was known as the Stanley–Wilf conjecture until it was proved by Adam Marcus and Gábor Tardos.[8]
A closed class, also known as a pattern class, permutation class, or simply class of permutations is a downset in the permutation pattern order. Every class can be defined by the minimal permutations which do not lie inside it, its basis. Thus the basis for the stack-sortable permutations is {231}, while the basis for the deque-sortable permutations is infinite. The generating function for a class is Σ x|π| where the sum is taken over all permutations π in the class.
As the set of permutations under the containment order forms a poset it is natural to ask about its Möbius function, a goal first explicitly presented by (Wilf 2002).[9] The goal in such investigations is to find a formula for the Möbius function of an interval [σ, π] in the permutation pattern poset which is more efficient than the naïve recursive definition. The first such result was established by (Sagan Vatter), who gave a formula for the Möbius function of an interval of layered permutations.[10] Later, (Burstein Jelinek) generalized this result to intervals of separable permutations.[11]
It is known that, asymptotically, at least 39.95% of all permutations π of length n satisfy μ(1, π)=0 (that is, the principal Möbius function is equal to zero),[12] but for each n there exist permutations π such that μ(1, π) is an exponential function of n.[13]
Given a permutation (called the text) of length and another permutation of length (called the pattern), the permutation pattern matching (PPM) problem asks whether is contained in . When both and are regarded as variables, the problem is known to be NP-complete, and the problem of counting the number of such matches is #P-complete.[14] However, PPM can be solved in linear time when k is a constant. Indeed, Guillemot and Marx[15] showed that PPM can be solved in time , meaning that it is fixed-parameter tractable with respect to .
There are several variants on the PPM problem, as surveyed by Bruner and Lackner.[16] For example, if the match is required to consist of contiguous entries then the problem can be solved in polynomial time.[17] A different natural variant is obtained when the pattern is restricted to a proper permutation class . This problem is known as -Pattern PPM and it was shown to be polynomial-time solvable for separable permutations.[14] Later, Jelínek and Kynčl[18] completely resolved the complexity of -Pattern PPM by showing that it is polynomial-time solvable when is equal to one of 1, 12, 21, 132, 231, 312 or 213 and NP-complete otherwise.
Another variant is when both the pattern and text are restricted to a proper permutation class , in which case the problem is called -PPM. For example, Guillemot and Vialette[19] showed that -PPM could be solved in time. Albert, Lackner, Lackner, and Vatter[20] later lowered this to and showed that the same bound holds for the class of skew-merged permutations. They further asked if the -PPM problem can be solved in polynomial time for every fixed proper permutation class . This question was answered negatively by Jelínek and Kynčl who showed that -PPM is in fact NP-complete.[18] Later, Jelínek et al.[21] showed that -PPM is NP-complete for any of length at least 4 not symmetric to one of 3412, 3142, 4213, 4123 or 41352.
The permutation π is said to be β-optimal if no permutation of the same length as π has more copies of β. In his address to the SIAM meeting on Discrete Mathematics in 1992, Wilf defined the packing density of the permutation β of length k as
An unpublished argument of Fred Galvin shows that the quantity inside this limit is nonincreasing for n ≥ k, and so the limit exists. When β is monotone, its packing density is clearly 1, and packing densities are invariant under the group of symmetries generated by inverse and reverse, so for permutations of length three, there is only one nontrivial packing density. Walter Stromquist (unpublished) settled this case by showing that the packing density of 132 is 2√3 − 3, approximately 0.46410.
For permutations β of length four, there are (due to symmetries) seven cases to consider:
| β | packing density | reference |
|---|---|---|
| 1234 | 1 | trivial |
| 1432 | root of x3 − 12x2 + 156x − 64 ≅ 0.42357 | (Price 1997)[22] |
| 2143 | ⅜ = 0.375 | (Price 1997)[22] |
| 1243 | ⅜ = 0.375 | (Albert Atkinson)[23] |
| 1324 | conjectured to be ≅ 0.244 | |
| 1342 | conjectured to be ≅ 0.19658 | |
| 2413 | conjectured to be ≅ 0.10474 |
For the three unknown permutations, there are bounds and conjectures. (Price 1997) used an approximation algorithm which suggests that the packing density of 1324 is around 0.244.[22] Birzhan Batkeyev (unpublished) constructed a family of permutations showing that the packing density of 1342 is at least the product of the packing densities of 132 and 1432, approximately 0.19658. This is conjectured to be the precise packing density of 1342. (Presutti Stromquist) provided a lower bound on the packing density of 2413. This lower bound, which can be expressed in terms of an integral, is approximately 0.10474, and conjectured to be the true packing density.[24]
A k-superpattern is a permutation that contains all permutations of length k. For example, 25314 is a 3-superpattern because it contains all 6 permutations of length 3. It is known that k-superpatterns must have length at least k2/e2, where e ≈ 2.71828 is Euler's number,[25] and that there exist k-superpatterns of length ⌈(k2 + 1)/2⌉.[26] This upper bound is conjectured to be best possible, up to lower-order terms.[27]
There are several ways in which the notion of "pattern" has been generalized. For example, a vincular pattern is a permutation containing dashes indicating the entries that need not occur consecutively (in the normal pattern definition, no entries need to occur consecutively). For example, the permutation 314265 has two copies of the dashed pattern 2-31-4, given by the entries 3426 and 3425. For a dashed pattern β and any permutation π, we write β(π) for the number of copies of β in π. Thus the number of inversions in π is 2-1(π), while the number of descents is 21(π). Going further, the number of valleys in π is 213(π) + 312(π), while the number of peaks is 231(π) + 132(π). These patterns were introduced by (Babson Steingrímsson), who showed that almost all known Mahonian statistics could be expressed in terms of vincular permutations.[28] For example, the Major index of π is equal to 1-32(π) + 2-31(π) + 3-21(π) + 21(π).
Another generalization is that of a barred pattern, in which some of the entries are barred. For π to avoid the barred pattern β means that every set of entries of π which form a copy of the nonbarred entries of β can be extended to form a copy of all entries of β. (West 1993) introduced these types of patterns in his study of permutations which could be sorted by passing them twice through a stack.[29] (Note that West's definition of sorting twice through a stack is not the same as sorting with two stacks in series.) Another example of barred patterns occurs in the work of (Bousquet-Mélou Butler), who showed that the Schubert variety corresponding to π is locally factorial if and only if π avoids 1324 and 21354.[30]
A conference on permutation patterns has been held annually since 2003:
American Mathematical Society Special Sessions on Patterns in Permutations have been held at the following meetings:
Other permutation patterns meetings:
Other links: