NRooted: Number of trees

View source: R/Combinatorics.R

NRootedR Documentation

Number of trees

Description

These functions return the number of rooted or unrooted binary trees consistent with a given pattern of splits.

Usage

NRooted(tips)

NUnrooted(tips)

NRooted64(tips)

NUnrooted64(tips)

LnUnrooted(tips)

LnUnrooted.int(tips)

Log2Unrooted(tips)

Log2Unrooted.int(tips)

LnRooted(tips)

LnRooted.int(tips)

Log2Rooted(tips)

Log2Rooted.int(tips)

LnUnrootedSplits(...)

Log2UnrootedSplits(...)

NUnrootedSplits(...)

LnUnrootedMult(...)

Log2UnrootedMult(...)

NUnrootedMult(...)

Arguments

tips

Integer specifying the number of leaves.

...

Integer vector, or series of integers, listing the number of leaves in each split.

Details

Functions starting N return the number of rooted or unrooted trees. Replace this initial N with Ln for the natural logarithm of this number; or Log2 for its base 2 logarithm.

Calculations follow \insertCiteCavalliSforza1967;textualTreeTools and \insertCiteCarter1990;textualTreeTools, Theorem 2.

Functions

  • NUnrooted(): Number of unrooted trees

  • NRooted64(): Exact number of rooted trees as 64-bit integer (13 < nTip < 19)

  • NUnrooted64(): Exact number of unrooted trees as 64-bit integer (14 < nTip < 20)

  • LnUnrooted(): Log Number of unrooted trees

  • LnUnrooted.int(): Log Number of unrooted trees (as integer)

  • LnRooted(): Log Number of rooted trees

  • LnRooted.int(): Log Number of rooted trees (as integer)

  • NUnrootedSplits(): Number of unrooted trees consistent with a bipartition split.

  • NUnrootedMult(): Number of unrooted trees consistent with a multi-partition split.

Author(s)

Martin R. Smith (martin.smith@durham.ac.uk)

References

\insertAllCited

See Also

Other tree information functions: CladisticInfo(), TreesMatchingTree()

Examples

NRooted(10)
NUnrooted(10)
LnRooted(10)
LnUnrooted(10)
Log2Unrooted(10)
# Number of trees consistent with a character whose states are
# 00000 11111 222
NUnrootedMult(c(5,5,3))

NUnrooted64(18)
LnUnrootedSplits(c(2,4))
LnUnrootedSplits(3, 3)
Log2UnrootedSplits(c(2,4))
Log2UnrootedSplits(3, 3)
NUnrootedSplits(c(2,4))
NUnrootedSplits(3, 3)

TreeTools documentation built on Sept. 11, 2024, 8:27 p.m.