PathLength on BinaryTree
The sum of the depths of the nodes, the root's being 0: the internal path length.
Called as CombinatorialStat(x, "PathLength"). 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.
Also on
The same name on other carriers, each its own implementation: OrderedTree.
FindStat St000398
The sum of the depths of the vertices (or total internal path length) of a binary tree.
| Object | Value |
|---|---|
[.,.] | 0 |
[.,[.,.]] | 1 |
[[.,.],.] | 1 |
[.,[.,[.,.]]] | 3 |
[.,[[.,.],.]] | 3 |
[[.,.],[.,.]] | 2 |
[[.,[.,.]],.] | 3 |
[[[.,.],.],.] | 3 |
Data from FindStat, the combinatorial statistic finder; the page at findstat.org/St000398 has the rest.