Identifier
Identifier
Values
[[]] generating graphics... => 1
[[],[]] generating graphics... => 2
[[[]]] generating graphics... => 1
[[],[],[]] generating graphics... => 3
[[],[[]]] generating graphics... => 2
[[[]],[]] generating graphics... => 2
[[[],[]]] generating graphics... => 2
[[[[]]]] generating graphics... => 1
[[],[],[],[]] generating graphics... => 4
[[],[],[[]]] generating graphics... => 3
[[],[[]],[]] generating graphics... => 3
[[],[[],[]]] generating graphics... => 3
[[],[[[]]]] generating graphics... => 2
[[[]],[],[]] generating graphics... => 3
[[[]],[[]]] generating graphics... => 2
[[[],[]],[]] generating graphics... => 3
[[[[]]],[]] generating graphics... => 2
[[[],[],[]]] generating graphics... => 3
[[[],[[]]]] generating graphics... => 2
[[[[]],[]]] generating graphics... => 2
[[[[],[]]]] generating graphics... => 2
[[[[[]]]]] generating graphics... => 1
[[],[],[],[],[]] generating graphics... => 5
[[],[],[],[[]]] generating graphics... => 4
[[],[],[[]],[]] generating graphics... => 4
[[],[],[[],[]]] generating graphics... => 4
[[],[],[[[]]]] generating graphics... => 3
[[],[[]],[],[]] generating graphics... => 4
[[],[[]],[[]]] generating graphics... => 3
[[],[[],[]],[]] generating graphics... => 4
[[],[[[]]],[]] generating graphics... => 3
[[],[[],[],[]]] generating graphics... => 4
[[],[[],[[]]]] generating graphics... => 3
[[],[[[]],[]]] generating graphics... => 3
[[],[[[],[]]]] generating graphics... => 3
[[],[[[[]]]]] generating graphics... => 2
[[[]],[],[],[]] generating graphics... => 4
[[[]],[],[[]]] generating graphics... => 3
[[[]],[[]],[]] generating graphics... => 3
[[[]],[[],[]]] generating graphics... => 3
[[[]],[[[]]]] generating graphics... => 2
[[[],[]],[],[]] generating graphics... => 4
[[[[]]],[],[]] generating graphics... => 3
[[[],[]],[[]]] generating graphics... => 3
[[[[]]],[[]]] generating graphics... => 2
[[[],[],[]],[]] generating graphics... => 4
[[[],[[]]],[]] generating graphics... => 3
[[[[]],[]],[]] generating graphics... => 3
[[[[],[]]],[]] generating graphics... => 3
[[[[[]]]],[]] generating graphics... => 2
[[[],[],[],[]]] generating graphics... => 4
[[[],[],[[]]]] generating graphics... => 3
[[[],[[]],[]]] generating graphics... => 3
[[[],[[],[]]]] generating graphics... => 3
[[[],[[[]]]]] generating graphics... => 2
[[[[]],[],[]]] generating graphics... => 3
[[[[]],[[]]]] generating graphics... => 2
[[[[],[]],[]]] generating graphics... => 3
[[[[[]]],[]]] generating graphics... => 2
[[[[],[],[]]]] generating graphics... => 3
[[[[],[[]]]]] generating graphics... => 2
[[[[[]],[]]]] generating graphics... => 2
[[[[[],[]]]]] generating graphics... => 2
[[[[[[]]]]]] generating graphics... => 1
[[],[],[],[],[],[]] generating graphics... => 6
[[],[],[],[],[[]]] generating graphics... => 5
[[],[],[],[[]],[]] generating graphics... => 5
[[],[],[],[[],[]]] generating graphics... => 5
[[],[],[],[[[]]]] generating graphics... => 4
[[],[],[[]],[],[]] generating graphics... => 5
[[],[],[[]],[[]]] generating graphics... => 4
[[],[],[[],[]],[]] generating graphics... => 5
[[],[],[[[]]],[]] generating graphics... => 4
[[],[],[[],[],[]]] generating graphics... => 5
[[],[],[[],[[]]]] generating graphics... => 4
[[],[],[[[]],[]]] generating graphics... => 4
[[],[],[[[],[]]]] generating graphics... => 4
[[],[],[[[[]]]]] generating graphics... => 3
[[],[[]],[],[],[]] generating graphics... => 5
[[],[[]],[],[[]]] generating graphics... => 4
[[],[[]],[[]],[]] generating graphics... => 4
[[],[[]],[[],[]]] generating graphics... => 4
[[],[[]],[[[]]]] generating graphics... => 3
[[],[[],[]],[],[]] generating graphics... => 5
[[],[[[]]],[],[]] generating graphics... => 4
[[],[[],[]],[[]]] generating graphics... => 4
[[],[[[]]],[[]]] generating graphics... => 3
[[],[[],[],[]],[]] generating graphics... => 5
[[],[[],[[]]],[]] generating graphics... => 4
[[],[[[]],[]],[]] generating graphics... => 4
[[],[[[],[]]],[]] generating graphics... => 4
[[],[[[[]]]],[]] generating graphics... => 3
[[],[[],[],[],[]]] generating graphics... => 5
[[],[[],[],[[]]]] generating graphics... => 4
[[],[[],[[]],[]]] generating graphics... => 4
[[],[[],[[],[]]]] generating graphics... => 4
[[],[[],[[[]]]]] generating graphics... => 3
[[],[[[]],[],[]]] generating graphics... => 4
[[],[[[]],[[]]]] generating graphics... => 3
[[],[[[],[]],[]]] generating graphics... => 4
[[],[[[[]]],[]]] generating graphics... => 3
[[],[[[],[],[]]]] generating graphics... => 4
[[],[[[],[[]]]]] generating graphics... => 3
[[],[[[[]],[]]]] generating graphics... => 3
[[],[[[[],[]]]]] generating graphics... => 3
[[],[[[[[]]]]]] generating graphics... => 2
[[[]],[],[],[],[]] generating graphics... => 5
[[[]],[],[],[[]]] generating graphics... => 4
[[[]],[],[[]],[]] generating graphics... => 4
[[[]],[],[[],[]]] generating graphics... => 4
[[[]],[],[[[]]]] generating graphics... => 3
[[[]],[[]],[],[]] generating graphics... => 4
[[[]],[[]],[[]]] generating graphics... => 3
[[[]],[[],[]],[]] generating graphics... => 4
[[[]],[[[]]],[]] generating graphics... => 3
[[[]],[[],[],[]]] generating graphics... => 4
[[[]],[[],[[]]]] generating graphics... => 3
[[[]],[[[]],[]]] generating graphics... => 3
[[[]],[[[],[]]]] generating graphics... => 3
[[[]],[[[[]]]]] generating graphics... => 2
[[[],[]],[],[],[]] generating graphics... => 5
[[[[]]],[],[],[]] generating graphics... => 4
[[[],[]],[],[[]]] generating graphics... => 4
[[[[]]],[],[[]]] generating graphics... => 3
[[[],[]],[[]],[]] generating graphics... => 4
[[[[]]],[[]],[]] generating graphics... => 3
[[[],[]],[[],[]]] generating graphics... => 4
[[[],[]],[[[]]]] generating graphics... => 3
[[[[]]],[[],[]]] generating graphics... => 3
[[[[]]],[[[]]]] generating graphics... => 2
[[[],[],[]],[],[]] generating graphics... => 5
[[[],[[]]],[],[]] generating graphics... => 4
[[[[]],[]],[],[]] generating graphics... => 4
[[[[],[]]],[],[]] generating graphics... => 4
[[[[[]]]],[],[]] generating graphics... => 3
[[[],[],[]],[[]]] generating graphics... => 4
[[[],[[]]],[[]]] generating graphics... => 3
[[[[]],[]],[[]]] generating graphics... => 3
[[[[],[]]],[[]]] generating graphics... => 3
[[[[[]]]],[[]]] generating graphics... => 2
[[[],[],[],[]],[]] generating graphics... => 5
[[[],[],[[]]],[]] generating graphics... => 4
[[[],[[]],[]],[]] generating graphics... => 4
[[[],[[],[]]],[]] generating graphics... => 4
[[[],[[[]]]],[]] generating graphics... => 3
[[[[]],[],[]],[]] generating graphics... => 4
[[[[]],[[]]],[]] generating graphics... => 3
[[[[],[]],[]],[]] generating graphics... => 4
[[[[[]]],[]],[]] generating graphics... => 3
[[[[],[],[]]],[]] generating graphics... => 4
[[[[],[[]]]],[]] generating graphics... => 3
[[[[[]],[]]],[]] generating graphics... => 3
[[[[[],[]]]],[]] generating graphics... => 3
[[[[[[]]]]],[]] generating graphics... => 2
[[[],[],[],[],[]]] generating graphics... => 5
[[[],[],[],[[]]]] generating graphics... => 4
[[[],[],[[]],[]]] generating graphics... => 4
[[[],[],[[],[]]]] generating graphics... => 4
[[[],[],[[[]]]]] generating graphics... => 3
[[[],[[]],[],[]]] generating graphics... => 4
[[[],[[]],[[]]]] generating graphics... => 3
[[[],[[],[]],[]]] generating graphics... => 4
[[[],[[[]]],[]]] generating graphics... => 3
[[[],[[],[],[]]]] generating graphics... => 4
[[[],[[],[[]]]]] generating graphics... => 3
[[[],[[[]],[]]]] generating graphics... => 3
[[[],[[[],[]]]]] generating graphics... => 3
[[[],[[[[]]]]]] generating graphics... => 2
[[[[]],[],[],[]]] generating graphics... => 4
[[[[]],[],[[]]]] generating graphics... => 3
[[[[]],[[]],[]]] generating graphics... => 3
[[[[]],[[],[]]]] generating graphics... => 3
[[[[]],[[[]]]]] generating graphics... => 2
[[[[],[]],[],[]]] generating graphics... => 4
[[[[[]]],[],[]]] generating graphics... => 3
[[[[],[]],[[]]]] generating graphics... => 3
[[[[[]]],[[]]]] generating graphics... => 2
[[[[],[],[]],[]]] generating graphics... => 4
[[[[],[[]]],[]]] generating graphics... => 3
[[[[[]],[]],[]]] generating graphics... => 3
[[[[[],[]]],[]]] generating graphics... => 3
[[[[[[]]]],[]]] generating graphics... => 2
[[[[],[],[],[]]]] generating graphics... => 4
[[[[],[],[[]]]]] generating graphics... => 3
[[[[],[[]],[]]]] generating graphics... => 3
[[[[],[[],[]]]]] generating graphics... => 3
[[[[],[[[]]]]]] generating graphics... => 2
[[[[[]],[],[]]]] generating graphics... => 3
[[[[[]],[[]]]]] generating graphics... => 2
[[[[[],[]],[]]]] generating graphics... => 3
[[[[[[]]],[]]]] generating graphics... => 2
[[[[[],[],[]]]]] generating graphics... => 3
[[[[[],[[]]]]]] generating graphics... => 2
[[[[[[]],[]]]]] generating graphics... => 2
[[[[[[],[]]]]]] generating graphics... => 2
[[[[[[[]]]]]]] generating graphics... => 1
click to show generating function       
Description
The number of leaves of an ordered tree.
This is the number of nodes which do not have any children.
Code
def statistic(t):
    stack = [t]
    nl = 0
    while len(stack)!=0:
        tree = stack.pop()
        if len(tree) == 0:
            nl+=1
        else:
            stack.extend(tree)
    return nl
Created
Nov 09, 2013 at 00:51 by Viviane Pons
Updated
May 20, 2016 at 21:19 by Martin Rubey