This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Finding all or best or some (hopefully best) trees Peter Beerli September 11, 2005 1 Counting trees [JF:3] 1.1 Counting rooted trees Cayley (1857) seems to be the first one to publish tree counting methods and many followed, it seems that many authors reinvented formulas for counting several times in the biological literature and the computer science literature. Counting trees might be futile exercise but it will give a good impression about how many things are contributing to a solution. It is also directly connected to the exhaustive search method. Figure 1: A sample of all different tree shapes with 4 tips, when the trees are labeled 1 BSC5936Fall 2005 Computational Evolutionary Biology Starting with a tree with two tips we easily recognize that there this only possible tree. We can add a third tip either into the branch from A to the root, into the branch from B to the root, or below the current root. There are 3 possible rooted bifurcating trees with 3 tips: ((a,b),c), ((a,c),b), ((c,b),a). We just added a node and and an additional branch. A fourth tip can be added at all 4 branches above the root and also 1 below the root, there are 5 possible branches to insert. this leaves us wit 3 × 5 possibilities for a rooted 4tip tree.(figure ?? ). We outlined an algorithm to calculate the total number of possible unrooted trees. We need only to realize that there are 2 n 3 possible branches were we can insert a new branch. The 2 n 3 we can get by recognizing that there are n tips and n 2 interior branches and one root branch. Once we recognize the series it is even simpler 1 × 3 × 5 × 7 ... × (2 n 3) (1) We can express this in a more compact formula Algorithm 1 Counting rooted trees with n tips S ← 1 k ← 2 while k ≤ n do S ← S × (2 k 3) k ← k + 1 end while return S number of rooted trees = (2 n 3)! 2 n 2 ( n 2)! (2) [The formula in Joe’s book on page 23 is incorrect (my copy)] The number of trees increase rapidly (see Table 3.1 in JF page 24). 1.2 Counting unrooted trees Once we recognize that there is nothing special about the root and that any tip can be treated as a root we can apply the same formula ( ?? ) with n 1 tips. We can also rewrite the formula to reflect the counting on unrooted trees to number of unrooted trees = (2 n 5)! 2 n 3 ( n 3)! (3) 2 BSC5936Fall 2005 Computational Evolutionary Biology 1.3 Counting multifurcations JF:2528 When we want to count multifurcating trees there arises some ambiguity because the number of nodes depends not only on the number tips, but also on the number of multifurcations in the tree. To get a count we simple count over all possible multifurcating nodes up to to the n 1 internal nodes for a given number of n tips....
View
Full Document
 Spring '08
 staff
 Evolution, branch, Computational Evolutionary Biology

Click to edit the document details