You are on page 1of 4

Phylogeny lecture

Holger Plattfaut

November 30, 2004

Chapter 5
Examples

Branch and bound

- Travelling Salesperson Problem (TSP) Given n cities, visit all cities and return to city of origin. - Shortest Hamiltonian Path Problem (SHP) Given n cities, visit all cities on shortest path but do not return. Number of possible solutions: n (n 1) (n 2) . . . = n!. Example Given ten points in plane.

Figure 5.1. Red-coloured: Random path is not a good solution to SHP, blue-coloured: heuristic greedily chooses closest unvisited city as next on the path, green-coloured: optimal solution found by considering all possible paths.

Simple greedy heuristic


while not all cities visited proceed to nearest unvisited city SHP is known to be NP-hard. We would like to score as large instance of problem as possible.

Finding the optimal solution


Example (ten cities) 1 1 1 1 10 2 2 2 2 9 3 3 3 3 8 4 4 4 4 7 5 5 5 5 6 6 6 6 6 . . . 5 7 7 7 7 4 8 8 9 9 3 9 10 10 9 8 10 10 8 2 1

Generate all paths and return the shortest one.

The search tree


We can generate all possible solutions using a search tree.

Phylogeny lecture

Holger Plattfaut

November 30, 2004

Example

Figure 5.2. Instance for building a search tree on ten cities. All leaves are labeled by orderings of 1 . . . n, all dierent. All internal nodes represent possible solutions of subsets of cities.

Branch and bound speed up


During construction of search tree, maintain the global bound g, containing the length of the shortest part on the full problem (seen so far). Initially, set g = . Let v ba a node of the search tree. The local bound l of v is length of path associated with v. Main idea If l > g, we need to visit descendants of v, as they all correspond to paths of length l > g. Update g, whenever we reach a leaf of the search tree, by eplacing g, if full problem at leaf is better.

Branch and bound for parsimony


We generate the search tree for all possible phylogenetic trees by successively adding taxa. Example Taxa = {A, B, C, D, E, ldots}

Figure 5.3.

Phylogeny lecture

Holger Plattfaut

November 30, 2004

To get a good value for g early, we build the search tree in a greedy way, that means by processing the children of a node in the order of increasing parsimony score (number of changes). Assume the parsimony scores of the generated (partial) trees are as follows:

Figure 5.4. Parsimony scores. Obtain a good global bound g as follows: visit visit visit 3 7 9 3 8 8 3 9 now, set g = 9 now, set g = 8 no need to go further, asl > g
1 3

In this example, brach and bound allows us to avoid save more, but it depends on compatibility of data.

of all complete trees. In larger datasets we can

Phylogeny lecture

Holger Plattfaut

November 30, 2004

Chapter 6

Ancestral states and branch length

Let X = {x1 , x2 , . . . , xn } be a set of species and A a set of m characters on X, e.g. a11 . . . a1m . . .. A = . where aij is the state of character j for species i. . . . . an1 anm Sanko and Fitch: Given a phylogenetic tree T on X. Compute the minimum number of changes that is required to explain A using T . Problem How to assign character states to the internal nodes of T ? Consider Sanko s Algorithm At the root of T : can choose any state i for which s(i) is the minimum (s(i) assigned by Sanko) Consider internal node v:

Figure 6.1. Now, suppose we have assigned a state to node v, e.g. 2, and consider a child w. If the state at w is chosen to be
1 2 3 4 sw (1) + c12 sw (2) + 0 sw (3) + c32 sw (4) + c42

, then the cost along edge (v, w) is

. We can assign any state i to w that

minimizes this cost.

You might also like