Lecture 13 Maximal Accurate Forests From Distance Matrix.

Slides:



Advertisements
Similar presentations
CS 336 March 19, 2012 Tandy Warnow.
Advertisements

WSPD Applications.
A Separate Analysis Approach to the Reconstruction of Phylogenetic Networks Luay Nakhleh Department of Computer Sciences UT Austin.
PHYLOGENETIC TREES Bulent Moller CSE March 2004.
. Phylogenetic Trees (2) Lecture 13 Based on: Durbin et al 7.4, Gusfield , Setubal&Meidanis 6.1.
Approximation Algorithms for Unique Games Luca Trevisan Slides by Avi Eyal.
Lectures on Network Flows
גרף מכוון Directed Graph a b c f g ed h צמתים חוג עצמי קשתות.
Data Structures, Spring 2004 © L. Joskowicz 1 Data Structures – LECTURE 14 Strongly connected components Definition and motivation Algorithm Chapter 22.5.
Applied Discrete Mathematics Week 12: Trees
מתמטיקה בדידה תרגול 3.
. Computational Genomics 5a Distance Based Trees Reconstruction (cont.) Modified by Benny Chor, from slides by Shlomo Moran and Ydo Wexler (IIT)
. Phylogeny II : Parsimony, ML, SEMPHY. Phylogenetic Tree u Topology: bifurcating Leaves - 1…N Internal nodes N+1…2N-2 leaf branch internal node.
. Maximum Likelihood (ML) Parameter Estimation with applications to inferring phylogenetic trees Comput. Genomics, lecture 7a Presentation partially taken.
גרפים ממשקלים גרף ממשקל הוא גרף עם משקל לכל קשת עץ פורש הוא עץ שצמתיו הם כל הצמתים של הגרף וקשתותיו הן קשתות הגרף.
Tirgul 10 Rehearsal about Universal Hashing Solving two problems from theoretical exercises: –T2 q. 1 –T3 q. 2.
International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April , Tehran 1 IV COMPUTING SIZE.
1 Algorithms for Large Data Sets Ziv Bar-Yossef Lecture 8 May 4, 2005
R. Bar-Yehuda © 1 Graph theory – תורת הגרפים 2.4 Directed Trees – עצים מכוונים מבוסס על הספר : S. Even, "Graph Algorithms",
R. Bar-Yehuda © 1 קומבינטוריקה למדעי - המחשב – הרצאה #14 Graph theory – תורת הגרפים Chapter 1: PATHS IN GRAPHS – 1. מסלולים.
3 -1 Chapter 3 The Greedy Method 3 -2 The greedy method Suppose that a problem can be solved by a sequence of decisions. The greedy method has that each.
עבודה סמינריונית Prelude to Ukkonen algorithm ON-LINE CONSTRUCTION OF SUFFIX TREES מגישים : עיד מוחמד טיבי פיראס.
משפט ההרכבה Composition Theorem תהי C מחלקה של פונקציות בוליניות תהי נגדיר סדרת פונקציות שניתנות לחישוב בזמן פולינומיאלי.
A general approximation technique for constrained forest problems Michael X. Goemans & David P. Williamson Presented by: Yonatan Elhanani & Yuval Cohen.
Testing Metric Properties Michal Parnas and Dana Ron.
Based on the paper by D.Huson, S.Nettles, T.Warnow
שאלה 1 נתון כביש ישר עם תחנות דלק בנקודות , בנקודת המוצא נתונה מכונית עם תא דלק שמספיק ל-100 ק"מ. מחיר מילוי תא הדלק בתחנה.
הפקולטה למדעי המחשב אוטומטים ושפות פורמליות (236353)
UNIVERSITY OF SOUTH CAROLINA College of Engineering & Information Technology Bioinformatics Algorithms and Data Structures Chapter : Strings and.
עקרון ההכלה וההדחה.
יחס סדר חלקי.
Randomness in Computation and Communication Part 1: Randomized algorithms Lap Chi Lau CSE CUHK.
Phylogenetic Networks of SNPs with Constrained Recombination D. Gusfield, S. Eddhu, C. Langley.
Estimating Evolutionary Distances from DNA Sequences Lecture 14 ©Shlomo Moran, parts based on Ilan Gronau.
עצים בינאריים - תזכורת דרגת צומת שורש עלה צומת פנימי מרחק בין 2 צמתים
מבנה מחשבים תרגול מספר 3. טענה על עצים משפט: בעץ שדרגת כל קודקודיו חסומה ב-3, מספר העלים ≤ מספר הקודקודים הפנימיים + 2. הוכחה: באינדוקציה על n, מספר הקודקודים.
R. Bar-Yehuda © 1 Graph theory – תורת הגרפים 4. ORDERED TREES 4.1 UNIQUELY DECIPHERABLE CODES מבוסס על הספר : S. Even,
Connected Dominating Sets in Wireless Networks My T. Thai Dept of Comp & Info Sci & Engineering University of Florida June 20, 2006.
Lecture 3. Relation with Information Theory and Symmetry of Information Shannon entropy of random variable X over sample space S: H(X) = ∑ P(X=x) log 1/P(X=x)‏,
© The McGraw-Hill Companies, Inc., Chapter 3 The Greedy Method.
5.4 Shortest-path problem  Let G=(V,E,w) be a weighted connected simple graph, w is a function from edges set E to position real numbers set. We denoted.
Trees and Distance. 2.1 Basic properties Acyclic : a graph with no cycle Forest : acyclic graph Tree : connected acyclic graph Leaf : a vertex of degree.
Benjamin Loyle 2004 Cse 397 Solving Phylogenetic Trees Benjamin Loyle March 16, 2004 Cse 397 : Intro to MBIO.
Discrete Structures Lecture 12: Trees Ji Yanyan United International College Thanks to Professor Michael Hvidsten.
Ch.6 Phylogenetic Trees 2 Contents Phylogenetic Trees Character State Matrix Perfect Phylogeny Binary Character States Two Characters Distance Matrix.
More statistical stuff CS 394C Feb 6, Today Review of material from Jan 31 Calculating pattern probabilities Why maximum parsimony and UPGMA are.
Crypto Final Presentation B 林敬倫 B 李佳蓉 B 王姵瑾 B 周振平.
Statistical stuff: models, methods, and performance issues CS 394C September 16, 2013.
Data Structures Hanoch Levi and Uri Zwick March 2011 Lecture 3 Dynamic Sets / Dictionaries Binary Search Trees.
598AGB Basics Tandy Warnow. DNA Sequence Evolution AAGACTT TGGACTTAAGGCCT -3 mil yrs -2 mil yrs -1 mil yrs today AGGGCATTAGCCCTAGCACTT AAGGCCTTGGACTT.
Statistical stuff: models, methods, and performance issues CS 394C September 3, 2009.
 2004 SDU 1 Lecture5-Strongly Connected Components.
