Identifier
Identifier
Values
[.,.] generating graphics... => 0
[.,[.,.]] generating graphics... => 0
[[.,.],.] generating graphics... => 0
[.,[.,[.,.]]] generating graphics... => 0
[.,[[.,.],.]] generating graphics... => 0
[[.,.],[.,.]] generating graphics... => 0
[[.,[.,.]],.] generating graphics... => 0
[[[.,.],.],.] generating graphics... => 0
[.,[.,[.,[.,.]]]] generating graphics... => 0
[.,[.,[[.,.],.]]] generating graphics... => 0
[.,[[.,.],[.,.]]] generating graphics... => 1
[.,[[.,[.,.]],.]] generating graphics... => 0
[.,[[[.,.],.],.]] generating graphics... => 0
[[.,.],[.,[.,.]]] generating graphics... => 0
[[.,.],[[.,.],.]] generating graphics... => 0
[[.,[.,.]],[.,.]] generating graphics... => 0
[[[.,.],.],[.,.]] generating graphics... => 0
[[.,[.,[.,.]]],.] generating graphics... => 0
[[.,[[.,.],.]],.] generating graphics... => 0
[[[.,.],[.,.]],.] generating graphics... => 1
[[[.,[.,.]],.],.] generating graphics... => 0
[[[[.,.],.],.],.] generating graphics... => 0
[.,[.,[.,[.,[.,.]]]]] generating graphics... => 0
[.,[.,[.,[[.,.],.]]]] generating graphics... => 0
[.,[.,[[.,.],[.,.]]]] generating graphics... => 1
[.,[.,[[.,[.,.]],.]]] generating graphics... => 0
[.,[.,[[[.,.],.],.]]] generating graphics... => 0
[.,[[.,.],[.,[.,.]]]] generating graphics... => 1
[.,[[.,.],[[.,.],.]]] generating graphics... => 1
[.,[[.,[.,.]],[.,.]]] generating graphics... => 1
[.,[[[.,.],.],[.,.]]] generating graphics... => 1
[.,[[.,[.,[.,.]]],.]] generating graphics... => 0
[.,[[.,[[.,.],.]],.]] generating graphics... => 0
[.,[[[.,.],[.,.]],.]] generating graphics... => 1
[.,[[[.,[.,.]],.],.]] generating graphics... => 0
[.,[[[[.,.],.],.],.]] generating graphics... => 0
[[.,.],[.,[.,[.,.]]]] generating graphics... => 0
[[.,.],[.,[[.,.],.]]] generating graphics... => 0
[[.,.],[[.,.],[.,.]]] generating graphics... => 1
[[.,.],[[.,[.,.]],.]] generating graphics... => 0
[[.,.],[[[.,.],.],.]] generating graphics... => 0
[[.,[.,.]],[.,[.,.]]] generating graphics... => 0
[[.,[.,.]],[[.,.],.]] generating graphics... => 0
[[[.,.],.],[.,[.,.]]] generating graphics... => 0
[[[.,.],.],[[.,.],.]] generating graphics... => 0
[[.,[.,[.,.]]],[.,.]] generating graphics... => 0
[[.,[[.,.],.]],[.,.]] generating graphics... => 0
[[[.,.],[.,.]],[.,.]] generating graphics... => 1
[[[.,[.,.]],.],[.,.]] generating graphics... => 0
[[[[.,.],.],.],[.,.]] generating graphics... => 0
[[.,[.,[.,[.,.]]]],.] generating graphics... => 0
[[.,[.,[[.,.],.]]],.] generating graphics... => 0
[[.,[[.,.],[.,.]]],.] generating graphics... => 1
[[.,[[.,[.,.]],.]],.] generating graphics... => 0
[[.,[[[.,.],.],.]],.] generating graphics... => 0
[[[.,.],[.,[.,.]]],.] generating graphics... => 1
[[[.,.],[[.,.],.]],.] generating graphics... => 1
[[[.,[.,.]],[.,.]],.] generating graphics... => 1
[[[[.,.],.],[.,.]],.] generating graphics... => 1
[[[.,[.,[.,.]]],.],.] generating graphics... => 0
[[[.,[[.,.],.]],.],.] generating graphics... => 0
[[[[.,.],[.,.]],.],.] generating graphics... => 1
[[[[.,[.,.]],.],.],.] generating graphics... => 0
[[[[[.,.],.],.],.],.] generating graphics... => 0
[.,[.,[.,[.,[.,[.,.]]]]]] generating graphics... => 0
[.,[.,[.,[.,[[.,.],.]]]]] generating graphics... => 0
[.,[.,[.,[[.,.],[.,.]]]]] generating graphics... => 1
[.,[.,[.,[[.,[.,.]],.]]]] generating graphics... => 0
[.,[.,[.,[[[.,.],.],.]]]] generating graphics... => 0
[.,[.,[[.,.],[.,[.,.]]]]] generating graphics... => 1
[.,[.,[[.,.],[[.,.],.]]]] generating graphics... => 1
[.,[.,[[.,[.,.]],[.,.]]]] generating graphics... => 1
[.,[.,[[[.,.],.],[.,.]]]] generating graphics... => 1
[.,[.,[[.,[.,[.,.]]],.]]] generating graphics... => 0
[.,[.,[[.,[[.,.],.]],.]]] generating graphics... => 0
[.,[.,[[[.,.],[.,.]],.]]] generating graphics... => 1
[.,[.,[[[.,[.,.]],.],.]]] generating graphics... => 0
[.,[.,[[[[.,.],.],.],.]]] generating graphics... => 0
[.,[[.,.],[.,[.,[.,.]]]]] generating graphics... => 1
[.,[[.,.],[.,[[.,.],.]]]] generating graphics... => 1
[.,[[.,.],[[.,.],[.,.]]]] generating graphics... => 2
[.,[[.,.],[[.,[.,.]],.]]] generating graphics... => 1
[.,[[.,.],[[[.,.],.],.]]] generating graphics... => 1
[.,[[.,[.,.]],[.,[.,.]]]] generating graphics... => 1
[.,[[.,[.,.]],[[.,.],.]]] generating graphics... => 1
[.,[[[.,.],.],[.,[.,.]]]] generating graphics... => 1
[.,[[[.,.],.],[[.,.],.]]] generating graphics... => 1
[.,[[.,[.,[.,.]]],[.,.]]] generating graphics... => 1
[.,[[.,[[.,.],.]],[.,.]]] generating graphics... => 1
[.,[[[.,.],[.,.]],[.,.]]] generating graphics... => 2
[.,[[[.,[.,.]],.],[.,.]]] generating graphics... => 1
[.,[[[[.,.],.],.],[.,.]]] generating graphics... => 1
[.,[[.,[.,[.,[.,.]]]],.]] generating graphics... => 0
[.,[[.,[.,[[.,.],.]]],.]] generating graphics... => 0
[.,[[.,[[.,.],[.,.]]],.]] generating graphics... => 1
[.,[[.,[[.,[.,.]],.]],.]] generating graphics... => 0
[.,[[.,[[[.,.],.],.]],.]] generating graphics... => 0
[.,[[[.,.],[.,[.,.]]],.]] generating graphics... => 1
[.,[[[.,.],[[.,.],.]],.]] generating graphics... => 1
[.,[[[.,[.,.]],[.,.]],.]] generating graphics... => 1
[.,[[[[.,.],.],[.,.]],.]] generating graphics... => 1
[.,[[[.,[.,[.,.]]],.],.]] generating graphics... => 0
[.,[[[.,[[.,.],.]],.],.]] generating graphics... => 0
[.,[[[[.,.],[.,.]],.],.]] generating graphics... => 1
[.,[[[[.,[.,.]],.],.],.]] generating graphics... => 0
[.,[[[[[.,.],.],.],.],.]] generating graphics... => 0
[[.,.],[.,[.,[.,[.,.]]]]] generating graphics... => 0
[[.,.],[.,[.,[[.,.],.]]]] generating graphics... => 0
[[.,.],[.,[[.,.],[.,.]]]] generating graphics... => 1
[[.,.],[.,[[.,[.,.]],.]]] generating graphics... => 0
[[.,.],[.,[[[.,.],.],.]]] generating graphics... => 0
[[.,.],[[.,.],[.,[.,.]]]] generating graphics... => 1
[[.,.],[[.,.],[[.,.],.]]] generating graphics... => 1
[[.,.],[[.,[.,.]],[.,.]]] generating graphics... => 1
[[.,.],[[[.,.],.],[.,.]]] generating graphics... => 1
[[.,.],[[.,[.,[.,.]]],.]] generating graphics... => 0
[[.,.],[[.,[[.,.],.]],.]] generating graphics... => 0
[[.,.],[[[.,.],[.,.]],.]] generating graphics... => 1
[[.,.],[[[.,[.,.]],.],.]] generating graphics... => 0
[[.,.],[[[[.,.],.],.],.]] generating graphics... => 0
[[.,[.,.]],[.,[.,[.,.]]]] generating graphics... => 0
[[.,[.,.]],[.,[[.,.],.]]] generating graphics... => 0
[[.,[.,.]],[[.,.],[.,.]]] generating graphics... => 1
[[.,[.,.]],[[.,[.,.]],.]] generating graphics... => 0
[[.,[.,.]],[[[.,.],.],.]] generating graphics... => 0
[[[.,.],.],[.,[.,[.,.]]]] generating graphics... => 0
[[[.,.],.],[.,[[.,.],.]]] generating graphics... => 0
[[[.,.],.],[[.,.],[.,.]]] generating graphics... => 1
[[[.,.],.],[[.,[.,.]],.]] generating graphics... => 0
[[[.,.],.],[[[.,.],.],.]] generating graphics... => 0
[[.,[.,[.,.]]],[.,[.,.]]] generating graphics... => 0
[[.,[.,[.,.]]],[[.,.],.]] generating graphics... => 0
[[.,[[.,.],.]],[.,[.,.]]] generating graphics... => 0
[[.,[[.,.],.]],[[.,.],.]] generating graphics... => 0
[[[.,.],[.,.]],[.,[.,.]]] generating graphics... => 1
[[[.,.],[.,.]],[[.,.],.]] generating graphics... => 1
[[[.,[.,.]],.],[.,[.,.]]] generating graphics... => 0
[[[.,[.,.]],.],[[.,.],.]] generating graphics... => 0
[[[[.,.],.],.],[.,[.,.]]] generating graphics... => 0
[[[[.,.],.],.],[[.,.],.]] generating graphics... => 0
[[.,[.,[.,[.,.]]]],[.,.]] generating graphics... => 0
[[.,[.,[[.,.],.]]],[.,.]] generating graphics... => 0
[[.,[[.,.],[.,.]]],[.,.]] generating graphics... => 1
[[.,[[.,[.,.]],.]],[.,.]] generating graphics... => 0
[[.,[[[.,.],.],.]],[.,.]] generating graphics... => 0
[[[.,.],[.,[.,.]]],[.,.]] generating graphics... => 1
[[[.,.],[[.,.],.]],[.,.]] generating graphics... => 1
[[[.,[.,.]],[.,.]],[.,.]] generating graphics... => 1
[[[[.,.],.],[.,.]],[.,.]] generating graphics... => 1
[[[.,[.,[.,.]]],.],[.,.]] generating graphics... => 0
[[[.,[[.,.],.]],.],[.,.]] generating graphics... => 0
[[[[.,.],[.,.]],.],[.,.]] generating graphics... => 1
[[[[.,[.,.]],.],.],[.,.]] generating graphics... => 0
[[[[[.,.],.],.],.],[.,.]] generating graphics... => 0
[[.,[.,[.,[.,[.,.]]]]],.] generating graphics... => 0
[[.,[.,[.,[[.,.],.]]]],.] generating graphics... => 0
[[.,[.,[[.,.],[.,.]]]],.] generating graphics... => 1
[[.,[.,[[.,[.,.]],.]]],.] generating graphics... => 0
[[.,[.,[[[.,.],.],.]]],.] generating graphics... => 0
[[.,[[.,.],[.,[.,.]]]],.] generating graphics... => 1
[[.,[[.,.],[[.,.],.]]],.] generating graphics... => 1
[[.,[[.,[.,.]],[.,.]]],.] generating graphics... => 1
[[.,[[[.,.],.],[.,.]]],.] generating graphics... => 1
[[.,[[.,[.,[.,.]]],.]],.] generating graphics... => 0
[[.,[[.,[[.,.],.]],.]],.] generating graphics... => 0
[[.,[[[.,.],[.,.]],.]],.] generating graphics... => 1
[[.,[[[.,[.,.]],.],.]],.] generating graphics... => 0
[[.,[[[[.,.],.],.],.]],.] generating graphics... => 0
[[[.,.],[.,[.,[.,.]]]],.] generating graphics... => 1
[[[.,.],[.,[[.,.],.]]],.] generating graphics... => 1
[[[.,.],[[.,.],[.,.]]],.] generating graphics... => 2
[[[.,.],[[.,[.,.]],.]],.] generating graphics... => 1
[[[.,.],[[[.,.],.],.]],.] generating graphics... => 1
[[[.,[.,.]],[.,[.,.]]],.] generating graphics... => 1
[[[.,[.,.]],[[.,.],.]],.] generating graphics... => 1
[[[[.,.],.],[.,[.,.]]],.] generating graphics... => 1
[[[[.,.],.],[[.,.],.]],.] generating graphics... => 1
[[[.,[.,[.,.]]],[.,.]],.] generating graphics... => 1
[[[.,[[.,.],.]],[.,.]],.] generating graphics... => 1
[[[[.,.],[.,.]],[.,.]],.] generating graphics... => 2
[[[[.,[.,.]],.],[.,.]],.] generating graphics... => 1
[[[[[.,.],.],.],[.,.]],.] generating graphics... => 1
[[[.,[.,[.,[.,.]]]],.],.] generating graphics... => 0
[[[.,[.,[[.,.],.]]],.],.] generating graphics... => 0
[[[.,[[.,.],[.,.]]],.],.] generating graphics... => 1
[[[.,[[.,[.,.]],.]],.],.] generating graphics... => 0
[[[.,[[[.,.],.],.]],.],.] generating graphics... => 0
[[[[.,.],[.,[.,.]]],.],.] generating graphics... => 1
[[[[.,.],[[.,.],.]],.],.] generating graphics... => 1
[[[[.,[.,.]],[.,.]],.],.] generating graphics... => 1
[[[[[.,.],.],[.,.]],.],.] generating graphics... => 1
[[[[.,[.,[.,.]]],.],.],.] generating graphics... => 0
[[[[.,[[.,.],.]],.],.],.] generating graphics... => 0
[[[[[.,.],[.,.]],.],.],.] generating graphics... => 1
[[[[[.,[.,.]],.],.],.],.] generating graphics... => 0
[[[[[[.,.],.],.],.],.],.] generating graphics... => 0
click to show generating function       
Description
The number of nodes of degree 3 of a binary tree.
Equivalently, the number of internal triangles in the associated triangulation of an $(n+2)$-gon.
References
[1] Dochtermann, A. Face rings of cycles, associahedra, and standard Young tableaux arXiv:1503.06243
Code
def statistic(T):
    return sum(statistic_aux(C) for C in T)

def statistic_aux(T):
    if T == BinaryTree() or (T[0] == BinaryTree() and T[1] == BinaryTree()):
        return 0
    if T[0] == BinaryTree():
        return statistic_aux(T[1])
    if T[1] == BinaryTree():
        return statistic_aux(T[0])
    return 1 + statistic_aux(T[0]) + statistic_aux(T[1])
    

Created
May 27, 2015 at 15:00 by Anton Dochtermann
Updated
Aug 05, 2016 at 20:11 by Martin Rubey