Identifier
Identifier
Values
[[]] generating graphics... => 0
[[],[]] generating graphics... => 0
[[[]]] generating graphics... => 1
[[],[],[]] generating graphics... => 0
[[],[[]]] generating graphics... => 1
[[[]],[]] generating graphics... => 1
[[[],[]]] generating graphics... => 1
[[[[]]]] generating graphics... => 2
[[],[],[],[]] generating graphics... => 0
[[],[],[[]]] generating graphics... => 1
[[],[[]],[]] generating graphics... => 1
[[],[[],[]]] generating graphics... => 1
[[],[[[]]]] generating graphics... => 2
[[[]],[],[]] generating graphics... => 1
[[[]],[[]]] generating graphics... => 2
[[[],[]],[]] generating graphics... => 1
[[[[]]],[]] generating graphics... => 2
[[[],[],[]]] generating graphics... => 1
[[[],[[]]]] generating graphics... => 2
[[[[]],[]]] generating graphics... => 2
[[[[],[]]]] generating graphics... => 2
[[[[[]]]]] generating graphics... => 3
[[],[],[],[],[]] generating graphics... => 0
[[],[],[],[[]]] generating graphics... => 1
[[],[],[[]],[]] generating graphics... => 1
[[],[],[[],[]]] generating graphics... => 1
[[],[],[[[]]]] generating graphics... => 2
[[],[[]],[],[]] generating graphics... => 1
[[],[[]],[[]]] generating graphics... => 2
[[],[[],[]],[]] generating graphics... => 1
[[],[[[]]],[]] generating graphics... => 2
[[],[[],[],[]]] generating graphics... => 1
[[],[[],[[]]]] generating graphics... => 2
[[],[[[]],[]]] generating graphics... => 2
[[],[[[],[]]]] generating graphics... => 2
[[],[[[[]]]]] generating graphics... => 3
[[[]],[],[],[]] generating graphics... => 1
[[[]],[],[[]]] generating graphics... => 2
[[[]],[[]],[]] generating graphics... => 2
[[[]],[[],[]]] generating graphics... => 2
[[[]],[[[]]]] generating graphics... => 3
[[[],[]],[],[]] generating graphics... => 1
[[[[]]],[],[]] generating graphics... => 2
[[[],[]],[[]]] generating graphics... => 2
[[[[]]],[[]]] generating graphics... => 3
[[[],[],[]],[]] generating graphics... => 1
[[[],[[]]],[]] generating graphics... => 2
[[[[]],[]],[]] generating graphics... => 2
[[[[],[]]],[]] generating graphics... => 2
[[[[[]]]],[]] generating graphics... => 3
[[[],[],[],[]]] generating graphics... => 1
[[[],[],[[]]]] generating graphics... => 2
[[[],[[]],[]]] generating graphics... => 2
[[[],[[],[]]]] generating graphics... => 2
[[[],[[[]]]]] generating graphics... => 3
[[[[]],[],[]]] generating graphics... => 2
[[[[]],[[]]]] generating graphics... => 3
[[[[],[]],[]]] generating graphics... => 2
[[[[[]]],[]]] generating graphics... => 3
[[[[],[],[]]]] generating graphics... => 2
[[[[],[[]]]]] generating graphics... => 3
[[[[[]],[]]]] generating graphics... => 3
[[[[[],[]]]]] generating graphics... => 3
[[[[[[]]]]]] generating graphics... => 4
[[],[],[],[],[],[]] generating graphics... => 0
[[],[],[],[],[[]]] generating graphics... => 1
[[],[],[],[[]],[]] generating graphics... => 1
[[],[],[],[[],[]]] generating graphics... => 1
[[],[],[],[[[]]]] generating graphics... => 2
[[],[],[[]],[],[]] generating graphics... => 1
[[],[],[[]],[[]]] generating graphics... => 2
[[],[],[[],[]],[]] generating graphics... => 1
[[],[],[[[]]],[]] generating graphics... => 2
[[],[],[[],[],[]]] generating graphics... => 1
[[],[],[[],[[]]]] generating graphics... => 2
[[],[],[[[]],[]]] generating graphics... => 2
[[],[],[[[],[]]]] generating graphics... => 2
[[],[],[[[[]]]]] generating graphics... => 3
[[],[[]],[],[],[]] generating graphics... => 1
[[],[[]],[],[[]]] generating graphics... => 2
[[],[[]],[[]],[]] generating graphics... => 2
[[],[[]],[[],[]]] generating graphics... => 2
[[],[[]],[[[]]]] generating graphics... => 3
[[],[[],[]],[],[]] generating graphics... => 1
[[],[[[]]],[],[]] generating graphics... => 2
[[],[[],[]],[[]]] generating graphics... => 2
[[],[[[]]],[[]]] generating graphics... => 3
[[],[[],[],[]],[]] generating graphics... => 1
[[],[[],[[]]],[]] generating graphics... => 2
[[],[[[]],[]],[]] generating graphics... => 2
[[],[[[],[]]],[]] generating graphics... => 2
[[],[[[[]]]],[]] generating graphics... => 3
[[],[[],[],[],[]]] generating graphics... => 1
[[],[[],[],[[]]]] generating graphics... => 2
[[],[[],[[]],[]]] generating graphics... => 2
[[],[[],[[],[]]]] generating graphics... => 2
[[],[[],[[[]]]]] generating graphics... => 3
[[],[[[]],[],[]]] generating graphics... => 2
[[],[[[]],[[]]]] generating graphics... => 3
[[],[[[],[]],[]]] generating graphics... => 2
[[],[[[[]]],[]]] generating graphics... => 3
[[],[[[],[],[]]]] generating graphics... => 2
[[],[[[],[[]]]]] generating graphics... => 3
[[],[[[[]],[]]]] generating graphics... => 3
[[],[[[[],[]]]]] generating graphics... => 3
[[],[[[[[]]]]]] generating graphics... => 4
[[[]],[],[],[],[]] generating graphics... => 1
[[[]],[],[],[[]]] generating graphics... => 2
[[[]],[],[[]],[]] generating graphics... => 2
[[[]],[],[[],[]]] generating graphics... => 2
[[[]],[],[[[]]]] generating graphics... => 3
[[[]],[[]],[],[]] generating graphics... => 2
[[[]],[[]],[[]]] generating graphics... => 3
[[[]],[[],[]],[]] generating graphics... => 2
[[[]],[[[]]],[]] generating graphics... => 3
[[[]],[[],[],[]]] generating graphics... => 2
[[[]],[[],[[]]]] generating graphics... => 3
[[[]],[[[]],[]]] generating graphics... => 3
[[[]],[[[],[]]]] generating graphics... => 3
[[[]],[[[[]]]]] generating graphics... => 4
[[[],[]],[],[],[]] generating graphics... => 1
[[[[]]],[],[],[]] generating graphics... => 2
[[[],[]],[],[[]]] generating graphics... => 2
[[[[]]],[],[[]]] generating graphics... => 3
[[[],[]],[[]],[]] generating graphics... => 2
[[[[]]],[[]],[]] generating graphics... => 3
[[[],[]],[[],[]]] generating graphics... => 2
[[[],[]],[[[]]]] generating graphics... => 3
[[[[]]],[[],[]]] generating graphics... => 3
[[[[]]],[[[]]]] generating graphics... => 4
[[[],[],[]],[],[]] generating graphics... => 1
[[[],[[]]],[],[]] generating graphics... => 2
[[[[]],[]],[],[]] generating graphics... => 2
[[[[],[]]],[],[]] generating graphics... => 2
[[[[[]]]],[],[]] generating graphics... => 3
[[[],[],[]],[[]]] generating graphics... => 2
[[[],[[]]],[[]]] generating graphics... => 3
[[[[]],[]],[[]]] generating graphics... => 3
[[[[],[]]],[[]]] generating graphics... => 3
[[[[[]]]],[[]]] generating graphics... => 4
[[[],[],[],[]],[]] generating graphics... => 1
[[[],[],[[]]],[]] generating graphics... => 2
[[[],[[]],[]],[]] generating graphics... => 2
[[[],[[],[]]],[]] generating graphics... => 2
[[[],[[[]]]],[]] generating graphics... => 3
[[[[]],[],[]],[]] generating graphics... => 2
[[[[]],[[]]],[]] generating graphics... => 3
[[[[],[]],[]],[]] generating graphics... => 2
[[[[[]]],[]],[]] generating graphics... => 3
[[[[],[],[]]],[]] generating graphics... => 2
[[[[],[[]]]],[]] generating graphics... => 3
[[[[[]],[]]],[]] generating graphics... => 3
[[[[[],[]]]],[]] generating graphics... => 3
[[[[[[]]]]],[]] generating graphics... => 4
[[[],[],[],[],[]]] generating graphics... => 1
[[[],[],[],[[]]]] generating graphics... => 2
[[[],[],[[]],[]]] generating graphics... => 2
[[[],[],[[],[]]]] generating graphics... => 2
[[[],[],[[[]]]]] generating graphics... => 3
[[[],[[]],[],[]]] generating graphics... => 2
[[[],[[]],[[]]]] generating graphics... => 3
[[[],[[],[]],[]]] generating graphics... => 2
[[[],[[[]]],[]]] generating graphics... => 3
[[[],[[],[],[]]]] generating graphics... => 2
[[[],[[],[[]]]]] generating graphics... => 3
[[[],[[[]],[]]]] generating graphics... => 3
[[[],[[[],[]]]]] generating graphics... => 3
[[[],[[[[]]]]]] generating graphics... => 4
[[[[]],[],[],[]]] generating graphics... => 2
[[[[]],[],[[]]]] generating graphics... => 3
[[[[]],[[]],[]]] generating graphics... => 3
[[[[]],[[],[]]]] generating graphics... => 3
[[[[]],[[[]]]]] generating graphics... => 4
[[[[],[]],[],[]]] generating graphics... => 2
[[[[[]]],[],[]]] generating graphics... => 3
[[[[],[]],[[]]]] generating graphics... => 3
[[[[[]]],[[]]]] generating graphics... => 4
[[[[],[],[]],[]]] generating graphics... => 2
[[[[],[[]]],[]]] generating graphics... => 3
[[[[[]],[]],[]]] generating graphics... => 3
[[[[[],[]]],[]]] generating graphics... => 3
[[[[[[]]]],[]]] generating graphics... => 4
[[[[],[],[],[]]]] generating graphics... => 2
[[[[],[],[[]]]]] generating graphics... => 3
[[[[],[[]],[]]]] generating graphics... => 3
[[[[],[[],[]]]]] generating graphics... => 3
[[[[],[[[]]]]]] generating graphics... => 4
[[[[[]],[],[]]]] generating graphics... => 3
[[[[[]],[[]]]]] generating graphics... => 4
[[[[[],[]],[]]]] generating graphics... => 3
[[[[[[]]],[]]]] generating graphics... => 4
[[[[[],[],[]]]]] generating graphics... => 3
[[[[[],[[]]]]]] generating graphics... => 4
[[[[[[]],[]]]]] generating graphics... => 4
[[[[[[],[]]]]]] generating graphics... => 4
[[[[[[[]]]]]]] generating graphics... => 5
click to show generating function       
Description
The number of internal nodes of an ordered tree.
A node is internal if it is neither the root nor a leaf.
Code
def statistic(t):
    stack = [c for c in t]
    ni = 0
    while len(stack)!=0:
        tree = stack.pop()
        if len(tree)!=0:
            ni+=1
            stack.extend(tree)
    return ni
Created
Nov 09, 2013 at 01:04 by Viviane Pons
Updated
Apr 01, 2015 at 21:27 by Martin Rubey