Distance-based methods for phylogenetic tree reconstruction Colin Dewey BMI/CS 576 Fall 2015.
5.6 Prefix codes and optimal tree Definition 31: Codes with this property which the bit string for a letter never occurs as the first part of the bit string.
Application of Phylogenetic Networks in Evolutionary Studies Daniel H. Huson and David Bryant Presented by Peggy Wang.
Chapter AGB. Today’s material Maximum Parsimony Fixed tree versions (solvable in polynomial time using dynamic programming) Optimal tree search.
by d. gusfield v. bansal v. bafna y. song presented by vikas taliwal
Theory of Computational Complexity Probability and Computing Chapter Hikaru Inada Iwama and Ito lab M1.
12. Graphs and Trees 2 Summary
Character-Based Phylogeny Reconstruction
Reconstruction on trees and Phylogeny 1
Chapter 5. Optimal Matchings
בעיות נוספות ב-NPC.
Marina Kogan Sadetsky –
תרגול 11 NP complete.
CS 581 Tandy Warnow.
Md. Abul Kashem, Chowdhury Sharif Hasan, and Anupam Bhattacharjee
Reconstruction on trees and Phylogeny 3
CS 581 Tandy Warnow.
Switching Lemmas and Proof Complexity
Presentation transcript:

Lecture 13 Maximal Accurate Forests From Distance Matrix

