***************************************************************************** * www.FindStat.org - The Combinatorial Statistic Finder * * * * Copyright (C) 2019 The FindStatCrew * * * * 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: St000083 ----------------------------------------------------------------------------- Collection: Binary trees ----------------------------------------------------------------------------- Description: The number of left oriented leafs of a binary tree except the first one. In other other words, this is the sum of canopee vector of the tree. The canopee of a non empty binary tree T with n internal nodes is the list l of 0 and 1 of length n-1 obtained by going along the leaves of T from left to right except the two extremal ones, writing 0 if the leaf is a right leaf and 1 if the leaf is a left leaf. This is also the number of nodes having a right child. Indeed each of said right children will give exactly one left oriented leaf. ----------------------------------------------------------------------------- References: ----------------------------------------------------------------------------- Code: def statistic(bt): return sum(bt.canopee()) ----------------------------------------------------------------------------- Statistic values: [.,[.,.]] => 1 [[.,.],.] => 0 [.,[.,[.,.]]] => 2 [.,[[.,.],.]] => 1 [[.,.],[.,.]] => 1 [[.,[.,.]],.] => 1 [[[.,.],.],.] => 0 [.,[.,[.,[.,.]]]] => 3 [.,[.,[[.,.],.]]] => 2 [.,[[.,.],[.,.]]] => 2 [.,[[.,[.,.]],.]] => 2 [.,[[[.,.],.],.]] => 1 [[.,.],[.,[.,.]]] => 2 [[.,.],[[.,.],.]] => 1 [[.,[.,.]],[.,.]] => 2 [[[.,.],.],[.,.]] => 1 [[.,[.,[.,.]]],.] => 2 [[.,[[.,.],.]],.] => 1 [[[.,.],[.,.]],.] => 1 [[[.,[.,.]],.],.] => 1 [[[[.,.],.],.],.] => 0 [.,[.,[.,[.,[.,.]]]]] => 4 [.,[.,[.,[[.,.],.]]]] => 3 [.,[.,[[.,.],[.,.]]]] => 3 [.,[.,[[.,[.,.]],.]]] => 3 [.,[.,[[[.,.],.],.]]] => 2 [.,[[.,.],[.,[.,.]]]] => 3 [.,[[.,.],[[.,.],.]]] => 2 [.,[[.,[.,.]],[.,.]]] => 3 [.,[[[.,.],.],[.,.]]] => 2 [.,[[.,[.,[.,.]]],.]] => 3 [.,[[.,[[.,.],.]],.]] => 2 [.,[[[.,.],[.,.]],.]] => 2 [.,[[[.,[.,.]],.],.]] => 2 [.,[[[[.,.],.],.],.]] => 1 [[.,.],[.,[.,[.,.]]]] => 3 [[.,.],[.,[[.,.],.]]] => 2 [[.,.],[[.,.],[.,.]]] => 2 [[.,.],[[.,[.,.]],.]] => 2 [[.,.],[[[.,.],.],.]] => 1 [[.,[.,.]],[.,[.,.]]] => 3 [[.,[.,.]],[[.,.],.]] => 2 [[[.,.],.],[.,[.,.]]] => 2 [[[.,.],.],[[.,.],.]] => 1 [[.,[.,[.,.]]],[.,.]] => 3 [[.,[[.,.],.]],[.,.]] => 2 [[[.,.],[.,.]],[.,.]] => 2 [[[.,[.,.]],.],[.,.]] => 2 [[[[.,.],.],.],[.,.]] => 1 [[.,[.,[.,[.,.]]]],.] => 3 [[.,[.,[[.,.],.]]],.] => 2 [[.,[[.,.],[.,.]]],.] => 2 [[.,[[.,[.,.]],.]],.] => 2 [[.,[[[.,.],.],.]],.] => 1 [[[.,.],[.,[.,.]]],.] => 2 [[[.,.],[[.,.],.]],.] => 1 [[[.,[.,.]],[.,.]],.] => 2 [[[[.,.],.],[.,.]],.] => 1 [[[.,[.,[.,.]]],.],.] => 2 [[[.,[[.,.],.]],.],.] => 1 [[[[.,.],[.,.]],.],.] => 1 [[[[.,[.,.]],.],.],.] => 1 [[[[[.,.],.],.],.],.] => 0 [.,[.,[.,[.,[.,[.,.]]]]]] => 5 [.,[.,[.,[.,[[.,.],.]]]]] => 4 [.,[.,[.,[[.,.],[.,.]]]]] => 4 [.,[.,[.,[[.,[.,.]],.]]]] => 4 [.,[.,[.,[[[.,.],.],.]]]] => 3 [.,[.,[[.,.],[.,[.,.]]]]] => 4 [.,[.,[[.,.],[[.,.],.]]]] => 3 [.,[.,[[.,[.,.]],[.,.]]]] => 4 [.,[.,[[[.,.],.],[.,.]]]] => 3 [.,[.,[[.,[.,[.,.]]],.]]] => 4 [.,[.,[[.,[[.,.],.]],.]]] => 3 [.,[.,[[[.,.],[.,.]],.]]] => 3 [.,[.,[[[.,[.,.]],.],.]]] => 3 [.,[.,[[[[.,.],.],.],.]]] => 2 [.,[[.,.],[.,[.,[.,.]]]]] => 4 [.,[[.,.],[.,[[.,.],.]]]] => 3 [.,[[.,.],[[.,.],[.,.]]]] => 3 [.,[[.,.],[[.,[.,.]],.]]] => 3 [.,[[.,.],[[[.,.],.],.]]] => 2 [.,[[.,[.,.]],[.,[.,.]]]] => 4 [.,[[.,[.,.]],[[.,.],.]]] => 3 [.,[[[.,.],.],[.,[.,.]]]] => 3 [.,[[[.,.],.],[[.,.],.]]] => 2 [.,[[.,[.,[.,.]]],[.,.]]] => 4 [.,[[.,[[.,.],.]],[.,.]]] => 3 [.,[[[.,.],[.,.]],[.,.]]] => 3 [.,[[[.,[.,.]],.],[.,.]]] => 3 [.,[[[[.,.],.],.],[.,.]]] => 2 [.,[[.,[.,[.,[.,.]]]],.]] => 4 [.,[[.,[.,[[.,.],.]]],.]] => 3 [.,[[.,[[.,.],[.,.]]],.]] => 3 [.,[[.,[[.,[.,.]],.]],.]] => 3 [.,[[.,[[[.,.],.],.]],.]] => 2 [.,[[[.,.],[.,[.,.]]],.]] => 3 [.,[[[.,.],[[.,.],.]],.]] => 2 [.,[[[.,[.,.]],[.,.]],.]] => 3 [.,[[[[.,.],.],[.,.]],.]] => 2 [.,[[[.,[.,[.,.]]],.],.]] => 3 [.,[[[.,[[.,.],.]],.],.]] => 2 [.,[[[[.,.],[.,.]],.],.]] => 2 [.,[[[[.,[.,.]],.],.],.]] => 2 [.,[[[[[.,.],.],.],.],.]] => 1 [[.,.],[.,[.,[.,[.,.]]]]] => 4 [[.,.],[.,[.,[[.,.],.]]]] => 3 [[.,.],[.,[[.,.],[.,.]]]] => 3 [[.,.],[.,[[.,[.,.]],.]]] => 3 [[.,.],[.,[[[.,.],.],.]]] => 2 [[.,.],[[.,.],[.,[.,.]]]] => 3 [[.,.],[[.,.],[[.,.],.]]] => 2 [[.,.],[[.,[.,.]],[.,.]]] => 3 [[.,.],[[[.,.],.],[.,.]]] => 2 [[.,.],[[.,[.,[.,.]]],.]] => 3 [[.,.],[[.,[[.,.],.]],.]] => 2 [[.,.],[[[.,.],[.,.]],.]] => 2 [[.,.],[[[.,[.,.]],.],.]] => 2 [[.,.],[[[[.,.],.],.],.]] => 1 [[.,[.,.]],[.,[.,[.,.]]]] => 4 [[.,[.,.]],[.,[[.,.],.]]] => 3 [[.,[.,.]],[[.,.],[.,.]]] => 3 [[.,[.,.]],[[.,[.,.]],.]] => 3 [[.,[.,.]],[[[.,.],.],.]] => 2 [[[.,.],.],[.,[.,[.,.]]]] => 3 [[[.,.],.],[.,[[.,.],.]]] => 2 [[[.,.],.],[[.,.],[.,.]]] => 2 [[[.,.],.],[[.,[.,.]],.]] => 2 [[[.,.],.],[[[.,.],.],.]] => 1 [[.,[.,[.,.]]],[.,[.,.]]] => 4 [[.,[.,[.,.]]],[[.,.],.]] => 3 [[.,[[.,.],.]],[.,[.,.]]] => 3 [[.,[[.,.],.]],[[.,.],.]] => 2 [[[.,.],[.,.]],[.,[.,.]]] => 3 [[[.,.],[.,.]],[[.,.],.]] => 2 [[[.,[.,.]],.],[.,[.,.]]] => 3 [[[.,[.,.]],.],[[.,.],.]] => 2 [[[[.,.],.],.],[.,[.,.]]] => 2 [[[[.,.],.],.],[[.,.],.]] => 1 [[.,[.,[.,[.,.]]]],[.,.]] => 4 [[.,[.,[[.,.],.]]],[.,.]] => 3 [[.,[[.,.],[.,.]]],[.,.]] => 3 [[.,[[.,[.,.]],.]],[.,.]] => 3 [[.,[[[.,.],.],.]],[.,.]] => 2 [[[.,.],[.,[.,.]]],[.,.]] => 3 [[[.,.],[[.,.],.]],[.,.]] => 2 [[[.,[.,.]],[.,.]],[.,.]] => 3 [[[[.,.],.],[.,.]],[.,.]] => 2 [[[.,[.,[.,.]]],.],[.,.]] => 3 [[[.,[[.,.],.]],.],[.,.]] => 2 [[[[.,.],[.,.]],.],[.,.]] => 2 [[[[.,[.,.]],.],.],[.,.]] => 2 [[[[[.,.],.],.],.],[.,.]] => 1 [[.,[.,[.,[.,[.,.]]]]],.] => 4 [[.,[.,[.,[[.,.],.]]]],.] => 3 [[.,[.,[[.,.],[.,.]]]],.] => 3 [[.,[.,[[.,[.,.]],.]]],.] => 3 [[.,[.,[[[.,.],.],.]]],.] => 2 [[.,[[.,.],[.,[.,.]]]],.] => 3 [[.,[[.,.],[[.,.],.]]],.] => 2 [[.,[[.,[.,.]],[.,.]]],.] => 3 [[.,[[[.,.],.],[.,.]]],.] => 2 [[.,[[.,[.,[.,.]]],.]],.] => 3 [[.,[[.,[[.,.],.]],.]],.] => 2 [[.,[[[.,.],[.,.]],.]],.] => 2 [[.,[[[.,[.,.]],.],.]],.] => 2 [[.,[[[[.,.],.],.],.]],.] => 1 [[[.,.],[.,[.,[.,.]]]],.] => 3 [[[.,.],[.,[[.,.],.]]],.] => 2 [[[.,.],[[.,.],[.,.]]],.] => 2 [[[.,.],[[.,[.,.]],.]],.] => 2 [[[.,.],[[[.,.],.],.]],.] => 1 [[[.,[.,.]],[.,[.,.]]],.] => 3 [[[.,[.,.]],[[.,.],.]],.] => 2 [[[[.,.],.],[.,[.,.]]],.] => 2 [[[[.,.],.],[[.,.],.]],.] => 1 [[[.,[.,[.,.]]],[.,.]],.] => 3 [[[.,[[.,.],.]],[.,.]],.] => 2 [[[[.,.],[.,.]],[.,.]],.] => 2 [[[[.,[.,.]],.],[.,.]],.] => 2 [[[[[.,.],.],.],[.,.]],.] => 1 [[[.,[.,[.,[.,.]]]],.],.] => 3 [[[.,[.,[[.,.],.]]],.],.] => 2 [[[.,[[.,.],[.,.]]],.],.] => 2 [[[.,[[.,[.,.]],.]],.],.] => 2 [[[.,[[[.,.],.],.]],.],.] => 1 [[[[.,.],[.,[.,.]]],.],.] => 2 [[[[.,.],[[.,.],.]],.],.] => 1 [[[[.,[.,.]],[.,.]],.],.] => 2 [[[[[.,.],.],[.,.]],.],.] => 1 [[[[.,[.,[.,.]]],.],.],.] => 2 [[[[.,[[.,.],.]],.],.],.] => 1 [[[[[.,.],[.,.]],.],.],.] => 1 [[[[[.,[.,.]],.],.],.],.] => 1 [[[[[[.,.],.],.],.],.],.] => 0 ----------------------------------------------------------------------------- Created: Jun 13, 2013 at 10:02 by Viviane Pons ----------------------------------------------------------------------------- Last Updated: Oct 17, 2015 at 10:48 by Christian Stump