Identifier
Identifier
Values
[1,0] generating graphics... => 0
[1,0,1,0] generating graphics... => 1
[1,1,0,0] generating graphics... => 0
[1,0,1,0,1,0] generating graphics... => 2
[1,0,1,1,0,0] generating graphics... => 1
[1,1,0,0,1,0] generating graphics... => 1
[1,1,0,1,0,0] generating graphics... => 1
[1,1,1,0,0,0] generating graphics... => 0
[1,0,1,0,1,0,1,0] generating graphics... => 3
[1,0,1,0,1,1,0,0] generating graphics... => 2
[1,0,1,1,0,0,1,0] generating graphics... => 2
[1,0,1,1,0,1,0,0] generating graphics... => 2
[1,0,1,1,1,0,0,0] generating graphics... => 1
[1,1,0,0,1,0,1,0] generating graphics... => 2
[1,1,0,0,1,1,0,0] generating graphics... => 2
[1,1,0,1,0,0,1,0] generating graphics... => 2
[1,1,0,1,0,1,0,0] generating graphics... => 2
[1,1,0,1,1,0,0,0] generating graphics... => 1
[1,1,1,0,0,0,1,0] generating graphics... => 1
[1,1,1,0,0,1,0,0] generating graphics... => 1
[1,1,1,0,1,0,0,0] generating graphics... => 1
[1,1,1,1,0,0,0,0] generating graphics... => 0
[1,0,1,0,1,0,1,0,1,0] generating graphics... => 4
[1,0,1,0,1,0,1,1,0,0] generating graphics... => 3
[1,0,1,0,1,1,0,0,1,0] generating graphics... => 3
[1,0,1,0,1,1,0,1,0,0] generating graphics... => 3
[1,0,1,0,1,1,1,0,0,0] generating graphics... => 2
[1,0,1,1,0,0,1,0,1,0] generating graphics... => 3
[1,0,1,1,0,0,1,1,0,0] generating graphics... => 3
[1,0,1,1,0,1,0,0,1,0] generating graphics... => 3
[1,0,1,1,0,1,0,1,0,0] generating graphics... => 3
[1,0,1,1,0,1,1,0,0,0] generating graphics... => 2
[1,0,1,1,1,0,0,0,1,0] generating graphics... => 2
[1,0,1,1,1,0,0,1,0,0] generating graphics... => 2
[1,0,1,1,1,0,1,0,0,0] generating graphics... => 2
[1,0,1,1,1,1,0,0,0,0] generating graphics... => 1
[1,1,0,0,1,0,1,0,1,0] generating graphics... => 3
[1,1,0,0,1,0,1,1,0,0] generating graphics... => 2
[1,1,0,0,1,1,0,0,1,0] generating graphics... => 3
[1,1,0,0,1,1,0,1,0,0] generating graphics... => 3
[1,1,0,0,1,1,1,0,0,0] generating graphics... => 2
[1,1,0,1,0,0,1,0,1,0] generating graphics... => 3
[1,1,0,1,0,0,1,1,0,0] generating graphics... => 3
[1,1,0,1,0,1,0,0,1,0] generating graphics... => 3
[1,1,0,1,0,1,0,1,0,0] generating graphics... => 3
[1,1,0,1,0,1,1,0,0,0] generating graphics... => 2
[1,1,0,1,1,0,0,0,1,0] generating graphics... => 2
[1,1,0,1,1,0,0,1,0,0] generating graphics... => 2
[1,1,0,1,1,0,1,0,0,0] generating graphics... => 2
[1,1,0,1,1,1,0,0,0,0] generating graphics... => 1
[1,1,1,0,0,0,1,0,1,0] generating graphics... => 2
[1,1,1,0,0,0,1,1,0,0] generating graphics... => 2
[1,1,1,0,0,1,0,0,1,0] generating graphics... => 2
[1,1,1,0,0,1,0,1,0,0] generating graphics... => 2
[1,1,1,0,0,1,1,0,0,0] generating graphics... => 2
[1,1,1,0,1,0,0,0,1,0] generating graphics... => 2
[1,1,1,0,1,0,0,1,0,0] generating graphics... => 2
[1,1,1,0,1,0,1,0,0,0] generating graphics... => 2
[1,1,1,0,1,1,0,0,0,0] generating graphics... => 1
[1,1,1,1,0,0,0,0,1,0] generating graphics... => 1
[1,1,1,1,0,0,0,1,0,0] generating graphics... => 1
[1,1,1,1,0,0,1,0,0,0] generating graphics... => 1
[1,1,1,1,0,1,0,0,0,0] generating graphics... => 1
[1,1,1,1,1,0,0,0,0,0] generating graphics... => 0
[1,0,1,0,1,0,1,0,1,0,1,0] generating graphics... => 5
[1,0,1,0,1,0,1,0,1,1,0,0] generating graphics... => 4
[1,0,1,0,1,0,1,1,0,0,1,0] generating graphics... => 4
[1,0,1,0,1,0,1,1,0,1,0,0] generating graphics... => 4
[1,0,1,0,1,0,1,1,1,0,0,0] generating graphics... => 3
[1,0,1,0,1,1,0,0,1,0,1,0] generating graphics... => 4
[1,0,1,0,1,1,0,0,1,1,0,0] generating graphics... => 4
[1,0,1,0,1,1,0,1,0,0,1,0] generating graphics... => 4
[1,0,1,0,1,1,0,1,0,1,0,0] generating graphics... => 4
[1,0,1,0,1,1,0,1,1,0,0,0] generating graphics... => 3
[1,0,1,0,1,1,1,0,0,0,1,0] generating graphics... => 3
[1,0,1,0,1,1,1,0,0,1,0,0] generating graphics... => 3
[1,0,1,0,1,1,1,0,1,0,0,0] generating graphics... => 3
[1,0,1,0,1,1,1,1,0,0,0,0] generating graphics... => 2
[1,0,1,1,0,0,1,0,1,0,1,0] generating graphics... => 4
[1,0,1,1,0,0,1,0,1,1,0,0] generating graphics... => 3
[1,0,1,1,0,0,1,1,0,0,1,0] generating graphics... => 4
[1,0,1,1,0,0,1,1,0,1,0,0] generating graphics... => 4
[1,0,1,1,0,0,1,1,1,0,0,0] generating graphics... => 3
[1,0,1,1,0,1,0,0,1,0,1,0] generating graphics... => 4
[1,0,1,1,0,1,0,0,1,1,0,0] generating graphics... => 4
[1,0,1,1,0,1,0,1,0,0,1,0] generating graphics... => 4
[1,0,1,1,0,1,0,1,0,1,0,0] generating graphics... => 4
[1,0,1,1,0,1,0,1,1,0,0,0] generating graphics... => 3
[1,0,1,1,0,1,1,0,0,0,1,0] generating graphics... => 3
[1,0,1,1,0,1,1,0,0,1,0,0] generating graphics... => 3
[1,0,1,1,0,1,1,0,1,0,0,0] generating graphics... => 3
[1,0,1,1,0,1,1,1,0,0,0,0] generating graphics... => 2
[1,0,1,1,1,0,0,0,1,0,1,0] generating graphics... => 3
[1,0,1,1,1,0,0,0,1,1,0,0] generating graphics... => 3
[1,0,1,1,1,0,0,1,0,0,1,0] generating graphics... => 3
[1,0,1,1,1,0,0,1,0,1,0,0] generating graphics... => 3
[1,0,1,1,1,0,0,1,1,0,0,0] generating graphics... => 3
[1,0,1,1,1,0,1,0,0,0,1,0] generating graphics... => 3
[1,0,1,1,1,0,1,0,0,1,0,0] generating graphics... => 3
[1,0,1,1,1,0,1,0,1,0,0,0] generating graphics... => 3
[1,0,1,1,1,0,1,1,0,0,0,0] generating graphics... => 2
[1,0,1,1,1,1,0,0,0,0,1,0] generating graphics... => 2
[1,0,1,1,1,1,0,0,0,1,0,0] generating graphics... => 2
[1,0,1,1,1,1,0,0,1,0,0,0] generating graphics... => 2
[1,0,1,1,1,1,0,1,0,0,0,0] generating graphics... => 2
[1,0,1,1,1,1,1,0,0,0,0,0] generating graphics... => 1
[1,1,0,0,1,0,1,0,1,0,1,0] generating graphics... => 4
[1,1,0,0,1,0,1,0,1,1,0,0] generating graphics... => 3
[1,1,0,0,1,0,1,1,0,0,1,0] generating graphics... => 3
[1,1,0,0,1,0,1,1,0,1,0,0] generating graphics... => 3
[1,1,0,0,1,0,1,1,1,0,0,0] generating graphics... => 2
[1,1,0,0,1,1,0,0,1,0,1,0] generating graphics... => 4
[1,1,0,0,1,1,0,0,1,1,0,0] generating graphics... => 4
[1,1,0,0,1,1,0,1,0,0,1,0] generating graphics... => 4
[1,1,0,0,1,1,0,1,0,1,0,0] generating graphics... => 4
[1,1,0,0,1,1,0,1,1,0,0,0] generating graphics... => 3
[1,1,0,0,1,1,1,0,0,0,1,0] generating graphics... => 3
[1,1,0,0,1,1,1,0,0,1,0,0] generating graphics... => 3
[1,1,0,0,1,1,1,0,1,0,0,0] generating graphics... => 3
[1,1,0,0,1,1,1,1,0,0,0,0] generating graphics... => 2
[1,1,0,1,0,0,1,0,1,0,1,0] generating graphics... => 4
[1,1,0,1,0,0,1,0,1,1,0,0] generating graphics... => 3
[1,1,0,1,0,0,1,1,0,0,1,0] generating graphics... => 4
[1,1,0,1,0,0,1,1,0,1,0,0] generating graphics... => 4
[1,1,0,1,0,0,1,1,1,0,0,0] generating graphics... => 3
[1,1,0,1,0,1,0,0,1,0,1,0] generating graphics... => 4
[1,1,0,1,0,1,0,0,1,1,0,0] generating graphics... => 4
[1,1,0,1,0,1,0,1,0,0,1,0] generating graphics... => 4
[1,1,0,1,0,1,0,1,0,1,0,0] generating graphics... => 4
[1,1,0,1,0,1,0,1,1,0,0,0] generating graphics... => 3
[1,1,0,1,0,1,1,0,0,0,1,0] generating graphics... => 3
[1,1,0,1,0,1,1,0,0,1,0,0] generating graphics... => 3
[1,1,0,1,0,1,1,0,1,0,0,0] generating graphics... => 3
[1,1,0,1,0,1,1,1,0,0,0,0] generating graphics... => 2
[1,1,0,1,1,0,0,0,1,0,1,0] generating graphics... => 3
[1,1,0,1,1,0,0,0,1,1,0,0] generating graphics... => 3
[1,1,0,1,1,0,0,1,0,0,1,0] generating graphics... => 3
[1,1,0,1,1,0,0,1,0,1,0,0] generating graphics... => 3
[1,1,0,1,1,0,0,1,1,0,0,0] generating graphics... => 3
[1,1,0,1,1,0,1,0,0,0,1,0] generating graphics... => 3
[1,1,0,1,1,0,1,0,0,1,0,0] generating graphics... => 3
[1,1,0,1,1,0,1,0,1,0,0,0] generating graphics... => 3
[1,1,0,1,1,0,1,1,0,0,0,0] generating graphics... => 2
[1,1,0,1,1,1,0,0,0,0,1,0] generating graphics... => 2
[1,1,0,1,1,1,0,0,0,1,0,0] generating graphics... => 2
[1,1,0,1,1,1,0,0,1,0,0,0] generating graphics... => 2
[1,1,0,1,1,1,0,1,0,0,0,0] generating graphics... => 2
[1,1,0,1,1,1,1,0,0,0,0,0] generating graphics... => 1
[1,1,1,0,0,0,1,0,1,0,1,0] generating graphics... => 3
[1,1,1,0,0,0,1,0,1,1,0,0] generating graphics... => 2
[1,1,1,0,0,0,1,1,0,0,1,0] generating graphics... => 3
[1,1,1,0,0,0,1,1,0,1,0,0] generating graphics... => 3
[1,1,1,0,0,0,1,1,1,0,0,0] generating graphics... => 3
[1,1,1,0,0,1,0,0,1,0,1,0] generating graphics... => 3
[1,1,1,0,0,1,0,0,1,1,0,0] generating graphics... => 3
[1,1,1,0,0,1,0,1,0,0,1,0] generating graphics... => 3
[1,1,1,0,0,1,0,1,0,1,0,0] generating graphics... => 3
[1,1,1,0,0,1,0,1,1,0,0,0] generating graphics... => 2
[1,1,1,0,0,1,1,0,0,0,1,0] generating graphics... => 3
[1,1,1,0,0,1,1,0,0,1,0,0] generating graphics... => 3
[1,1,1,0,0,1,1,0,1,0,0,0] generating graphics... => 3
[1,1,1,0,0,1,1,1,0,0,0,0] generating graphics... => 2
[1,1,1,0,1,0,0,0,1,0,1,0] generating graphics... => 3
[1,1,1,0,1,0,0,0,1,1,0,0] generating graphics... => 3
[1,1,1,0,1,0,0,1,0,0,1,0] generating graphics... => 3
[1,1,1,0,1,0,0,1,0,1,0,0] generating graphics... => 3
[1,1,1,0,1,0,0,1,1,0,0,0] generating graphics... => 3
[1,1,1,0,1,0,1,0,0,0,1,0] generating graphics... => 3
[1,1,1,0,1,0,1,0,0,1,0,0] generating graphics... => 3
[1,1,1,0,1,0,1,0,1,0,0,0] generating graphics... => 3
[1,1,1,0,1,0,1,1,0,0,0,0] generating graphics... => 2
[1,1,1,0,1,1,0,0,0,0,1,0] generating graphics... => 2
[1,1,1,0,1,1,0,0,0,1,0,0] generating graphics... => 2
[1,1,1,0,1,1,0,0,1,0,0,0] generating graphics... => 2
[1,1,1,0,1,1,0,1,0,0,0,0] generating graphics... => 2
[1,1,1,0,1,1,1,0,0,0,0,0] generating graphics... => 1
[1,1,1,1,0,0,0,0,1,0,1,0] generating graphics... => 2
[1,1,1,1,0,0,0,0,1,1,0,0] generating graphics... => 2
[1,1,1,1,0,0,0,1,0,0,1,0] generating graphics... => 2
[1,1,1,1,0,0,0,1,0,1,0,0] generating graphics... => 2
[1,1,1,1,0,0,0,1,1,0,0,0] generating graphics... => 2
[1,1,1,1,0,0,1,0,0,0,1,0] generating graphics... => 2
[1,1,1,1,0,0,1,0,0,1,0,0] generating graphics... => 2
[1,1,1,1,0,0,1,0,1,0,0,0] generating graphics... => 2
[1,1,1,1,0,0,1,1,0,0,0,0] generating graphics... => 2
[1,1,1,1,0,1,0,0,0,0,1,0] generating graphics... => 2
[1,1,1,1,0,1,0,0,0,1,0,0] generating graphics... => 2
[1,1,1,1,0,1,0,0,1,0,0,0] generating graphics... => 2
[1,1,1,1,0,1,0,1,0,0,0,0] generating graphics... => 2
[1,1,1,1,0,1,1,0,0,0,0,0] generating graphics... => 1
[1,1,1,1,1,0,0,0,0,0,1,0] generating graphics... => 1
[1,1,1,1,1,0,0,0,0,1,0,0] generating graphics... => 1
[1,1,1,1,1,0,0,0,1,0,0,0] generating graphics... => 1
[1,1,1,1,1,0,0,1,0,0,0,0] generating graphics... => 1
[1,1,1,1,1,0,1,0,0,0,0,0] generating graphics... => 1
[1,1,1,1,1,1,0,0,0,0,0,0] generating graphics... => 0
click to show generating function       
Description
The number of upper interactions of a Dyck path.
An upper interaction in a Dyck path is defined as the occurrence of a factor $A^{k}$$B^{k}$ for any ${k ≥ 1}$, where ${A}$ is a down-step and ${B}$ is a up-step.
Code
def statistic(List):
    interactions = 0
    i = 0
    count = 0
    while i < len(List):
        if List[i] == 0:
            if List[i-1] == 1:
                count = 0
            count = count + 1
        if List[i] == 1 and count > 0:
            interactions = interactions + 1
            count = count - 1
        i  = i + 1
    return interactions
Created
Dec 17, 2015 at 23:15 by Mike Gaudette
Updated
May 20, 2016 at 20:54 by Martin Rubey