Identifier
- St001517: Permutations ⟶ ℤ
Values
[1] => 0
[1,2] => 1
[2,1] => 1
[1,2,3] => 1
[1,3,2] => 1
[2,1,3] => 1
[2,3,1] => 1
[3,1,2] => 1
[3,2,1] => 1
[1,2,3,4] => 2
[1,2,4,3] => 2
[1,3,2,4] => 2
[1,3,4,2] => 2
[1,4,2,3] => 2
[1,4,3,2] => 1
[2,1,3,4] => 2
[2,1,4,3] => 2
[2,3,1,4] => 2
[2,3,4,1] => 1
[2,4,1,3] => 2
[2,4,3,1] => 2
[3,1,2,4] => 2
[3,1,4,2] => 2
[3,2,1,4] => 1
[3,2,4,1] => 2
[3,4,1,2] => 2
[3,4,2,1] => 2
[4,1,2,3] => 1
[4,1,3,2] => 2
[4,2,1,3] => 2
[4,2,3,1] => 2
[4,3,1,2] => 2
[4,3,2,1] => 2
[1,2,3,4,5] => 2
[1,2,3,5,4] => 2
[1,2,4,3,5] => 2
[1,2,4,5,3] => 2
[1,2,5,3,4] => 2
[1,2,5,4,3] => 2
[1,3,2,4,5] => 2
[1,3,2,5,4] => 2
[1,3,4,2,5] => 2
[1,3,4,5,2] => 2
[1,3,5,2,4] => 2
[1,3,5,4,2] => 2
[1,4,2,3,5] => 2
[1,4,2,5,3] => 2
[1,4,3,2,5] => 2
[1,4,3,5,2] => 2
[1,4,5,2,3] => 2
[1,4,5,3,2] => 2
[1,5,2,3,4] => 2
[1,5,2,4,3] => 2
[1,5,3,2,4] => 2
[1,5,3,4,2] => 2
[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] => 2
[2,1,4,5,3] => 2
[2,1,5,3,4] => 2
[2,1,5,4,3] => 2
[2,3,1,4,5] => 2
[2,3,1,5,4] => 2
[2,3,4,1,5] => 2
[2,3,4,5,1] => 2
[2,3,5,1,4] => 2
[2,3,5,4,1] => 2
[2,4,1,3,5] => 2
[2,4,1,5,3] => 2
[2,4,3,1,5] => 2
[2,4,3,5,1] => 2
[2,4,5,1,3] => 2
[2,4,5,3,1] => 2
[2,5,1,3,4] => 2
[2,5,1,4,3] => 2
[2,5,3,1,4] => 2
[2,5,3,4,1] => 2
[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] => 2
[3,1,4,5,2] => 2
[3,1,5,2,4] => 2
[3,1,5,4,2] => 2
[3,2,1,4,5] => 2
[3,2,1,5,4] => 2
[3,2,4,1,5] => 2
[3,2,4,5,1] => 2
[3,2,5,1,4] => 2
[3,2,5,4,1] => 2
[3,4,1,2,5] => 2
[3,4,1,5,2] => 2
[3,4,2,1,5] => 2
[3,4,2,5,1] => 2
[3,4,5,1,2] => 2
[3,4,5,2,1] => 2
[3,5,1,2,4] => 2
[3,5,1,4,2] => 2
>>> Load all 873 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 length of a longest pair of twins in a permutation.
A pair of twins in a permutation is a pair of two disjoint subsequences which are order isomorphic.
A pair of twins in a permutation is a pair of two disjoint subsequences which are order isomorphic.
References
[1] Dudek, A., Grytczuk, Jarosław, Ruciński, A. Variations on twins in permutations arXiv:2001.05589
Code
from sage.combinat.permutation import to_standard
def statistic(pi):
n = len(pi)
S = set(range(n))
for k in range(n//2, 0, -1):
for s1 in Subsets(S, k):
for s2 in Subsets(S.difference(s1), k):
pi1 = [pi[i] for i in s1]
pi2 = [pi[i] for i in s2]
if to_standard(pi1) == to_standard(pi2):
return k
return 0
Created
Jan 17, 2020 at 09:24 by Martin Rubey
Updated
Jan 17, 2020 at 09:24 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!