title: Recursive algorithms for phylogenetic tree counting.
abstract: BACKGROUND
  In Bayesian phylogenetic inference we are interested in distributions over a space of trees. The number of trees in a tree space is an important characteristic of the space and is useful for specifying prior distributions. When all samples come from the same time point and no prior information available on divergence times, the tree counting problem is easy. However, when fossil evidence is used in the inference to constrain the tree or data are sampled serially, new tree spaces arise and counting the number of trees is more difficult.
  
  
  RESULTS
  We describe an algorithm that is polynomial in the number of sampled individuals for counting of resolutions of a constraint tree assuming that the number of constraints is fixed. We generalise this algorithm to counting resolutions of a fully ranked constraint tree. We describe a quadratic algorithm for counting the number of possible fully ranked trees on n sampled individuals. We introduce a new type of tree, called a fully ranked tree with sampled ancestors, and describe a cubic time algorithm for counting the number of such trees on n sampled individuals.
  
  
  CONCLUSIONS
  These algorithms should be employed for Bayesian Markov chain Monte Carlo inference when fossil data are included or data are serially sampled.
authors.affiliation: Department of Computer Science, The University of Auckland, Auckland, New Zealand. sasha.gavryushkina@auckland.ac.nz.
authors.forename: Alexandra
authors.initials: A
authors.lastname: Gavryushkina
authors.forename: David
authors.initials: D
authors.lastname: Welch
authors.forename: Alexei J
authors.initials: AJ
authors.lastname: Drummond