Skip to content

BoundaryNodes on BinaryTree ​

The number of nodes on the left spine or the right spine, the root counted once.

On BinaryTree

FindStat calls these the external nodes; the name stays off the empty subtrees, which are Knuth's.

Called as CombinatorialStat(x, "BoundaryNodes"). The head's page has its examples.

Live

Distribution

Over BinaryTrees at each size, tallied here in your browser; sizes past 6 are not offered.

FindStat St000203

The number of external nodes of a binary tree.

ObjectValue
[.,.]1
[.,[.,.]]2
[[.,.],.]2
[.,[.,[.,.]]]3
[.,[[.,.],.]]2
[[.,.],[.,.]]3
[[.,[.,.]],.]2
[[[.,.],.],.]3

Data from FindStat, the combinatorial statistic finder; the page at findstat.org/St000203 has the rest.