Cavender-Farri-Neyman 2-state model Definition 1: Let T be a fixed rooted tree with leaves labeled 1,…,n. The Cavender-Farri-Neyman 2-state model makes the following assumptions: 1.The possible states for each site are 0 and 1. 2.Along every edge e of the tree with probability Θ(e) the child copies its value from the father, and with probability 1- Θ(e) it randomizes uniformly in {0,1} 3.The sites evolve identically and independently (i.i.d) down the tree from the root.

Let Θ(u,v) be the probability during transition from node u to v the value of the site was only copied. If the path from u to v is e 1,e 2,..e p It is clear that: Θ(u,v) = ∏ Θ(e i ) Let p(u,v) be the probability that at the end of the same transition the value is different from the initial. It is clear that: p(u,v) = ½(1- Θ(u,v) ) Cavender-Farri-Neyman 2-state model i = 1 p

Definition of distance The input of our problem is a sequence of k site values for each species (DNA) The target is to restore the evolution tree So we must define the distance from the sequences such that it will “match” some tree metric d(u,v) = - log Θ(u,v)

How to compute distance from sequences? Now, given k samples of the 2-state model process at the leaves x u (t) for each leaf u and index t from 1 to k we can estimate Θ(u,v) by 1-2p’(u,v) where: p’(u,v) = 1/k * |{ t | x u (t) != x v (t) }| example on the board t = 1 k

Definition of the problem Let T be edge-weighted, unrooted binary tree. we define: L(T) – the set of leafs of T For any sub set X of L(T) T|X denotes the restriction of T to X. For leafs x,y let P(x,y) denotes the path from x to y in T. Two subsets L 1 and L 2 of L(T) are edge sharing if there exist x,y in L 1 and w,z in L 2 s.t. P(x,y) and P(w,z) have common edges

Edge sharing graph Given distance matrix D ’ : For u in L(T) Let L(v) denote a sub set of L(T) s.t. if D’(v,y) < D ’ (v,x) and x in L(v), then y in L(v). For sub set U of L(T) let ε (U) be the graph with nodes {L(x)|x in U} and edge determined by the edge-sharing relation. Let SL(v) be the union of L(v) with all neighbours of L(v) in ε (U).

Local (ε,M) distortion Let T be an edge-weighted binary tree let D be the associated additive matrix. Suppose 0 < ε <M. We say that D’:L(T) x L(T) -> R + is a local (ε,M) distortion for a sub set U of L(T) if: 1.D’ is a distance matrix. 2.D’(x,y) = ∞ implies D(x,y) > M, for all x,y in U 3.D’(x,y) < M implies |D(x,y)-D’(x,y)| < ε, for all x,y in U

local distortion decomposition Let T be an edge-weighted binary tree and let D be the associated additive matrix. Suppose L(T) = C 1 U … U C α s.t. T|C i and T|C j are edge-disjoint for each 1 < i < j < α. For each i < α, let 0 < ε i < M i be given. We say that C = f(C i,ε i,M i ) : 0 < i < α is a local distortion decomposition of D ’ if D ’ is a local (ε i, M i ) distortion for C i, for each i from 1 to α.

Constructive distortion decomposition Furthermore, let f i be the weight of the smallest edge in T|C i and let for all i: ε i 7ε i L(v) be the ball of radius (M i -7ε i )/6 about v ε (C i ) are the connected components of ε (L(T)) Then we say that C is constructive.

Theorem: Let T be an edge-weighted binary tree and let D be the associated additive matrix. Suppose D ’ an (ε,M) distortion of D for L(T) with ε 7ε where f and g are the smallest and largest edges respectively. Let ε (L(T)) be the edge-sharing graph of (M-7ε)/6 balls around leaves. Then the connected components of ε(L(T)) is a constructive distortion decomposiotion and their number is less than O(2 -(M-ε)/2g )n

Again, what problem we want to solve? Input: matrix D’ which is a local distortion decomposition of some unknown additive matrix D output: approximate the real tree topology by a forest with as few trees as you can

Algorithm 1

Algorithm 2

