MIT6_047f08_pset04

MIT6_047f08_pset04 - MIT OpenCourseWare http/ocw.mit.edu...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: MIT OpenCourseWare http://ocw.mit.edu 6.047 / 6.878 Computational Biology: Genomes, Networks, Evolution Fall 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms . 6.047/6.878 Fall 2008- Problem Set 4 Due: Wednesday October 22, 2008 at 8pm 1. Representing phylogenetic trees. It is convenient to represent rooted phylogenetic trees as binary trees with uniquely labelled leaves. Binary trees, however, impose an inherent left-to-right ordering of nodes that has no biological or phylogenetic relevance. For example, the trees ((a,b),(c,(d,e))) and ((c,(e,d)),(a,b)) represent the same evolutionary history and we can call them isomorphic binary trees. (a) For a given phylogenetic tree with n leaves, how many binary trees are isomorphic to it (i.e. same topology, differing only in left-to-right order)? Justify your answer. (b) Lets say we wanted to avoid this redundancy in the binary tree representation by defining one of the many isomorphic binary trees to be the “canonical” tree (define this distinction however you wish). Give an efficient algorithm that produces a canonical binary tree T given any binary tree isomorphic to T . State and justify the runtime of your algorithm. Notes: Your algorithm for finding a canonical tree should behave such that, given any two isomorphic trees T 1 and T 2 , canonical ( T 1 ) should be the same binary tree as canonical ( T 2 ) . Assume you have any O (1) binary tree operations you need, such as Left ( x ) for the left-hand child, Right ( x ) , Parent ( x ) , IsLeaf ( x ) , Label ( x ) , SwapChildren ( x ) , etc.) Also assume there exists an ordering on the leaves (e.g. each leaf has a unique small ID number or short text string) Among other applications, this algorithm can be used to hash trees by converting your canonical form to a string....
View Full Document

This note was uploaded on 09/24/2010 for the course EECS 6.047 / 6. taught by Professor Manoliskellis during the Fall '08 term at MIT.

Page1 / 4

MIT6_047f08_pset04 - MIT OpenCourseWare http/ocw.mit.edu...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online