Identifier
- St001332: Permutations ⟶ ℤ
Values
[1] => 0
[1,2] => 1
[2,1] => 0
[1,2,3] => 2
[1,3,2] => 2
[2,1,3] => 0
[2,3,1] => 2
[3,1,2] => 0
[3,2,1] => 0
[1,2,3,4] => 3
[1,2,4,3] => 3
[1,3,2,4] => 3
[1,3,4,2] => 3
[1,4,2,3] => 3
[1,4,3,2] => 2
[2,1,3,4] => 1
[2,1,4,3] => 0
[2,3,1,4] => 3
[2,3,4,1] => 3
[2,4,1,3] => 3
[2,4,3,1] => 2
[3,1,2,4] => 1
[3,1,4,2] => 0
[3,2,1,4] => 0
[3,2,4,1] => 0
[3,4,1,2] => 3
[3,4,2,1] => 2
[4,1,2,3] => 1
[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] => 4
[1,2,3,5,4] => 4
[1,2,4,3,5] => 4
[1,2,4,5,3] => 4
[1,2,5,3,4] => 4
[1,2,5,4,3] => 4
[1,3,2,4,5] => 4
[1,3,2,5,4] => 4
[1,3,4,2,5] => 4
[1,3,4,5,2] => 4
[1,3,5,2,4] => 4
[1,3,5,4,2] => 4
[1,4,2,3,5] => 4
[1,4,2,5,3] => 4
[1,4,3,2,5] => 2
[1,4,3,5,2] => 4
[1,4,5,2,3] => 4
[1,4,5,3,2] => 4
[1,5,2,3,4] => 4
[1,5,2,4,3] => 4
[1,5,3,2,4] => 2
[1,5,3,4,2] => 4
[1,5,4,2,3] => 2
[1,5,4,3,2] => 2
[2,1,3,4,5] => 2
[2,1,3,5,4] => 2
[2,1,4,3,5] => 0
[2,1,4,5,3] => 2
[2,1,5,3,4] => 0
[2,1,5,4,3] => 0
[2,3,1,4,5] => 4
[2,3,1,5,4] => 4
[2,3,4,1,5] => 4
[2,3,4,5,1] => 4
[2,3,5,1,4] => 4
[2,3,5,4,1] => 4
[2,4,1,3,5] => 4
[2,4,1,5,3] => 4
[2,4,3,1,5] => 2
[2,4,3,5,1] => 4
[2,4,5,1,3] => 4
[2,4,5,3,1] => 4
[2,5,1,3,4] => 4
[2,5,1,4,3] => 4
[2,5,3,1,4] => 2
[2,5,3,4,1] => 4
[2,5,4,1,3] => 2
[2,5,4,3,1] => 2
[3,1,2,4,5] => 2
[3,1,2,5,4] => 2
[3,1,4,2,5] => 0
[3,1,4,5,2] => 2
[3,1,5,2,4] => 0
[3,1,5,4,2] => 0
[3,2,1,4,5] => 0
[3,2,1,5,4] => 0
[3,2,4,1,5] => 0
[3,2,4,5,1] => 2
[3,2,5,1,4] => 0
[3,2,5,4,1] => 0
[3,4,1,2,5] => 4
[3,4,1,5,2] => 4
[3,4,2,1,5] => 2
[3,4,2,5,1] => 4
[3,4,5,1,2] => 4
[3,4,5,2,1] => 4
[3,5,1,2,4] => 4
[3,5,1,4,2] => 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 number of steps on the non-negative side of the walk associated with the permutation.
Consider the walk taking an up step for each ascent, and a down step for each descent of the permutation. Then this statistic is the number of steps that begin and end at non-negative height.
Consider the walk taking an up step for each ascent, and a down step for each descent of the permutation. Then this statistic is the number of steps that begin and end at non-negative height.
References
[1] Bernardi, O., Duplantier, B., Nadeau, P. A Bijection between well-labelled positive paths and matchings arXiv:0903.5379
Code
def signature(pi):
return [1 if pi[i] < pi[i+1] else -1 for i in range(len(pi)-1)]
def walk(pi):
x = signature(pi)
return [sum(x[:k]) for k in range(len(pi))]
def statistic(pi):
w = walk(pi)
return sum(1 for i in range(len(pi)-1) if w[i] >= 0 and w[i+1] >= 0)
Created
Dec 21, 2018 at 18:50 by Martin Rubey
Updated
Dec 17, 2021 at 19:21 by Nadia Lafreniere
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!