Macaulay2 » Documentation
Packages » PhylogeneticTrees :: rootedBinaryTrees
next | previous | forward | backward | up | index | toc

rootedBinaryTrees -- enumerate all rooted binary trees

Synopsis

Description

This function enumerates all possible binary trees with a distinguished root and n-1 unlabeled leaves. Each tree is an object of class LeafTree. For the purposes of representation, the root is named $0$ and the unlabeled leaves are named $1,\ldots,n-1$. In other words each class of unlabeled rooted tree is represented once by a particular labeling of that tree.

i1 : L = rootedBinaryTrees 5

o1 = {{{0, 1, 2, 3, 4}, {set {2, 3, 4}, set {3, 4}, set {0}, set {1}, set
     ------------------------------------------------------------------------
     {2}, set {3}, set {4}}}, {{0, 1, 2, 3, 4}, {set {1, 2}, set {3, 4}, set
     ------------------------------------------------------------------------
     {0}, set {1}, set {2}, set {3}, set {4}}}}

o1 : List

See also

Ways to use rootedBinaryTrees :

For the programmer

The object rootedBinaryTrees is a method function.