Identifier
- St000988: Permutations ⟶ ℤ
Values
[1,2] => 1
[2,1] => 1
[1,2,3] => 1
[1,3,2] => 2
[2,1,3] => 1
[2,3,1] => 1
[3,1,2] => 2
[3,2,1] => 1
[1,2,3,4] => 1
[1,2,4,3] => 2
[1,3,2,4] => 2
[1,3,4,2] => 3
[1,4,2,3] => 1
[1,4,3,2] => 2
[2,1,3,4] => 1
[2,1,4,3] => 3
[2,3,1,4] => 1
[2,3,4,1] => 1
[2,4,1,3] => 3
[2,4,3,1] => 2
[3,1,2,4] => 2
[3,1,4,2] => 3
[3,2,1,4] => 1
[3,2,4,1] => 1
[3,4,1,2] => 3
[3,4,2,1] => 1
[4,1,2,3] => 2
[4,1,3,2] => 1
[4,2,1,3] => 3
[4,2,3,1] => 2
[4,3,1,2] => 2
[4,3,2,1] => 1
[1,2,3,4,5] => 1
[1,2,3,5,4] => 2
[1,2,4,3,5] => 2
[1,2,4,5,3] => 6
[1,2,5,3,4] => 2
[1,2,5,4,3] => 2
[1,3,2,4,5] => 2
[1,3,2,5,4] => 7
[1,3,4,2,5] => 3
[1,3,4,5,2] => 4
[1,3,5,2,4] => 7
[1,3,5,4,2] => 7
[1,4,2,3,5] => 1
[1,4,2,5,3] => 6
[1,4,3,2,5] => 2
[1,4,3,5,2] => 3
[1,4,5,2,3] => 6
[1,4,5,3,2] => 4
[1,5,2,3,4] => 2
[1,5,2,4,3] => 2
[1,5,3,2,4] => 7
[1,5,3,4,2] => 7
[1,5,4,2,3] => 1
[1,5,4,3,2] => 2
[2,1,3,4,5] => 1
[2,1,3,5,4] => 4
[2,1,4,3,5] => 3
[2,1,4,5,3] => 4
[2,1,5,3,4] => 4
[2,1,5,4,3] => 6
[2,3,1,4,5] => 1
[2,3,1,5,4] => 3
[2,3,4,1,5] => 1
[2,3,4,5,1] => 1
[2,3,5,1,4] => 3
[2,3,5,4,1] => 2
[2,4,1,3,5] => 3
[2,4,1,5,3] => 2
[2,4,3,1,5] => 2
[2,4,3,5,1] => 2
[2,4,5,1,3] => 4
[2,4,5,3,1] => 3
[2,5,1,3,4] => 4
[2,5,1,4,3] => 6
[2,5,3,1,4] => 1
[2,5,3,4,1] => 1
[2,5,4,1,3] => 6
[2,5,4,3,1] => 2
[3,1,2,4,5] => 2
[3,1,2,5,4] => 7
[3,1,4,2,5] => 3
[3,1,4,5,2] => 4
[3,1,5,2,4] => 1
[3,1,5,4,2] => 7
[3,2,1,4,5] => 1
[3,2,1,5,4] => 4
[3,2,4,1,5] => 1
[3,2,4,5,1] => 1
[3,2,5,1,4] => 4
[3,2,5,4,1] => 3
[3,4,1,2,5] => 3
[3,4,1,5,2] => 4
[3,4,2,1,5] => 1
[3,4,2,5,1] => 1
[3,4,5,1,2] => 4
[3,4,5,2,1] => 1
[3,5,1,2,4] => 7
[3,5,1,4,2] => 1
[3,5,2,1,4] => 4
>>> 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 orbit size of a permutation under Foata's bijection.
References
[1] Foata bijection Mp00067
Code
def foata_bijection(elt):
L = list(elt)
M = []
for e in L:
M.append(e)
k = len(M)
if k <= 1:
continue
a = M[-2]
M_prime = [0]*k
if a > e:
index_list = [-1] + [i for i in range(k - 1) if M[i] > e]
else:
index_list = [-1] + [i for i in range(k - 1) if M[i] < e]
for j in range(1, len(index_list)):
start = index_list[j-1] + 1
end = index_list[j]
M_prime[start] = M[end]
for x in range(start + 1, end + 1):
M_prime[x] = M[x-1]
M_prime[k-1] = e
M = M_prime
return Permutations()(M)
def statistic(pi):
l = 1
pi_new = pi
while True:
pi_new = foata_bijection(pi_new)
if pi_new == pi:
return l
l += 1
Created
Sep 24, 2017 at 11:48 by Martin Rubey
Updated
Sep 24, 2017 at 11:48 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!