Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 13 Maximal Accurate Forests From Distance Matrix.

Similar presentations


Presentation on theme: "Lecture 13 Maximal Accurate Forests From Distance Matrix."— Presentation transcript:

1 Lecture 13 Maximal Accurate Forests From Distance Matrix

2 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.

3 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

4 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)

5 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

6 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

7 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).

8 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

9 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 α.

10 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.

11 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

12 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

13 Algorithm 1

14 Algorithm 2

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

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

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

18 אלגוריתם 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

19 הוכחת אלגוריתם 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.

20 המשך הוכחת אלג' 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 וגם את כל תתי העצים שמחוברים לצמתים אלו.

21 המשך הוכחת אלג' 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’).

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

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

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


Download ppt "Lecture 13 Maximal Accurate Forests From Distance Matrix."

Similar presentations


Ads by Google