Professional Documents
Culture Documents
Holger Plattfaut
Chapter 5
Examples
- 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.
Phylogeny lecture
Holger Plattfaut
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.
Figure 5.3.
Phylogeny lecture
Holger Plattfaut
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.
Phylogeny lecture
Holger Plattfaut
Chapter 6
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