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

unlabeledTrees -- enumerate all unlabeled trees

Synopsis

Description

This function enumerates all possible binary trees with n unlabeled leaves. Each tree is an object of class LeafTree. Each class of unlabeled tree is represented by a particular labeling of that tree. Some duplicates may appear in the list, but each equivalence class is guaranteed to appear at least once.

i1 : L = unlabeledTrees 5

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

o1 : List

Caveat

For n larger than 5, some equivalence classes of trees may appear more than once.

See also

Ways to use unlabeledTrees :

For the programmer

The object unlabeledTrees is a method function.