*****************************************************************************
*       www.FindStat.org - The Combinatorial Statistic Finder               *
*                                                                           *
*       Copyright (C) 2019 The FindStatCrew <info@findstat.org>             *
*                                                                           *
*    This information is distributed in the hope that it will be useful,    *
*    but WITHOUT ANY WARRANTY; without even the implied warranty of         *
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                   *
*****************************************************************************

-----------------------------------------------------------------------------
Statistic identifier: St000329

-----------------------------------------------------------------------------
Collection: Dyck paths

-----------------------------------------------------------------------------
Description: The number of evenly positioned ascents of the Dyck path, with the initial position equal to 1.

-----------------------------------------------------------------------------
References: [1]   Sulanke, R. A. Catalan path statistics having the Narayana distribution [[MathSciNet:1603692]]

-----------------------------------------------------------------------------
Code:
def statistic(x):
    stat = 0
    currht = 0
    position = 0
    for c in x:
        position = position + 1
        if c == 1:
            currht = currht + 1
            if position % 2 == 0:
                stat = stat + 1
        else:
            currht = currht -  1
    return stat

-----------------------------------------------------------------------------
Statistic values:

[1,0]                     => 0
[1,0,1,0]                 => 0
[1,1,0,0]                 => 1
[1,0,1,0,1,0]             => 0
[1,0,1,1,0,0]             => 1
[1,1,0,0,1,0]             => 1
[1,1,0,1,0,0]             => 2
[1,1,1,0,0,0]             => 1
[1,0,1,0,1,0,1,0]         => 0
[1,0,1,0,1,1,0,0]         => 1
[1,0,1,1,0,0,1,0]         => 1
[1,0,1,1,0,1,0,0]         => 2
[1,0,1,1,1,0,0,0]         => 1
[1,1,0,0,1,0,1,0]         => 1
[1,1,0,0,1,1,0,0]         => 2
[1,1,0,1,0,0,1,0]         => 2
[1,1,0,1,0,1,0,0]         => 3
[1,1,0,1,1,0,0,0]         => 2
[1,1,1,0,0,0,1,0]         => 1
[1,1,1,0,0,1,0,0]         => 2
[1,1,1,0,1,0,0,0]         => 1
[1,1,1,1,0,0,0,0]         => 2
[1,0,1,0,1,0,1,0,1,0]     => 0
[1,0,1,0,1,0,1,1,0,0]     => 1
[1,0,1,0,1,1,0,0,1,0]     => 1
[1,0,1,0,1,1,0,1,0,0]     => 2
[1,0,1,0,1,1,1,0,0,0]     => 1
[1,0,1,1,0,0,1,0,1,0]     => 1
[1,0,1,1,0,0,1,1,0,0]     => 2
[1,0,1,1,0,1,0,0,1,0]     => 2
[1,0,1,1,0,1,0,1,0,0]     => 3
[1,0,1,1,0,1,1,0,0,0]     => 2
[1,0,1,1,1,0,0,0,1,0]     => 1
[1,0,1,1,1,0,0,1,0,0]     => 2
[1,0,1,1,1,0,1,0,0,0]     => 1
[1,0,1,1,1,1,0,0,0,0]     => 2
[1,1,0,0,1,0,1,0,1,0]     => 1
[1,1,0,0,1,0,1,1,0,0]     => 2
[1,1,0,0,1,1,0,0,1,0]     => 2
[1,1,0,0,1,1,0,1,0,0]     => 3
[1,1,0,0,1,1,1,0,0,0]     => 2
[1,1,0,1,0,0,1,0,1,0]     => 2
[1,1,0,1,0,0,1,1,0,0]     => 3
[1,1,0,1,0,1,0,0,1,0]     => 3
[1,1,0,1,0,1,0,1,0,0]     => 4
[1,1,0,1,0,1,1,0,0,0]     => 3
[1,1,0,1,1,0,0,0,1,0]     => 2
[1,1,0,1,1,0,0,1,0,0]     => 3
[1,1,0,1,1,0,1,0,0,0]     => 2
[1,1,0,1,1,1,0,0,0,0]     => 3
[1,1,1,0,0,0,1,0,1,0]     => 1
[1,1,1,0,0,0,1,1,0,0]     => 2
[1,1,1,0,0,1,0,0,1,0]     => 2
[1,1,1,0,0,1,0,1,0,0]     => 3
[1,1,1,0,0,1,1,0,0,0]     => 2
[1,1,1,0,1,0,0,0,1,0]     => 1
[1,1,1,0,1,0,0,1,0,0]     => 2
[1,1,1,0,1,0,1,0,0,0]     => 1
[1,1,1,0,1,1,0,0,0,0]     => 2
[1,1,1,1,0,0,0,0,1,0]     => 2
[1,1,1,1,0,0,0,1,0,0]     => 3
[1,1,1,1,0,0,1,0,0,0]     => 2
[1,1,1,1,0,1,0,0,0,0]     => 3
[1,1,1,1,1,0,0,0,0,0]     => 2
[1,0,1,0,1,0,1,0,1,0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,0,0,0] => 2
[1,1,1,0,1,1,0,0,0,0,1,0] => 2
[1,1,1,0,1,1,0,0,0,1,0,0] => 3
[1,1,1,0,1,1,0,0,1,0,0,0] => 2
[1,1,1,0,1,1,0,1,0,0,0,0] => 3
[1,1,1,0,1,1,1,0,0,0,0,0] => 2
[1,1,1,1,0,0,0,0,1,0,1,0] => 2
[1,1,1,1,0,0,0,0,1,1,0,0] => 3
[1,1,1,1,0,0,0,1,0,0,1,0] => 3
[1,1,1,1,0,0,0,1,0,1,0,0] => 4
[1,1,1,1,0,0,0,1,1,0,0,0] => 3
[1,1,1,1,0,0,1,0,0,0,1,0] => 2
[1,1,1,1,0,0,1,0,0,1,0,0] => 3
[1,1,1,1,0,0,1,0,1,0,0,0] => 2
[1,1,1,1,0,0,1,1,0,0,0,0] => 3
[1,1,1,1,0,1,0,0,0,0,1,0] => 3
[1,1,1,1,0,1,0,0,0,1,0,0] => 4
[1,1,1,1,0,1,0,0,1,0,0,0] => 3
[1,1,1,1,0,1,0,1,0,0,0,0] => 4
[1,1,1,1,0,1,1,0,0,0,0,0] => 3
[1,1,1,1,1,0,0,0,0,0,1,0] => 2
[1,1,1,1,1,0,0,0,0,1,0,0] => 3
[1,1,1,1,1,0,0,0,1,0,0,0] => 2
[1,1,1,1,1,0,0,1,0,0,0,0] => 3
[1,1,1,1,1,0,1,0,0,0,0,0] => 2
[1,1,1,1,1,1,0,0,0,0,0,0] => 3

-----------------------------------------------------------------------------
Created: Dec 16, 2015 at 02:08 by Veronica Waite

-----------------------------------------------------------------------------
Last Updated: Nov 16, 2017 at 11:42 by Martin Rubey