Identifier
- St001381: Permutations ⟶ ℤ
Values
[1] => 1
[1,2] => 2
[2,1] => 0
[1,2,3] => 5
[1,3,2] => 0
[2,1,3] => 1
[2,3,1] => 0
[3,1,2] => 0
[3,2,1] => 0
[1,2,3,4] => 14
[1,2,4,3] => 0
[1,3,2,4] => 2
[1,3,4,2] => 0
[1,4,2,3] => 0
[1,4,3,2] => 0
[2,1,3,4] => 4
[2,1,4,3] => 0
[2,3,1,4] => 2
[2,3,4,1] => 0
[2,4,1,3] => 0
[2,4,3,1] => 0
[3,1,2,4] => 2
[3,1,4,2] => 0
[3,2,1,4] => 0
[3,2,4,1] => 0
[3,4,1,2] => 0
[3,4,2,1] => 0
[4,1,2,3] => 0
[4,1,3,2] => 0
[4,2,1,3] => 0
[4,2,3,1] => 0
[4,3,1,2] => 0
[4,3,2,1] => 0
[1,2,3,4,5] => 42
[1,2,3,5,4] => 0
[1,2,4,3,5] => 5
[1,2,4,5,3] => 0
[1,2,5,3,4] => 0
[1,2,5,4,3] => 0
[1,3,2,4,5] => 9
[1,3,2,5,4] => 0
[1,3,4,2,5] => 5
[1,3,4,5,2] => 0
[1,3,5,2,4] => 0
[1,3,5,4,2] => 0
[1,4,2,3,5] => 4
[1,4,2,5,3] => 0
[1,4,3,2,5] => 0
[1,4,3,5,2] => 0
[1,4,5,2,3] => 0
[1,4,5,3,2] => 0
[1,5,2,3,4] => 0
[1,5,2,4,3] => 0
[1,5,3,2,4] => 0
[1,5,3,4,2] => 0
[1,5,4,2,3] => 0
[1,5,4,3,2] => 0
[2,1,3,4,5] => 14
[2,1,3,5,4] => 0
[2,1,4,3,5] => 1
[2,1,4,5,3] => 0
[2,1,5,3,4] => 0
[2,1,5,4,3] => 0
[2,3,1,4,5] => 9
[2,3,1,5,4] => 0
[2,3,4,1,5] => 5
[2,3,4,5,1] => 0
[2,3,5,1,4] => 0
[2,3,5,4,1] => 0
[2,4,1,3,5] => 4
[2,4,1,5,3] => 0
[2,4,3,1,5] => 0
[2,4,3,5,1] => 0
[2,4,5,1,3] => 0
[2,4,5,3,1] => 0
[2,5,1,3,4] => 0
[2,5,1,4,3] => 0
[2,5,3,1,4] => 0
[2,5,3,4,1] => 0
[2,5,4,1,3] => 0
[2,5,4,3,1] => 0
[3,1,2,4,5] => 9
[3,1,2,5,4] => 0
[3,1,4,2,5] => 1
[3,1,4,5,2] => 0
[3,1,5,2,4] => 0
[3,1,5,4,2] => 0
[3,2,1,4,5] => 1
[3,2,1,5,4] => 0
[3,2,4,1,5] => 1
[3,2,4,5,1] => 0
[3,2,5,1,4] => 0
[3,2,5,4,1] => 0
[3,4,1,2,5] => 4
[3,4,1,5,2] => 0
[3,4,2,1,5] => 0
[3,4,2,5,1] => 0
[3,4,5,1,2] => 0
[3,4,5,2,1] => 0
[3,5,1,2,4] => 0
[3,5,1,4,2] => 0
>>> Load all 1200 entries. <<<
search for individual values
searching the database for the individual values of this statistic
/
search for generating function
searching the database for statistics with the same generating function
Description
The fertility of a permutation.
This is the size of the preimage of a permutation $\pi$ under the stack-sorting map $s$ defined by Julian West.
For a partial permutation $\pi = \pi_1 \cdots \pi_n$ define $s(\pi)$ recursively as follows:
This is the size of the preimage of a permutation $\pi$ under the stack-sorting map $s$ defined by Julian West.
For a partial permutation $\pi = \pi_1 \cdots \pi_n$ define $s(\pi)$ recursively as follows:
- If the $n\leq 1$ set $s(\pi) = \pi$.
- Otherwise, let $m$ be the largest entry in $\pi$, write $\pi=LmR$ and define $s(\pi) = s(L)s(R)m$.
References
[1] West, J. Permutations with forbidden subsequences and stack-sortable permutations MathSciNet:2716312
[2] Defant, C. Fertility Numbers arXiv:1809.04421
[2] Defant, C. Fertility Numbers arXiv:1809.04421
Code
def stacksort(perm):
perm = list(perm)
if len(perm) <= 1:
return perm
n = max(perm)
i_n = perm.index(n)
L = perm[:i_n]
R = perm[i_n+1:]
return stacksort(L) + stacksort(R) + [n]
@cached_function
def fertility_Sn(n):
stack_sorted = dict()
S_n = Permutations(n)
for perm in S_n:
stack_sorted[perm] = list()
for perm in S_n:
stack_sorted[Permutation(stacksort(perm))].append(perm)
fertility = dict()
for perm in S_n:
fertility[perm]=len(stack_sorted[perm])
return fertility
def statistic(x):
return fertility_Sn(len(x))[x]
Created
Apr 15, 2019 at 14:08 by Tilman Möller
Updated
Jan 17, 2020 at 00:29 by Martin Rubey
searching the database
Sorry, this statistic was not found in the database
or
add this statistic to the database – it's very simple and we need your support!