PathLength on OrderedTree
The sum of the depths of the vertices, the root's being 0.
Each vertex below a child sits one deeper than in the child's own tree, so the child contributes its vertex count plus its own path length.
Called as CombinatorialStat(x, "PathLength"). The head's page has its examples.
Live
Distribution
Over OrderedTrees 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: BinaryTree.
FindStat St000400
The path length of an ordered tree.
| Object | Value |
|---|---|
[[]] | 1 |
[[[]]] | 3 |
[[],[]] | 2 |
[[[[]]]] | 6 |
[[[],[]]] | 5 |
[[[]],[]] | 4 |
[[],[[]]] | 4 |
[[[[[]]]]] | 10 |
Data from FindStat, the combinatorial statistic finder; the page at findstat.org/St000400 has the rest.