אלגוריתם 3 אינטואיציה: אלגוריתם המקבל את כל ה-L(*) ומחזיר אילו L(*) משתפים קשת זה עם זה. ובונה גרפים- T|SL(v). האלג' בודק לכל זוג L(v),L(u) אם הם משתפים קשת. הוא עושה זאת ע"י בדיקה אם יש רביעייה מסויימת בשתי הקבוצות הנ"ל:

המשך תיאור אלג' 3 במקרה שהרביעייה שאלג' 2 מחזיר מתקבלת כמו שמתואר מימין אז L(u),L(v) משתפים קשת. L(u) L(v)

המשך תיאור אלג' 3 כאשר מסיימים לבדוק את כל שיתוף הקשתות בונים לכל SL(v) גרף T|SL(v) ע"י שיטה כמו NJ.

אלגוריתם 4 (בניית רכיב בגרף) Algorithm 4 (Component reconstruction) INPUT: SL(·) trees of a connected component C of ε (S) OUTPUT: T|C Let v1,..., vr be a perfect elimination order of the leaves of a component C of E(S) (by lemma 1 C is triangulated). for 1 ≤ i ≤ r do Let X i = SL(vi) ∩ {v i,..., v r } Get t i = T|(X i ∪ {v i }) by restricting T|SL(v i ) end for Set T r = t r for i = r − 1 to 1 do T i := strict consensus merger of t i and T i+1 end for return T 1

הוכחת אלגוריתם 4 נניח ε (S), T|SL(v) מדויק לכל עלה v ב-C. לכן לכל i<=n T i = T|{v i,..., v r }. הוכחה: ל-i=r ברור שהטענה נכונה. נניח נכונות ל- T i+1 = T|{v i+1,..., v r }. L(t i )∩L(T i+1 ) = X i,כאשר X i זה אוסף העלים של ה- backbone של Z שהוא merger של T i+1, t i.

המשך הוכחת אלג' 4 נראה שאין התנגשות ב-merge של של T i+1, t i. נניח שיש התנגשות: אם e היא קשת של Z, ו-v i ותת עץ T’ של T i+1 מחוברים לקשת e. ברור כי L(T’) מוכל ב- {v i+1,..., v r }− X i (כי העלים של Z הם X i, ו-T’ לא תת עץ של Z. נניח שקשת e מסמלת מסלול P עם קצוות a,b. יהי T0 תת עץ של T המכיל את כל הצמתים והקשתות הפנימיות של P וגם את כל תתי העצים שמחוברים לצמתים אלו.

המשך הוכחת אלג' 4 V i הוא עלה של T 0 כי הוא מחובר לצומת במסלול P. העלים של T’ מוכלים בעלים של T 0 כי T’ הוא תת עץ המחובר לצומת במסלול P. העלים של T 0,X i זרים כי P מסמל קשת בגרף Z. E(L(T 0 )) הוא קשיר מסלול (הוכחה בהמשך). יהי Q מסלול ב- E(L(T 0 )) מ-L(v i ) ל- צומת ב- L(T’). כאשר x הוא הצומת הראשון ב- L(T’).

המשך הוכחת אלג' 4 קיים perfect elimination order כך שנוכל להחסיר קשתות במסלול הנ"ל ולקבל שקיימת קשת (v i,x), דבר הגורר ש- x שייך ל- sl(v i ) ולכן x שייך ל-X i, הסתירה לכך ש-L(T’) זרים ל- Xi.

סיבוכיות זמן סיבוכיות ריצה אחת של אלגוריתם 3 היא O(n). סיבוכיות ריצה אחת של אלגוריתם 4 היא O(n^2). סה"כ סיבוכיות זמן של כל ריצות אלגוריתם 3 הוא O(n^3) (זאת כי אלג' 3 רץ n^2 פעמים). יש n עצים לכן את אלגוריתם 4 קוראים מקסימום n פעמים. לכן סה"כ סיבוכיות של כל ריצות אלגוריתם 4 הוא O(n^3). לכן סה"כ סיבוכיות O(n^3).

אורך סידרה אם אורך סדרה של כל זן הוא O(poly(log(n))) אז אלגוריתם 2 עובד טוב כמעט תמיד.