*****************************************************************************
*       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: St000120

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

-----------------------------------------------------------------------------
Description: The number of left tunnels of a Dyck path.

A tunnel is a pair (a,b) where a is the position of an open parenthesis and b is the position of the matching close parenthesis. If a+b<n then the tunnel is called left.

-----------------------------------------------------------------------------
References: [1]   Elizalde, S. Fixed points and excedances in restricted permutations [[MathSciNet:2880679]] [[arXiv:math/0212221]]

-----------------------------------------------------------------------------
Code:
def statistic(x):
    return x.number_of_tunnels("left")


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

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

-----------------------------------------------------------------------------
Created: Jun 18, 2013 at 17:45 by Viviane Pons

-----------------------------------------------------------------------------
Last Updated: May 20, 2016 at 20:52 by Martin Rubey