Identifier
- St001926: Signed permutations ⟶ ℤ
Values
=>
[1,2]=>2
[1,-2]=>1
[-1,2]=>2
[-1,-2]=>0
[2,1]=>2
[2,-1]=>0
[-2,1]=>1
[-2,-1]=>0
[1,2,3]=>3
[1,2,-3]=>2
[1,-2,3]=>3
[1,-2,-3]=>1
[-1,2,3]=>3
[-1,2,-3]=>2
[-1,-2,3]=>0
[-1,-2,-3]=>0
[1,3,2]=>3
[1,3,-2]=>1
[1,-3,2]=>2
[1,-3,-2]=>1
[-1,3,2]=>3
[-1,3,-2]=>0
[-1,-3,2]=>2
[-1,-3,-2]=>0
[2,1,3]=>3
[2,1,-3]=>2
[2,-1,3]=>3
[2,-1,-3]=>0
[-2,1,3]=>3
[-2,1,-3]=>1
[-2,-1,3]=>0
[-2,-1,-3]=>0
[2,3,1]=>3
[2,3,-1]=>1
[2,-3,1]=>3
[2,-3,-1]=>0
[-2,3,1]=>2
[-2,3,-1]=>1
[-2,-3,1]=>2
[-2,-3,-1]=>0
[3,1,2]=>3
[3,1,-2]=>0
[3,-1,2]=>2
[3,-1,-2]=>0
[-3,1,2]=>3
[-3,1,-2]=>0
[-3,-1,2]=>1
[-3,-1,-2]=>0
[3,2,1]=>3
[3,2,-1]=>0
[3,-2,1]=>1
[3,-2,-1]=>0
[-3,2,1]=>2
[-3,2,-1]=>0
[-3,-2,1]=>1
[-3,-2,-1]=>0
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
Sparre Anderson's `Position of Maximum' statistic.
For $\pi$ a signed permutation of length $n$, first create the tuple $x = (x_1, \dots, x_n)$, where $x_i = c_{|\pi_1|} \pi_{|\pi_1|} + \cdots + c_{|\pi_i|} \pi_{|\pi_i|}$ and $(c_1, \dots ,c_n) = (1, 2, \dots, 2^{n-1})$. The actual value of the c-tuple for Sparre Anderson's statistic does not matter so long as no sums or differences of any subset of the $c_i$'s is zero. The choice of powers of $2$ is just a convenient choice.
This returns the position of the maximum value in the $x$-tuple. This is related to the discrete arcsin distribution. The number of signed permutations with value equal to $k$ is given by $\binom{2k}{k} \binom{2n-2k}{n-k}$. This statistic is equidistributed with Sparre Anderson's `Number of Positives' statistic.
For $\pi$ a signed permutation of length $n$, first create the tuple $x = (x_1, \dots, x_n)$, where $x_i = c_{|\pi_1|} \pi_{|\pi_1|} + \cdots + c_{|\pi_i|} \pi_{|\pi_i|}$ and $(c_1, \dots ,c_n) = (1, 2, \dots, 2^{n-1})$. The actual value of the c-tuple for Sparre Anderson's statistic does not matter so long as no sums or differences of any subset of the $c_i$'s is zero. The choice of powers of $2$ is just a convenient choice.
This returns the position of the maximum value in the $x$-tuple. This is related to the discrete arcsin distribution. The number of signed permutations with value equal to $k$ is given by $\binom{2k}{k} \binom{2n-2k}{n-k}$. This statistic is equidistributed with Sparre Anderson's `Number of Positives' statistic.
References
[1] Jacobs, K. Discrete Stochastics DOI:10.1007/978-3-0348-8645-1
[2] oeis:A059366
WARNING - could not verify link <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992)>
error fetching oeis.org/search?q=A059366&n=1&fmt=text [3] WARNING - could not verify link <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992)>
[4] error fetching https://oeis.org/search?q=A059366&n=1&fmt=text
[2] oeis:A059366
WARNING - could not verify link <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992)>
error fetching oeis.org/search?q=A059366&n=1&fmt=text [3] WARNING - could not verify link <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992)>
[4] error fetching https://oeis.org/search?q=A059366&n=1&fmt=text
Code
def CumulativeSums(pi): r""" For pi a signed permutation of length n, returns the tuple (x_1, ..., x_n), where x_i = c_{|pi_1|} pi_{|pi_1|} + ... + c_{|pi_i|} pi_{|pi_i|} and (c_1, ... ,c_n) = (1, 2, ..., 2^{n-1}). The actual value of the c-tuple for these statistics does not matter so long as no sums or differences of any subset of the c_i's is zero. """ n = len(pi) c = [2**i for i in range(n)] return [sum(c[abs(pi[i]) - 1]*sgn(pi[abs(pi[i]) - 1]) for i in range(j)) for j in range(n+1)] def statistic(pi): r""" For pi a signed permutation of length n, returns the of values equal to the maximum in CumulativeSums(pi) """ cumul = CumulativeSums(pi) return max([i for i in range(len(pi)+1) if cumul[i] == max(cumul)])
Created
Sep 11, 2023 at 07:41 by Arvind Ayyer
Updated
Sep 12, 2023 at 11:05 by Arvind Ayyer
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!