6. DYNAMIC PROGRAMMING II

Size: px
Start display at page:

Download "6. DYNAMIC PROGRAMMING II"

Transcription

1 6. DYNAMIC PROGRAMMING II 6. DYNAMIC PROGRAMMING II sequence alignmen Hirschberg s algorihm Bellman Ford Moore algorihm disance-vecor proocols negaive cycles sequence alignmen Hirschberg s algorihm Bellman Ford Moore algorihm disance-vecor proocols negaive cycles SECTION 6.6 Lecure slides by Kevin Wayne Copyrigh 00 Pearson-Addison Wesley hp:// Las updaed on /8/8 7: PM Sring similariy Edi disance Q. How similar are wo srings? Ex. ocurrance and occurrence. o c u r r a n c e o c c u r r e n c e 6 mismaches, gap o c u r r a n c e o c c u r r e n c e 0 mismaches, gaps o c u r r a n c e o c c u r r e n c e mismach, gap Edi disance. [Levenshein 966, Needleman Wunsch 970] Gap penaly δ; mismach penaly α pq. Cos = sum of gap and mismach penalies. C T G A C C T A C G C T G G A C G A A C G cos = δ + α CG + α TA Applicaions. Bioinformaics, spell correcion, machine ranslaion, speech recogniion, informaion exracion,... assuming α AA = α CC = α GG = α TT = 0 Spokesperson confirms senior governmen adviser was found Spokesperson said he senior adviser was found

2 BLOSUM marix for proeins Dynamic programming: quiz Wha is edi disance beween hese wo srings? P A L E T T E P A L A T E Assume gap penaly = and mismach penaly =. A. B. C. D. E. P A L E T T E P A L A T E mismach, gap 6 Sequence alignmen Sequence alignmen: problem srucure Goal. Given wo srings x x... xm and y y... yn, find a min-cos alignmen. Def. OPT(i, j) = min cos of aligning prefix srings x x... xi and y y... yj. Goal. OPT(m, n). Def. An alignmen M is a se of ordered pairs xi yj such ha each characer appears in a mos one pair and no crossings. Case. OPT(i, j) maches xi yj. Pay mismach for xi yj + min cos of aligning x x... xi and y y... yj. xi yj and xiʹ yj cross if i < i, bu j > j ʹ Def. The cos of an alignmen M is: cos(m ) = Case a. OPT(i, j) leaves xi unmached. α xi y j + δ+ δ i : x unmached j : y unmached!##"## $!#i### #"#j#### $ Pay gap for xi + min cos of aligning x x... xi and y y... yj. (x i, y j ) M mismach gap opimal subsrucure propery (proof via exchange argumen) Case b. OPT(i, j) leaves yj unmached. x x x x x C T A C C G T A C A T G y y y y y y6 Pay gap for yj + min cos of aligning x x... xi and y y... yj. x6 Bellman equaion. i=0 i OP T (i, j) = 7 j=0 x i yj min an alignmen of CTACCG and TACATG M = { x y, x y, x y, x y, x6 y6 } j + OP T (i + OP T (i + OP T (i, j <laexi sha_base6="60wunmrldnufwg/nhfwbdvxy=">aaadsichvjdaxnbfjdwqxq6pvgwgpuubdsviirqkvvhmhkyzekynbjjpdxwbuoqlz/ax/vx+ap8hb6jd8ufslhwqsdlpppefonykyjs0gwu/p7qzfffezvggephj/zdu/sglubhrfqljzfxelsmrookqfvkbnkqklqpr9x98gamlak+xkg/yspbxkwdfbgzpfuych8jxdhjiwfuurssgphuhxcidgbtqhlaafnl6kdggkhrzohzdkekodylivdqxjvehzmng0ywslhxljkxnxqtadynpiuna8czrvkhqthowhyykzrrpyftoobjmvnf9omoabzwvqylchu8gfvrbnowtpqkjo7b6t6luenofeobm0vddlsf9ygfkouzykxfzzefrcqnkcl9ubzmnlxws0fqnfikso+cjbmkcsye9iu0rwlovx+fjva6yxg0wbgnc0uxpexhole0ifdnxmkfkwwksbccihu+6yvnozijwbfnncshgsiyqnklhrbd9zjhdvwmhqcj+9bz6dpvcic/icjaqvkonjeppeo6rhhfvk/en++7/8p/f//yyovlfpcursbx9fzpasg=</laexi>, j ), j) ) 8

3 <laexi sha_base6="60wunmrldnufwg/nhfwbdvxy=">aaadsichvjdaxnbfjdwqxq6pvgwgpuubdsviirqkvvhmhkyzekynbjjpdxwbuoqlz/ax/vx+ap8hb6jd8ufslhwqsdlpppefonykyjs0gwu/p7qzfffezvggephj/zdu/sglubhrfqljzfxelsmrookqfvkbnkqklqpr9x98gamlak+xkg/yspbxkwdfbgzpfuych8jxdhjiwfuurssgphuhxcidgbtqhlaafnl6kdggkhrzohzdkekodylivdqxjvehzmng0ywslhxljkxnxqtadynpiuna8czrvkhqthowhyykzrrpyftoobjmvnf9omoabzwvqylchu8gfvrbnowtpqkjo7b6t6luenofeobm0vddlsf9ygfkouzykxfzzefrcqnkcl9ubzmnlxws0fqnfikso+cjbmkcsye9iu0rwlovx+fjva6yxg0wbgnc0uxpexhole0ifdnxmkfkwwksbccihu+6yvnozijwbfnncshgsiyqnklhrbd9zjhdvwmhqcj+9bz6dpvcic/icjaqvkonjeppeo6rhhfvk/en++7/8p/f//yyovlfpcursbx9fzpasg=</laexi> <laexi sha_base6="60wunmrldnufwg/nhfwbdvxy=">aaadsichvjdaxnbfjdwqxq6pvgwgpuubdsviirqkvvhmhkyzekynbjjpdxwbuoqlz/ax/vx+ap8hb6jd8ufslhwqsdlpppefonykyjs0gwu/p7qzfffezvggephj/zdu/sglubhrfqljzfxelsmrookqfvkbnkqklqpr9x98gamlak+xkg/yspbxkwdfbgzpfuych8jxdhjiwfuurssgphuhxcidgbtqhlaafnl6kdggkhrzohzdkekodylivdqxjvehzmng0ywslhxljkxnxqtadynpiuna8czrvkhqthowhyykzrrpyftoobjmvnf9omoabzwvqylchu8gfvrbnowtpqkjo7b6t6luenofeobm0vddlsf9ygfkouzykxfzzefrcqnkcl9ubzmnlxws0fqnfikso+cjbmkcsye9iu0rwlovx+fjva6yxg0wbgnc0uxpexhole0ifdnxmkfkwwksbccihu+6yvnozijwbfnncshgsiyqnklhrbd9zjhdvwmhqcj+9bz6dpvcic/icjaqvkonjeppeo6rhhfvk/en++7/8p/f//yyovlfpcursbx9fzpasg=</laexi> <laexi sha_base6="60wunmrldnufwg/nhfwbdvxy=">aaadsichvjdaxnbfjdwqxq6pvgwgpuubdsviirqkvvhmhkyzekynbjjpdxwbuoqlz/ax/vx+ap8hb6jd8ufslhwqsdlpppefonykyjs0gwu/p7qzfffezvggephj/zdu/sglubhrfqljzfxelsmrookqfvkbnkqklqpr9x98gamlak+xkg/yspbxkwdfbgzpfuych8jxdhjiwfuurssgphuhxcidgbtqhlaafnl6kdggkhrzohzdkekodylivdqxjvehzmng0ywslhxljkxnxqtadynpiuna8czrvkhqthowhyykzrrpyftoobjmvnf9omoabzwvqylchu8gfvrbnowtpqkjo7b6t6luenofeobm0vddlsf9ygfkouzykxfzzefrcqnkcl9ubzmnlxws0fqnfikso+cjbmkcsye9iu0rwlovx+fjva6yxg0wbgnc0uxpexhole0ifdnxmkfkwwksbccihu+6yvnozijwbfnncshgsiyqnklhrbd9zjhdvwmhqcj+9bz6dpvcic/icjaqvkonjeppeo6rhhfvk/en++7/8p/f//yyovlfpcursbx9fzpasg=</laexi> <laexi sha_base6="60wunmrldnufwg/nhfwbdvxy=">aaadsichvjdaxnbfjdwqxq6pvgwgpuubdsviirqkvvhmhkyzekynbjjpdxwbuoqlz/ax/vx+ap8hb6jd8ufslhwqsdlpppefonykyjs0gwu/p7qzfffezvggephj/zdu/sglubhrfqljzfxelsmrookqfvkbnkqklqpr9x98gamlak+xkg/yspbxkwdfbgzpfuych8jxdhjiwfuurssgphuhxcidgbtqhlaafnl6kdggkhrzohzdkekodylivdqxjvehzmng0ywslhxljkxnxqtadynpiuna8czrvkhqthowhyykzrrpyftoobjmvnf9omoabzwvqylchu8gfvrbnowtpqkjo7b6t6luenofeobm0vddlsf9ygfkouzykxfzzefrcqnkcl9ubzmnlxws0fqnfikso+cjbmkcsye9iu0rwlovx+fjva6yxg0wbgnc0uxpexhole0ifdnxmkfkwwksbccihu+6yvnozijwbfnncshgsiyqnklhrbd9zjhdvwmhqcj+9bz6dpvcic/icjaqvkonjeppeo6rhhfvk/en++7/8p/f//yyovlfpcursbx9fzpasg=</laexi> Sequence alignmen: boom-up algorihm Sequence alignmen: raceback SEQUENCE-ALIGNMENT(m, n, x,, xm, y,, yn, δ, α) FOR i = 0 TO m M [i, 0] i δ. FOR j = 0 TO n M [0, j] j δ. FOR i = TO m FOR j = TO n M [i, j] min { α xi y j + M [i, j ], RETURN M [m, n]. δ + M [i, j], δ + M [i, j ] }. already compued S I M I L A R I T Y I D E N T I T Y Sequence alignmen: analysis Dynamic programming: quiz Theorem. The DP algorihm compues he edi disance (and an opimal alignmen) of wo srings of lenghs m and n in Θ(mn) ime and space. Algorihm compues edi disance. Can race back o exrac opimal alignmen iself. Theorem. [Backurs Indyk 0] If can compue edi disance of wo srings of lengh n in O(n ) ime for some consan > 0, hen can solve SAT wih n variables and m clauses in poly(m) ( δ) n ime for some consan δ > 0. Edi Disance Canno Be Compued in Srongly Subquadraic Time (unless SETH is false) Arurs Backurs MIT Pior Indyk MIT which would disprove SETH (srong exponenial ime hypohesis) I is easy o modify he DP algorihm for edi disance o A. Compue edi disance in O(mn) ime and O(m + n) space. B. Compue an opimal alignmen in O(mn) ime and O(m + n) space. C. Boh A and B. D. Neiher A nor B. j i =0 i j =0 OPT(i, j) = x iy j + OPT(i,j ) min + OPT(i,j) + OPT(i, j )

4 Sequence alignmen in linear space Theorem. [Hirschberg] There exiss an algorihm o find an opimal 6. D YNAMIC P ROGRAMMING II alignmen in O(mn) ime and O(m + n) space. Clever combinaion of divide-and-conquer and dynamic programming. sequence alignmen Inspired by idea of Savich from complexiy heory. Hirschberg s algorihm Bellman Ford Moore algorihm A = a x a... a m if and only if here is a mapping F: {,,..., p} ~ {,,..., m} such ha f(i) = k only if c~ is ak and F is a m o n o o n e sricly increasing funcion (i.e. F(i) = u, F ( j ) = v, and i < j imply ha disance-vecor proocols Programming Techniques u<v). G. Manacher Edior A Linear Space Algorihm for Compuing Maximal Common Subsequences negaive cycles D.S. Hirschberg Princeon Universiy SECTION 6.7 The problem of finding a longes common subsequence of wo srings has been solved in quadraic ime and space. An algorihm is presened which will solve his problem in quadraic ime and in linear space. Key Words and Phrases: subsequence, longes common subsequence, sring correcion, ediing CR Caegories:.6,.7,.79,.,. Inroducion Hirschberg s algorihm Hirschberg s algorihm Edi disance graph. Edi disance graph. The problem of finding a longes c o m m o n subsequence of wo srings has been solved in quadraic ime and space [, ]. F o r srings of lengh,000 (assuming coefficiens of microsecond and bye) he soluion would require 06 microseconds (one second) and 06 byes (000K byes). The former is easily accommodaed, he laer is no so easily obainable. I f he srings were of lengh 0,000, he problem migh no be solvable in main m e m o r y for lack of space. We presen an algorihm which will solve his problem in quadraic ime and in linear space. For example, assuming coefficiens of microseconds and 0 byes, for srings of lengh,000 we would require seconds and 0K byes; for srings of lengh 0,000 we would require a lile over minues and 00K byes. Sring C = c~c...cp is a subsequence of sring Copyrigh 97, Associaion for Compuing Machinery, Inc. General permission o republish, bu no for profi, all or par of his maerial is graned provided ha ACM's copyrigh noice is given and ha reference is made o he publicaion, o is dae of issue, and o he fac ha reprining privileges were graned by permission of he Associaion for Compuing Machinery. Research work was suppored in par by NSF gran GJ-06 and Naional Science Foundaion Graduae Felolwship. Auhor's address: Deparmen of Elecrical Engineering, Princeon Universiy, Princeon, NJ 080. Sring C is a c o m m o n subsequence of srings A and B if and only if C is a subsequence of A and C is a subsequence of B. The problem can be saed as follows: Given srings A = aia... "am and B = b x b... b n (over alphabe Z), find a sring C = ClC...cp such ha C, is a c o m m o n subsequence of A and B and p is maximized. We call C an example of a m a x i m a l c o m m o n subsequence. Noaion. F o r sring D = dld. dr, Dk is dkdk+l. d, i f k < ; d k d k _ x... d, i f k >. When k >, we shall wrie ]k so as o make clear ha we are referring o a "reverse subsring" of D. L(i, j ) is he m a x i m u m lengh possible of any common subsequence of Ax~ and B~s. x[ ly is he concaenaion of srings x and y. We presen he algorihm described in [], which akes quadraic ime and space. Algorihm A Algorihm A acceps as inpu srings A~m and Bx. and produces as oupu he marix L (where he elemen L(i, j ) corresponds o our noaion of m a x i m u m lengh possible of any c o m m o n subsequence of Axl and B.). ALGA (m, n, A, B, L). Iniializaion: L(i, 0) ~ 0 [i=0...m]; L(O,j) [j=0...n]; for i +-- o m do begin. for j ~- o n do if A (i) = B(j) hen L(i, j) ~- L(i--, j - - ) "k else L(i,j) ~-- max{l(i,j--), L(i-- I,j)} end Proof of Correcness of Algorihm A To find L(i, j), le a c o m m o n subsequence of ha lengh be denoed by S(i, j ) = ClC...cp. I f al = bj, we can do no beer han by aking cp = a~ and looking for c l... c p _ l as a c o m m o n subsequence of lengh L(i, j) -- of srings AI,~- and B.i-x. Thus, in his case, L ( i, j ) = L ( i,j) -+-. If ai ~ bs, hen cp is ai, b;, or neiher (bu no boh). I f cp is a~, hen a soluion C o problem (A~, B~j) [wrien P(i, j)] will be a soluion o P(i, j - ) since bj is no used. Similarly, if cp is bi, hen we can ge a soluion o P(i, j ) by solving P ( i --, j ). I f c~ is neiher, hen a soluion o eiher P ( i --,j) or P ( i, j -- ) will suffice. In deermining he lengh of he soluion, i is seen ha L(i, j ) [corresponding o P(i, j)] will be he ). [] m a x i m u m o f L ( i - -, j ) and L ( i, j - - Le f (i, j) denoe lengh of shores pah from (0,0) o (i, j). Le f (i, j) denoe lengh of shores pah from (0,0) o (i, j). Lemma: f (i, j) = OPT(i, j) for all i and j. Lemma: f (i, j) = OPT(i, j) for all i and j. Pf of Lemma. [ by srong inducion on i + j ]. Communicaions of he ACM June 97 Volume 8 Number 6 Base case: f (0, 0) = OPT (0, 0) = 0. y y y y y y6 Inducive hypohesis: assume rue for all (iʹ, jʹ) wih iʹ + jʹ < i + j. Las edge on shores pah o (i, j) is from (i, j ), (i, j), or (i, j ). 0 0 Thus, x α xi y j x x δ ff (i, (i, j) j) = = min{ min{ x xii y yjj + + ff (i (i = = min{ min{ xii y yjj x + + OP OP T T (i (i δ inducive hypohesis,, jj ), ),,, jj + + ff (i (i ), ), + + OP OP T T (i (i + + ff (i, (i, jj,, j), j), )} )} + + OP OP T T (i, (i, jj )} )} = OP OP T T (i, (i, j) j) = α xi y j Bellman equaion m n,, j), j), δ δ 6

5 Hirschberg s algorihm Hirschberg s algorihm Edi disance graph. Le f (i, j) denoe lengh of shores pah from (0,0) o (i, j). Lemma: f (i, j) = OPT(i, j) for all i and j. Can compue f (, j) for any j in O(mn) ime and O(m + n) space. Edi disance graph. Le g(i, j) denoe lengh of shores pah from (i, j) o (m, n). j y y y y y y 6 y y y y y y x x x x x m n x m n 7 8 Hirschberg s algorihm Hirschberg s algorihm Edi disance graph. Edi disance graph. Le g(i, j) denoe lengh of shores pah from (i, j) o (m, n). Le g(i, j) denoe lengh of shores pah from (i, j) o (m, n). Can compue g(i, j) by reversing he edge orienaions and invering he roles of (0, 0) and (m, n). Can compue g(, j) for any j in O(mn) ime and O(m + n) space. j y y y y y y 6 y y y y y y x δ x δ x i+y j+ x x x m n x m n 9 0

6 Hirschberg s algorihm Hirschberg s algorihm Observaion. The lengh of a shores pah ha uses (i, j) is f (i, j) + g(i, j). Observaion. le q be an index ha minimizes f(q, n / ) + g(q, n / ). Then, here exiss a shores pah from (0, 0) o (m, n) ha uses (q, n / ). n / y y y y y y 6 y y y y y y x x q x x x m n x m n Hirschberg s algorihm Hirschberg s algorihm: space analysis Divide. Find index q ha minimizes f (q, n / ) + g(q, n / ); save node as par of soluion. Conquer. Recursively compue opimal alignmen in each piece. y n / y y y y y 6 Theorem. Hirschberg s algorihm uses Θ(m + n) space. Each recursive call uses Θ(m) space o compue f (, n / ) and g(, n / ). Only Θ() space needs o be mainained per recursive call. Number of recursive calls n. 0 0 x q x x m n

7 Dynamic programming: quiz Hirschberg s algorihm: running ime analysis warmup Wha is he wors-case running ime of Hirschberg s algorihm? A. O(mn) B. O(mn log m) C. O(mn log n) D. O(mn log m log n) Theorem. Le T(m, n) = max running ime of Hirschberg s algorihm on srings of lenghs a mos m and n. Then, T(m, n) = O(m n log n). T(m, n) is monoone nondecreasing in boh m and n. T(m, n) T(m, n / ) + O(m n) T(m, n) = O(m n log n). Remark. Analysis is no igh because wo subproblems are of size (q, n / ) and (m q, n / ). Nex, we prove T(m, n) = O(m n). 6 Hirschberg s algorihm: running ime analysis LONGEST COMMON SUBSEQUENCE Theorem. Le T(m, n) = max running ime of Hirschberg s algorihm on srings of lenghs a mos m and n. Then, T(m, n) = O(m n). [ by srong inducion on m + n ] O(m n) ime o compue f (, n / ) and g (, n / ) and find index q. T(q, n / ) + T(m q, n / ) ime for wo recursive calls. Choose consan c so ha: Claim. T(m, n) c m n. Base cases: m = and n =. T(m, ) c m T(, n) c n T(m, n) c m n + T(q, n / ) + T(m q, n / ) Inducive hypohesis: T(m, n) c m n for all (mʹ, nʹ) wih mʹ + nʹ < m + n. Problem. Given wo srings x x... x m and y y... y n, find a common subsequence ha is as long as possible. Alernaive viewpoin. Delee some characers from x ; delee some characer from y ; a common subsequence if i resuls in he same sring. Ex. LCS(GGCACCACG, ACGGCGGATACG ) = GGCAACG. Applicaions. Unix diff, gi, bioinformaics. T(m, n) T(q, n / ) + T(m q, n / ) + c m n c q n / + c (m q) n / + c m n inducive hypohesis = c q n + c m n c q n + c m n = c m n 7 8

8 <laexi sha_base6="rsprsrjqxplkln8jdnfdjbxfc=">aaacwhicbvdlssnafjer+u7rusg0xqtueskkcmzlbwufpotj9fyhjmwcymoz/h7jvjxb/xknbhaemmvhnpuye6jucooe9+ws8srq6xyvrgbtqvaezbjpjm0esit/rgxaioaknacy+pbhzhejrry0hdbggoexyl0ivzkxidwrlakqwcbydlyeeibhf0qkibyeiwbxoirtjwsghfmjlkbywuvcaitox+dpqjmohvwnvrqtgwg0iumtfd0uxlzongksyrwezgztxf/yexqsvi8h08sllypgmtdjno+hxtc/u7iwwzmkiszczwsxqbfmfsw0ozlqquzgultrynmukxoyrpcw0ccgcxrwwf6x8mwng0zouyowu+d0k+zjtgsr8wwildgxsxfqxpfslien8z/dq/bs7sljm9sk8oiu/oydwjssjpy8kxfyqt6db9dxs+7anrzj7zc7cg+aell</laexi> <laexi sha_base6="rsprsrjqxplkln8jdnfdjbxfc=">aaacwhicbvdlssnafjer+u7rusg0xqtueskkcmzlbwufpotj9fyhjmwcymoz/h7jvjxb/xknbhaemmvhnpuye6jucooe9+ws8srq6xyvrgbtqvaezbjpjm0esit/rgxaioaknacy+pbhzhejrry0hdbggoexyl0ivzkxidwrlakqwcbydlyeeibhf0qkibyeiwbxoirtjwsghfmjlkbywuvcaitox+dpqjmohvwnvrqtgwg0iumtfd0uxlzongksyrwezgztxf/yexqsvi8h08sllypgmtdjno+hxtc/u7iwwzmkiszczwsxqbfmfsw0ozlqquzgultrynmukxoyrpcw0ccgcxrwwf6x8mwng0zouyowu+d0k+zjtgsr8wwildgxsxfqxpfslien8z/dq/bs7sljm9sk8oiu/oydwjssjpy8kxfyqt6db9dxs+7anrzj7zc7cg+aell</laexi> <laexi sha_base6="rsprsrjqxplkln8jdnfdjbxfc=">aaacwhicbvdlssnafjer+u7rusg0xqtueskkcmzlbwufpotj9fyhjmwcymoz/h7jvjxb/xknbhaemmvhnpuye6jucooe9+ws8srq6xyvrgbtqvaezbjpjm0esit/rgxaioaknacy+pbhzhejrry0hdbggoexyl0ivzkxidwrlakqwcbydlyeeibhf0qkibyeiwbxoirtjwsghfmjlkbywuvcaitox+dpqjmohvwnvrqtgwg0iumtfd0uxlzongksyrwezgztxf/yexqsvi8h08sllypgmtdjno+hxtc/u7iwwzmkiszczwsxqbfmfsw0ozlqquzgultrynmukxoyrpcw0ccgcxrwwf6x8mwng0zouyowu+d0k+zjtgsr8wwildgxsxfqxpfslien8z/dq/bs7sljm9sk8oiu/oydwjssjpy8kxfyqt6db9dxs+7anrzj7zc7cg+aell</laexi> <laexi sha_base6="rsprsrjqxplkln8jdnfdjbxfc=">aaacwhicbvdlssnafjer+u7rusg0xqtueskkcmzlbwufpotj9fyhjmwcymoz/h7jvjxb/xknbhaemmvhnpuye6jucooe9+ws8srq6xyvrgbtqvaezbjpjm0esit/rgxaioaknacy+pbhzhejrry0hdbggoexyl0ivzkxidwrlakqwcbydlyeeibhf0qkibyeiwbxoirtjwsghfmjlkbywuvcaitox+dpqjmohvwnvrqtgwg0iumtfd0uxlzongksyrwezgztxf/yexqsvi8h08sllypgmtdjno+hxtc/u7iwwzmkiszczwsxqbfmfsw0ozlqquzgultrynmukxoyrpcw0ccgcxrwwf6x8mwng0zouyowu+d0k+zjtgsr8wwildgxsxfqxpfslien8z/dq/bs7sljm9sk8oiu/oydwjssjpy8kxfyqt6db9dxs+7anrzj7zc7cg+aell</laexi> Shores pahs wih negaive weighs 6. DYNAMIC PROGRAMMING II Shores-pah problem. Given a digraph G = (V, E), wih arbirary edge lenghs vw, find shores pah from source node s o desinaion node. sequence alignmen assume here exiss a pah from every node o Hirschberg s algorihm Bellman Ford Moore algorihm disance-vecor proocols negaive cycles s SECTION lengh of shores pah from s o = = Shores pahs wih negaive weighs: failed aemps Negaive cycles Dijksra. May no produce shores pahs when edge lenghs are negaive. s Reweighing. Adding a consan o every edge lengh does no necessarily make Dijksra s algorihm produce shores pahs. 6 v 8 w Dijksra selecs he verices in he order s,, w, v Bu shores pah from s o is s v w. Def. A negaive cycle is a direced cycle for which he sum of is edge lenghs is negaive. s v 0 0 Adding 8 o each edge weigh changes he shores pah from s v w o s. a negaive cycle W : (W ) = e W e < 0 w

9 Shores pahs and negaive cycles Shores pahs and negaive cycles Lemma. If some v pah conains a negaive cycle, hen here does no exis a shores v pah. If here exiss such a cycle W, hen can build a v pah of arbirarily negaive lengh by deouring around W as many imes as desired. Lemma. If G has no negaive cycles, hen here exiss a shores v pah ha is simple (and has n edges). Among all shores v pahs, consider one ha uses he fewes edges. If ha pah P conains a direced cycle W, can remove he porion of P corresponding o W wihou increasing is lengh. v v W W (W) < 0 (W) 0 6 Shores-pahs and negaive-cycle problems Dynamic programming: quiz Single-desinaion shores-pahs problem. Given a digraph G = (V, E) wih edge lenghs vw (bu no negaive cycles) and a disinguished node, find a shores v pah for every node v. Negaive-cycle problem. Given a digraph G = (V, E) wih edge lenghs vw, find a negaive cycle (if one exiss). Which subproblems o find shores v pahs for every node v? A. OPT(i, v) = lengh of shores v pah ha uses exacly i edges. B. OPT(i, v) = lengh of shores v pah ha uses a mos edges. C. Neiher A nor B. shores-pahs ree negaive cycle 7 8

10 <laexi sha_base6="xucluoowywddz7b+9lleqh6s=">aaadvicjvjdaxnbfjnmb0ay++nixkbfjlwchvapiocbezqkalhdvzumnrdjszmyys+rx+gl/v/tx6gwawppiwfu+eec+fsqkzkyz/wuvurf+db7wh90emntfgvunjs0xzpzarpqzqcov9k6ze80wjs0kjz+hfpj+nkvrkpo7dzdyclgssscm+ugucnrf+deqbpq+bdo9o0dhavclfuloq068mrobznfgoqmsxawbhxbtkcomdrna6abzgmnqqahqsz/nqqvnxqj0iblrg7adahqxj0fps+8qkmguitcmlhrmrbhylms+lo9mxseaeupr8x0yhg0ge8cywhlrula8fs6+0tlffqzhge0/y8lpgttjqnou0aptxpufkumtgdwm/ssgdaci7rzsbzbi/ygmcufaxbmwwp7xbbx0sarxqjlczrvxufsyzj6fjjsxozoasbp8g+qphwwqmwrcvvdopzctaf8pjajdryk+euyvwlxxhgngrbka6csdfi76kmovk8dtcdvtamdwstdhyzgy7oxxcfxo8o98/hwlwenpccvsiseamjl9ij/qj977p7yfq/kdevdadau6fwvjxmgvmraumpcdqa==</laexi> <laexi sha_base6="xucluoowywddz7b+9lleqh6s=">aaadvicjvjdaxnbfjnmb0ay++nixkbfjlwchvapiocbezqkalhdvzumnrdjszmyys+rx+gl/v/tx6gwawppiwfu+eec+fsqkzkyz/wuvurf+db7wh90emntfgvunjs0xzpzarpqzqcov9k6ze80wjs0kjz+hfpj+nkvrkpo7dzdyclgssscm+ugucnrf+deqbpq+bdo9o0dhavclfuloq068mrobznfgoqmsxawbhxbtkcomdrna6abzgmnqqahqsz/nqqvnxqj0iblrg7adahqxj0fps+8qkmguitcmlhrmrbhylms+lo9mxseaeupr8x0yhg0ge8cywhlrula8fs6+0tlffqzhge0/y8lpgttjqnou0aptxpufkumtgdwm/ssgdaci7rzsbzbi/ygmcufaxbmwwp7xbbx0sarxqjlczrvxufsyzj6fjjsxozoasbp8g+qphwwqmwrcvvdopzctaf8pjajdryk+euyvwlxxhgngrbka6csdfi76kmovk8dtcdvtamdwstdhyzgy7oxxcfxo8o98/hwlwenpccvsiseamjl9ij/qj977p7yfq/kdevdadau6fwvjxmgvmraumpcdqa==</laexi> <laexi sha_base6="xucluoowywddz7b+9lleqh6s=">aaadvicjvjdaxnbfjnmb0ay++nixkbfjlwchvapiocbezqkalhdvzumnrdjszmyys+rx+gl/v/tx6gwawppiwfu+eec+fsqkzkyz/wuvurf+db7wh90emntfgvunjs0xzpzarpqzqcov9k6ze80wjs0kjz+hfpj+nkvrkpo7dzdyclgssscm+ugucnrf+deqbpq+bdo9o0dhavclfuloq068mrobznfgoqmsxawbhxbtkcomdrna6abzgmnqqahqsz/nqqvnxqj0iblrg7adahqxj0fps+8qkmguitcmlhrmrbhylms+lo9mxseaeupr8x0yhg0ge8cywhlrula8fs6+0tlffqzhge0/y8lpgttjqnou0aptxpufkumtgdwm/ssgdaci7rzsbzbi/ygmcufaxbmwwp7xbbx0sarxqjlczrvxufsyzj6fjjsxozoasbp8g+qphwwqmwrcvvdopzctaf8pjajdryk+euyvwlxxhgngrbka6csdfi76kmovk8dtcdvtamdwstdhyzgy7oxxcfxo8o98/hwlwenpccvsiseamjl9ij/qj977p7yfq/kdevdadau6fwvjxmgvmraumpcdqa==</laexi> <laexi sha_base6="xucluoowywddz7b+9lleqh6s=">aaadvicjvjdaxnbfjnmb0ay++nixkbfjlwchvapiocbezqkalhdvzumnrdjszmyys+rx+gl/v/tx6gwawppiwfu+eec+fsqkzkyz/wuvurf+db7wh90emntfgvunjs0xzpzarpqzqcov9k6ze80wjs0kjz+hfpj+nkvrkpo7dzdyclgssscm+ugucnrf+deqbpq+bdo9o0dhavclfuloq068mrobznfgoqmsxawbhxbtkcomdrna6abzgmnqqahqsz/nqqvnxqj0iblrg7adahqxj0fps+8qkmguitcmlhrmrbhylms+lo9mxseaeupr8x0yhg0ge8cywhlrula8fs6+0tlffqzhge0/y8lpgttjqnou0aptxpufkumtgdwm/ssgdaci7rzsbzbi/ygmcufaxbmwwp7xbbx0sarxqjlczrvxufsyzj6fjjsxozoasbp8g+qphwwqmwrcvvdopzctaf8pjajdryk+euyvwlxxhgngrbka6csdfi76kmovk8dtcdvtamdwstdhyzgy7oxxcfxo8o98/hwlwenpccvsiseamjl9ij/qj977p7yfq/kdevdadau6fwvjxmgvmraumpcdqa==</laexi> Shores pahs wih negaive weighs: dynamic programming Shores pahs wih negaive weighs: implemenaion Def. OPT(i, v) = lengh of shores v pah ha uses i edges. Goal. OPT(n, v) for each v. Case. Shores v pah uses i edges. OPT(i, v) = OPT(i, v). Case. Shores v pah uses exacly i edges. if (v, w) is firs edge in shores such v pah, incur a cos of vw. Then, selec bes w pah using i edges. Bellman equaion. by Lemma, if no negaive cycles, here exiss a shores v pah ha is simple opimal subsrucure propery (proof via exchange argumen) 0 i =0 v = SHORTEST-PATHS(V, E,, ) FOREACH node v V : M [0, v]. M [0, ] 0. FOR i = TO n FOREACH node v V : M [i, v] M [i, v]. FOREACH edge (v, w) E : M [i, v] min { M [i, v], M [i, w] + vw }. OPT(i, v) = i =0 v = min OPT(i,v), min (v,w) E {OPT(i,w)+ vw} i>0 9 0 Shores pahs wih negaive weighs: implemenaion Dynamic programming: quiz 6 Theorem. Given a digraph G = (V, E) wih no negaive cycles, he DP algorihm compues he lengh of a shores v pah for every node v in Θ(mn) ime and Θ(n ) space. Table requires Θ(n ) space. Each ieraion i akes Θ(m) ime since we examine each edge once. Finding he shores pahs. Approach : Mainain successor[i, v] ha poins o nex node on a shores v pah using i edges. Approach : Compue opimal lenghs M[i, v] and consider only edges wih M[i, v] = M[i, w] + vw. Any direced pah in his subgraph is a shores pah. I is easy o modify he DP algorihm for shores pahs o A. Compue lenghs of shores pahs in O(mn) ime and O(m + n) space. B. Compue shores pahs in O(mn) ime and O(m + n) space. C. Boh A and B. D. Neiher A nor B.

11 Shores pahs wih negaive weighs: pracical improvemens Bellman Ford Moore: efficien implemenaion Space opimizaion. Mainain wo D arrays (insead of D array). d[v] = lengh of a shores v pah ha we have found so far. successor[v] = nex node on a v pah. Performance opimizaion. If d[w] was no updaed in ieraion i, hen no reason o consider edges enering w in ieraion i. BELLMAN FORD MOORE(V, E, c, ) FOREACH node v V : d[v]. successor[v] null. d[] 0. FOR i = TO n FOREACH node w V : IF (d[w] was updaed in previous pass) FOREACH edge (v, w) E : IF (d[v] > d[w] + vw ) pass i O(m) ime d[v] d[w] + vw. successor[v] w. IF (no d[ ] value changed in pass i) STOP. Dynamic programming: quiz 7 Bellman Ford Moore: analysis Which properies mus hold afer pass i of Bellman Ford Moore? A. d[v] = lengh of a shores v pah using i edges. B. d[v] = lengh of a shores v pah using exacly i edges. C. Boh A and B. D. Neiher A nor B. d[v] = v d[w] = w if node w considered before node v, hen d[v] = afer pass d[] = 0 Lemma. For each node v : d[v] is he lengh of some v pah. Lemma. For each node v : d[v] is monoone non-increasing. Lemma. Afer pass i, d[v] lengh of a shores v pah using i edges. [ by inducion on i ] Base case: i = 0. Assume rue afer pass i. Le P be any v pah wih i + edges. Le (v, w) be firs edge in P and le Pʹ be subpah from w o. By inducive hypohesis, a he end of pass i, d[w] c(pʹ) because Pʹ is a w pah wih i edges. Afer considering edge (v, w) in pass i + : and by Lemma, d[v] does no increase d[v] vw + d[w] vw + c(pʹ) = (P) and by Lemma, d[w] does no increase 6

12 Bellman Ford Moore: analysis Dynamic programming: quiz 8 Theorem. Assuming no negaive cycles, Bellman Ford Moore compues he lenghs of he shores v pahs in O(mn) ime and Θ(n) exra space. Lemma + Lemma. shores pah exiss and has a mos n edges afer i passes, d[v] lengh of shores pah ha uses i edges Remark. Bellman Ford Moore is ypically faser in pracice. Edge (v, w) considered in pass i + only if d[w] updaed in pass i. If shores pah has k edges, hen algorihm finds i afer k passes. Assuming no negaive cycles, which properies mus hold hroughou Bellman Ford Moore? A. Following successor[v] poiners gives a direced v pah. B. If following successor[v] poiners gives a direced v pah, hen he lengh of ha v pah is d[v]. C. Boh A and B. D. Neiher A nor B. 7 8 Bellman Ford Moore: analysis Bellman Ford Moore: analysis Claim. Throughou Bellman Ford Moore, following he successor[v] poiners gives a direced pah from v o of lengh d[v]. Counerexample. Claim is false! Lengh of successor v pah may be sricly shorer han d[v]. Claim. Throughou Bellman Ford Moore, following he successor[v] poiners gives a direced pah from v o of lengh d[v]. Counerexample. Claim is false! Lengh of successor v pah may be sricly shorer han d[v]. consider nodes in order:,,, consider nodes in order:,,, successor[] = d[] = 0 successor[] = d[] = 0 d[] = 0 successor[] = successor[] = d[] = 0 d[] = d[] = successor[] = d[] = 9 successor[] = d[] = 0

13 Bellman Ford Moore: analysis Bellman Ford Moore: analysis Claim. Throughou Bellman Ford Moore, following he successor[v] poiners gives a direced pah from v o of lengh d[v]. Counerexample. Claim is false! Lengh of successor v pah may be sricly shorer han d[v]. If negaive cycle, successor graph may have direced cycles. Claim. Throughou Bellman Ford Moore, following he successor[v] poiners gives a direced pah from v o of lengh d[v]. Counerexample. Claim is false! Lengh of successor v pah may be sricly shorer han d[v]. If negaive cycle, successor graph may have direced cycles. consider nodes in order:,,,, consider nodes in order:,,,, d[] = 0 d[] = 8 d[] = 0 d[] = 8 9 d[] = 0 9 d[] = d[] = d[] = d[] = d[] = Bellman Ford Moore: finding he shores pahs Bellman Ford Moore: finding he shores pahs Lemma 6. Any direced cycle W in he successor graph is a negaive cycle. If successor[v] = w, we mus have d[v] d[w] + vw. (LHS and RHS are equal when successor[v] is se; d[w] can only decrease; d[v] decreases only when successor[v] is rese) Le v v vk v be he sequence of nodes in a direced cycle W. Assume ha (v k, v ) is he las edge in W added o he successor graph. Jus prior o ha: d[v ] d[v ] + (v, v ) d[v ] d[v ] + (v, v ) d[vk ] d[vk] + (vk, vk) d[vk] > d[v] + (vk, v) holds wih sric inequaliy since we are updaing d[vk] Adding inequaliies yields (v, v) + (v, v) + + (vk, vk) + (vk, v) < 0. Theorem. Assuming no negaive cycles, Bellman Ford Moore finds shores v pahs for every node v in O(mn) ime and Θ(n) exra space. The successor graph canno have a direced cycle. [Lemma 6] Thus, following he successor poiners from v yields a direced pah o. Le v = v v v k = be he nodes along his pah P. Upon erminaion, if successor[v] = w, we mus have d[v] = d[w] + vw. (LHS and RHS are equal when successor[v] is se; d[ ] did no change) Thus, d[v ] = d[v ] + (v, v ) d[v] = d[v] + (v, v) d[vk ] = d[vk] + (vk, vk) since algorihm erminaed Adding equaions yields d[v] = d[] + (v, v) + (v, v) + + (vk, vk). W is a negaive cycle min lengh of any v pah (Theorem ) 0 lengh of pah P

14 Single-source shores pahs wih negaive weighs year wors case discovered by 9 O(n ) Shimbel 96 O(m n W) Ford 98 O(m n) Bellman, Moore 98 O(n / m log W) Gabow 989 O(m n / log(nw)) Gabow Tarjan 99 O(m n / log W) Goldberg 6. DYNAMIC PROGRAMMING II sequence alignmen Hirschberg s algorihm Bellman Ford Moore algorihm disance-vecor proocols negaive cycles 00 O(n.8 W) Sankowsi, Yuser Zwick 06 Õ(n 0/7 log W) Cohen Mądry Sankowski Vladu 0xx SECTION 6.9 single-source shores pahs wih weighs beween W and W Disance-vecor rouing proocols Disance-vecor rouing proocols Communicaion nework. Node rouer. Edge direc communicaion link. Lengh of edge laency of link. non-negaive, bu Bellman Ford Moore used anyway! Dijksra s algorihm. Requires global informaion of nework. Bellman Ford Moore. Uses only local knowledge of neighboring nodes. Synchronizaion. We don expec rouers o run in locksep. The order in which each edges are processed in Bellman Ford Moore is no imporan. Moreover, algorihm converges even if updaes are asynchronous. Disance-vecor rouing proocols. [ rouing by rumor ] Each rouer mainains a vecor of shores-pah lenghs o every oher node (disances) and he firs hop on each pah (direcions). Algorihm: each rouer performs n separae compuaions, one for each poenial desinaion node. Ex. RIP, Xerox XNS RIP, Novell s IPX RIP, Cisco s IGRP, DEC s DNA Phase IV, AppleTalk s RTMP. Cavea. Edge lenghs may change during algorihm (or fail compleely). suppose his edge ges deleed s v d(s) = d(v) = d() = 0 7 couning o infiniy 8

15 Pah-vecor rouing proocols Link-sae rouing proocols. Each rouer sores he whole nework opology. Based on Dijksra s algorihm. Avoids couning-o-infiniy problem and relaed difficulies. Requires significanly more sorage. no jus he disance and firs hop Ex. Border Gaeway Proocol (BGP), Open Shores Pah Firs (OSPF). 6. DYNAMIC PROGRAMMING II sequence alignmen Hirschberg s algorihm Bellman Ford Moore algorihm disance vecor proocol negaive cycles SECTION Deecing negaive cycles Deecing negaive cycles: applicaion Negaive cycle deecion problem. Given a digraph G = (V, E), wih edge lenghs vw, find a negaive cycle (if one exiss). Currency conversion. Given n currencies and exchange raes beween pairs of currencies, is here an arbirage opporuniy? Remark. Fases algorihm very valuable! 0.7 *.66 *.99 = EUR USD GBP CAD CHF 6 6

16 Deecing negaive cycles Deecing negaive cycles Lemma 7. If OPT(n, v) = OPT(n, v) for every node v, hen no negaive cycles. The OPT(n, v) values have converged shores v pah exiss. Lemma 8. If OPT(n, v) < OPT(n, v) for some node v, hen (any) shores v pah of lengh n conains a cycle W. Moreover W is a negaive cycle. [by conradicion] Since OPT(n, v) < OPT(n, v), we know ha shores v pah P has exacly n edges. By pigeonhole principle, he pah P mus conain a repeaed node x. Le W be any cycle in P. Deleing W yields a v pah wih < n edges W is a negaive cycle. Theorem. Can find a negaive cycle in Θ(mn) ime and Θ(n ) space. Add new sink node and connec all nodes o wih 0-lengh edge. G has a negaive cycle iff Gʹ has a negaive cycle. Case. [ OPT(n, v) = OPT(n, v) for every node v ] By Lemma 7, no negaive cycles. Case. [ OPT(n, v) < OPT(n, v) for some node v ] Using proof of Lemma 8, can exrac negaive cycle from v pah. (cycle canno conain since no edge leaves ) 6 0 G v x W c(w) < Deecing negaive cycles Dynamic programming: quiz 9 Theorem. Can find a negaive cycle in O(mn) ime and O(n) exra space. Run Bellman Ford Moore on Gʹ for nʹ = n + passes (insead of nʹ ). If no d[v] values updaed in pass nʹ, hen no negaive cycles. Oherwise, suppose d[s] updaed in pass nʹ. Define pass(v) = las pass in which d[v] was updaed. Observe pass(s) = nʹ and pass(successor[v]) pass(v) for each v. Following successor poiners, we mus evenually repea a node. Lemma 6 he corresponding cycle is a negaive cycle. Remark. See p. 0 for improved version and early erminaion rule. (Tarjan s subree disassembly rick) How difficul o find a negaive cycle in an undireced graph? A. O(m log n) B. O(mn) C. O(mn + n log n) D. O(n.8 ) E. No poly-ime algorihm is known. Daa Srucures for Weighed Maching and Neares Common Ancesors wih Linking Harold N. Gabow* Absrac. This paper shows ha he weighed maching problem on general graphs can be solved in ime O(n(m + n log n)), f or n and m he number of verices and edges, respecively. This was previously known only for biparie graphs. I also shows ha a sequence of m nca and link operaions on n nodes can be processed on-line in ime O(ma(m, n)+n). This was previously known only for a resriced ype of link operaion. 6 66

6. DYNAMIC PROGRAMMING II

6. DYNAMIC PROGRAMMING II 6. DYNAMIC PROGRAMMING II sequence alignmen Hirschberg s algorihm Bellman Ford algorihm disance vecor proocols negaive cycles in a digraph 6. DYNAMIC PROGRAMMING II sequence alignmen Hirschberg s algorihm

More information

6. DYNAMIC PROGRAMMING II

6. DYNAMIC PROGRAMMING II 6. DYNAMIC PROGRAMMING II sequence alignmen Hirschberg's algorihm Bellman-Ford algorihm disance vecor proocols negaive cycles in a digraph 6. DYNAMIC PROGRAMMING II sequence alignmen Hirschberg's algorihm

More information

6. DYNAMIC PROGRAMMING II

6. DYNAMIC PROGRAMMING II 6. DYNAMIC PROGRAMMING II sequence alignment Hirschberg's algorithm Bellman-Ford algorithm distance vector protocols negative cycles in a digraph Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison

More information

6. DYNAMIC PROGRAMMING II. sequence alignment Hirschberg's algorithm Bellman-Ford distance vector protocols negative cycles in a digraph

6. DYNAMIC PROGRAMMING II. sequence alignment Hirschberg's algorithm Bellman-Ford distance vector protocols negative cycles in a digraph 6. DYNAMIC PROGRAMMING II sequence alignment Hirschberg's algorithm Bellman-Ford distance vector protocols negative cycles in a digraph Shortest paths Shortest path problem. Given a digraph G = (V, E),

More information

Dynamic Programming 11/8/2009. Weighted Interval Scheduling. Weighted Interval Scheduling. Unweighted Interval Scheduling: Review

Dynamic Programming 11/8/2009. Weighted Interval Scheduling. Weighted Interval Scheduling. Unweighted Interval Scheduling: Review //9 Algorihms Dynamic Programming - Weighed Ineral Scheduling Dynamic Programming Weighed ineral scheduling problem. Insance A se of n jobs. Job j sars a s j, finishes a f j, and has weigh or alue j. Two

More information

Chapter 6. Dynamic Programming. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

Chapter 6. Dynamic Programming. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved. Chapter 6 Dynamic Programming Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved. 1 6.8 Shortest Paths Shortest Paths Shortest path problem. Given a directed graph G = (V,

More information

Longest Common Prefixes

Longest Common Prefixes Longes Common Prefixes The sandard ordering for srings is he lexicographical order. I is induced by an order over he alphabe. We will use he same symbols (,

More information

Random Walk with Anti-Correlated Steps

Random Walk with Anti-Correlated Steps Random Walk wih Ani-Correlaed Seps John Noga Dirk Wagner 2 Absrac We conjecure he expeced value of random walks wih ani-correlaed seps o be exacly. We suppor his conjecure wih 2 plausibiliy argumens and

More information

Stationary Distribution. Design and Analysis of Algorithms Andrei Bulatov

Stationary Distribution. Design and Analysis of Algorithms Andrei Bulatov Saionary Disribuion Design and Analysis of Algorihms Andrei Bulaov Algorihms Markov Chains 34-2 Classificaion of Saes k By P we denoe he (i,j)-enry of i, j Sae is accessible from sae if 0 for some k 0

More information

Data Structures and Algorithms CMPSC 465

Data Structures and Algorithms CMPSC 465 ata Structures and Algorithms MPS LTUR ellman-ford Shortest Paths Algorithm etecting Negative ost ycles Adam Smith // A. Smith; based on slides by K. Wayne,. Leiserson,. emaine L. Negative Weight dges

More information

1 Review of Zero-Sum Games

1 Review of Zero-Sum Games COS 5: heoreical Machine Learning Lecurer: Rob Schapire Lecure #23 Scribe: Eugene Brevdo April 30, 2008 Review of Zero-Sum Games Las ime we inroduced a mahemaical model for wo player zero-sum games. Any

More information

16 Max-Flow Algorithms

16 Max-Flow Algorithms A process canno be undersood by sopping i. Undersanding mus move wih he flow of he process, mus join i and flow wih i. The Firs Law of Mena, in Frank Herber s Dune (196) There s a difference beween knowing

More information

6.6 Sequence Alignment

6.6 Sequence Alignment 6.6 Sequence Alignment String Similarity How similar are two strings? ocurrance o c u r r a n c e - occurrence First model the problem Q. How can we measure the distance? o c c u r r e n c e 6 mismatches,

More information

CSE 202 Dynamic Programming II

CSE 202 Dynamic Programming II CSE 202 Dynamic Programming II Chapter 6 Dynamic Programming Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved. 1 Algorithmic Paradigms Greed. Build up a solution incrementally,

More information

Lecture 2-1 Kinematics in One Dimension Displacement, Velocity and Acceleration Everything in the world is moving. Nothing stays still.

Lecture 2-1 Kinematics in One Dimension Displacement, Velocity and Acceleration Everything in the world is moving. Nothing stays still. Lecure - Kinemaics in One Dimension Displacemen, Velociy and Acceleraion Everyhing in he world is moving. Nohing says sill. Moion occurs a all scales of he universe, saring from he moion of elecrons in

More information

Designing Information Devices and Systems I Spring 2019 Lecture Notes Note 17

Designing Information Devices and Systems I Spring 2019 Lecture Notes Note 17 EES 16A Designing Informaion Devices and Sysems I Spring 019 Lecure Noes Noe 17 17.1 apaciive ouchscreen In he las noe, we saw ha a capacior consiss of wo pieces on conducive maerial separaed by a nonconducive

More information

We just finished the Erdős-Stone Theorem, and ex(n, F ) (1 1/(χ(F ) 1)) ( n

We just finished the Erdős-Stone Theorem, and ex(n, F ) (1 1/(χ(F ) 1)) ( n Lecure 3 - Kövari-Sós-Turán Theorem Jacques Versraëe jacques@ucsd.edu We jus finished he Erdős-Sone Theorem, and ex(n, F ) ( /(χ(f ) )) ( n 2). So we have asympoics when χ(f ) 3 bu no when χ(f ) = 2 i.e.

More information

An Introduction to Malliavin calculus and its applications

An Introduction to Malliavin calculus and its applications An Inroducion o Malliavin calculus and is applicaions Lecure 5: Smoohness of he densiy and Hörmander s heorem David Nualar Deparmen of Mahemaics Kansas Universiy Universiy of Wyoming Summer School 214

More information

Ensamble methods: Boosting

Ensamble methods: Boosting Lecure 21 Ensamble mehods: Boosing Milos Hauskrech milos@cs.pi.edu 5329 Senno Square Schedule Final exam: April 18: 1:00-2:15pm, in-class Term projecs April 23 & April 25: a 1:00-2:30pm in CS seminar room

More information

A Primal-Dual Type Algorithm with the O(1/t) Convergence Rate for Large Scale Constrained Convex Programs

A Primal-Dual Type Algorithm with the O(1/t) Convergence Rate for Large Scale Constrained Convex Programs PROC. IEEE CONFERENCE ON DECISION AND CONTROL, 06 A Primal-Dual Type Algorihm wih he O(/) Convergence Rae for Large Scale Consrained Convex Programs Hao Yu and Michael J. Neely Absrac This paper considers

More information

Traversal of a subtree is slow, which affects prefix and range queries.

Traversal of a subtree is slow, which affects prefix and range queries. Compac Tries Tries suffer from a large number nodes, Ω( R ) in he wors case. The space requiremen is large, since each node needs much more space han a single symbol. Traversal of a subree is slow, which

More information

EXERCISES FOR SECTION 1.5

EXERCISES FOR SECTION 1.5 1.5 Exisence and Uniqueness of Soluions 43 20. 1 v c 21. 1 v c 1 2 4 6 8 10 1 2 2 4 6 8 10 Graph of approximae soluion obained using Euler s mehod wih = 0.1. Graph of approximae soluion obained using Euler

More information

Finish reading Chapter 2 of Spivak, rereading earlier sections as necessary. handout and fill in some missing details!

Finish reading Chapter 2 of Spivak, rereading earlier sections as necessary. handout and fill in some missing details! MAT 257, Handou 6: Ocober 7-2, 20. I. Assignmen. Finish reading Chaper 2 of Spiva, rereading earlier secions as necessary. handou and fill in some missing deails! II. Higher derivaives. Also, read his

More information

The Asymptotic Behavior of Nonoscillatory Solutions of Some Nonlinear Dynamic Equations on Time Scales

The Asymptotic Behavior of Nonoscillatory Solutions of Some Nonlinear Dynamic Equations on Time Scales Advances in Dynamical Sysems and Applicaions. ISSN 0973-5321 Volume 1 Number 1 (2006, pp. 103 112 c Research India Publicaions hp://www.ripublicaion.com/adsa.hm The Asympoic Behavior of Nonoscillaory Soluions

More information

Course Notes for EE227C (Spring 2018): Convex Optimization and Approximation

Course Notes for EE227C (Spring 2018): Convex Optimization and Approximation Course Noes for EE7C Spring 018: Convex Opimizaion and Approximaion Insrucor: Moriz Hard Email: hard+ee7c@berkeley.edu Graduae Insrucor: Max Simchowiz Email: msimchow+ee7c@berkeley.edu Ocober 15, 018 3

More information

Ensamble methods: Bagging and Boosting

Ensamble methods: Bagging and Boosting Lecure 21 Ensamble mehods: Bagging and Boosing Milos Hauskrech milos@cs.pi.edu 5329 Senno Square Ensemble mehods Mixure of expers Muliple base models (classifiers, regressors), each covers a differen par

More information

Chapter 6. Dynamic Programming. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

Chapter 6. Dynamic Programming. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved. Chapter 6 Dynamic Programming Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved. 1 Algorithmic Paradigms Greed. Build up a solution incrementally, myopically optimizing

More information

Some Ramsey results for the n-cube

Some Ramsey results for the n-cube Some Ramsey resuls for he n-cube Ron Graham Universiy of California, San Diego Jozsef Solymosi Universiy of Briish Columbia, Vancouver, Canada Absrac In his noe we esablish a Ramsey-ype resul for cerain

More information

THE MATRIX-TREE THEOREM

THE MATRIX-TREE THEOREM THE MATRIX-TREE THEOREM 1 The Marix-Tree Theorem. The Marix-Tree Theorem is a formula for he number of spanning rees of a graph in erms of he deerminan of a cerain marix. We begin wih he necessary graph-heoreical

More information

CMU-Q Lecture 3: Search algorithms: Informed. Teacher: Gianni A. Di Caro

CMU-Q Lecture 3: Search algorithms: Informed. Teacher: Gianni A. Di Caro CMU-Q 5-38 Lecure 3: Search algorihms: Informed Teacher: Gianni A. Di Caro UNINFORMED VS. INFORMED SEARCH Sraegy How desirable is o be in a cerain inermediae sae for he sake of (effecively) reaching a

More information

Instructor: Barry McQuarrie Page 1 of 5

Instructor: Barry McQuarrie Page 1 of 5 Procedure for Solving radical equaions 1. Algebraically isolae one radical by iself on one side of equal sign. 2. Raise each side of he equaion o an appropriae power o remove he radical. 3. Simplify. 4.

More information

MATH 5720: Gradient Methods Hung Phan, UMass Lowell October 4, 2018

MATH 5720: Gradient Methods Hung Phan, UMass Lowell October 4, 2018 MATH 5720: Gradien Mehods Hung Phan, UMass Lowell Ocober 4, 208 Descen Direcion Mehods Consider he problem min { f(x) x R n}. The general descen direcions mehod is x k+ = x k + k d k where x k is he curren

More information

Randomized Perfect Bipartite Matching

Randomized Perfect Bipartite Matching Inenive Algorihm Lecure 24 Randomized Perfec Biparie Maching Lecurer: Daniel A. Spielman April 9, 208 24. Inroducion We explain a randomized algorihm by Ahih Goel, Michael Kapralov and Sanjeev Khanna for

More information

Two Coupled Oscillators / Normal Modes

Two Coupled Oscillators / Normal Modes Lecure 3 Phys 3750 Two Coupled Oscillaors / Normal Modes Overview and Moivaion: Today we ake a small, bu significan, sep owards wave moion. We will no ye observe waves, bu his sep is imporan in is own

More information

Max Flow, Min Cut COS 521. Kevin Wayne Fall Soviet Rail Network, Cuts. Minimum Cut Problem. Flow network.

Max Flow, Min Cut COS 521. Kevin Wayne Fall Soviet Rail Network, Cuts. Minimum Cut Problem. Flow network. Sovie Rail Nework, Max Flow, Min u OS Kevin Wayne Fall Reference: On he hiory of he ranporaion and maximum flow problem. lexander Schrijver in Mah Programming, :,. Minimum u Problem u Flow nework.! Digraph

More information

A Hop Constrained Min-Sum Arborescence with Outage Costs

A Hop Constrained Min-Sum Arborescence with Outage Costs A Hop Consrained Min-Sum Arborescence wih Ouage Coss Rakesh Kawara Minnesoa Sae Universiy, Mankao, MN 56001 Email: Kawara@mnsu.edu Absrac The hop consrained min-sum arborescence wih ouage coss problem

More information

SOLUTIONS TO ECE 3084

SOLUTIONS TO ECE 3084 SOLUTIONS TO ECE 384 PROBLEM 2.. For each sysem below, specify wheher or no i is: (i) memoryless; (ii) causal; (iii) inverible; (iv) linear; (v) ime invarian; Explain your reasoning. If he propery is no

More information

Languages That Are and Are Not Context-Free

Languages That Are and Are Not Context-Free Languages Tha re and re No Conex-Free Read K & S 3.5, 3.6, 3.7. Read Supplemenary Maerials: Conex-Free Languages and Pushdown uomaa: Closure Properies of Conex-Free Languages Read Supplemenary Maerials:

More information

Oscillation of an Euler Cauchy Dynamic Equation S. Huff, G. Olumolode, N. Pennington, and A. Peterson

Oscillation of an Euler Cauchy Dynamic Equation S. Huff, G. Olumolode, N. Pennington, and A. Peterson PROCEEDINGS OF THE FOURTH INTERNATIONAL CONFERENCE ON DYNAMICAL SYSTEMS AND DIFFERENTIAL EQUATIONS May 4 7, 00, Wilmingon, NC, USA pp 0 Oscillaion of an Euler Cauchy Dynamic Equaion S Huff, G Olumolode,

More information

Stopping Set Elimination for LDPC Codes

Stopping Set Elimination for LDPC Codes Sopping Se Eliminaion for LDPC Codes Anxiao (Andrew) Jiang, Pulakesh Upadhyaya, Ying Wang, Krishna R. Narayanan Hongchao Zhou, Jin Sima, and Jehoshua Bruck Compuer Science and Engineering Deparmen, Texas

More information

Lecture 2 October ε-approximation of 2-player zero-sum games

Lecture 2 October ε-approximation of 2-player zero-sum games Opimizaion II Winer 009/10 Lecurer: Khaled Elbassioni Lecure Ocober 19 1 ε-approximaion of -player zero-sum games In his lecure we give a randomized ficiious play algorihm for obaining an approximae soluion

More information

A Note on Superlinear Ambrosetti-Prodi Type Problem in a Ball

A Note on Superlinear Ambrosetti-Prodi Type Problem in a Ball A Noe on Superlinear Ambrosei-Prodi Type Problem in a Ball by P. N. Srikanh 1, Sanjiban Sanra 2 Absrac Using a careful analysis of he Morse Indices of he soluions obained by using he Mounain Pass Theorem

More information

Vehicle Arrival Models : Headway

Vehicle Arrival Models : Headway Chaper 12 Vehicle Arrival Models : Headway 12.1 Inroducion Modelling arrival of vehicle a secion of road is an imporan sep in raffic flow modelling. I has imporan applicaion in raffic flow simulaion where

More information

23.2. Representing Periodic Functions by Fourier Series. Introduction. Prerequisites. Learning Outcomes

23.2. Representing Periodic Functions by Fourier Series. Introduction. Prerequisites. Learning Outcomes Represening Periodic Funcions by Fourier Series 3. Inroducion In his Secion we show how a periodic funcion can be expressed as a series of sines and cosines. We begin by obaining some sandard inegrals

More information

Approximation Algorithms for Unique Games via Orthogonal Separators

Approximation Algorithms for Unique Games via Orthogonal Separators Approximaion Algorihms for Unique Games via Orhogonal Separaors Lecure noes by Konsanin Makarychev. Lecure noes are based on he papers [CMM06a, CMM06b, LM4]. Unique Games In hese lecure noes, we define

More information

Viterbi Algorithm: Background

Viterbi Algorithm: Background Vierbi Algorihm: Background Jean Mark Gawron March 24, 2014 1 The Key propery of an HMM Wha is an HMM. Formally, i has he following ingrediens: 1. a se of saes: S 2. a se of final saes: F 3. an iniial

More information

Robot Motion Model EKF based Localization EKF SLAM Graph SLAM

Robot Motion Model EKF based Localization EKF SLAM Graph SLAM Robo Moion Model EKF based Localizaion EKF SLAM Graph SLAM General Robo Moion Model Robo sae v r Conrol a ime Sae updae model Noise model of robo conrol Noise model of conrol Robo moion model

More information

Christos Papadimitriou & Luca Trevisan November 22, 2016

Christos Papadimitriou & Luca Trevisan November 22, 2016 U.C. Bereley CS170: Algorihms Handou LN-11-22 Chrisos Papadimiriou & Luca Trevisan November 22, 2016 Sreaming algorihms In his lecure and he nex one we sudy memory-efficien algorihms ha process a sream

More information

Extending the Four Russian Algorithm to Compute the Edit Script in Linear Space. Abstract

Extending the Four Russian Algorithm to Compute the Edit Script in Linear Space. Abstract Exing he Four Russian Algorihm o Compue he Edi Scrip in Linear Space Vamsi Kundei (vamsik@engr.uconn.edu) CSE Deparmen Universiy of Connecicu Sorrs,CT Sanguhevar Rajasekaran (rajasek@engr.uconn.edu) CSE

More information

The Residual Graph. 11 Augmenting Path Algorithms. Augmenting Path Algorithm. Augmenting Path Algorithm

The Residual Graph. 11 Augmenting Path Algorithms. Augmenting Path Algorithm. Augmenting Path Algorithm Augmening Pah Algorihm Greedy-algorihm: ar wih f (e) = everywhere find an - pah wih f (e) < c(e) on every edge augmen flow along he pah repea a long a poible The Reidual Graph From he graph G = (V, E,

More information

MATH 128A, SUMMER 2009, FINAL EXAM SOLUTION

MATH 128A, SUMMER 2009, FINAL EXAM SOLUTION MATH 28A, SUMME 2009, FINAL EXAM SOLUTION BENJAMIN JOHNSON () (8 poins) [Lagrange Inerpolaion] (a) (4 poins) Le f be a funcion defined a some real numbers x 0,..., x n. Give a defining equaion for he Lagrange

More information

3.1 More on model selection

3.1 More on model selection 3. More on Model selecion 3. Comparing models AIC, BIC, Adjused R squared. 3. Over Fiing problem. 3.3 Sample spliing. 3. More on model selecion crieria Ofen afer model fiing you are lef wih a handful of

More information

Solutions from Chapter 9.1 and 9.2

Solutions from Chapter 9.1 and 9.2 Soluions from Chaper 9 and 92 Secion 9 Problem # This basically boils down o an exercise in he chain rule from calculus We are looking for soluions of he form: u( x) = f( k x c) where k x R 3 and k is

More information

Algorithmic Discrete Mathematics 6. Exercise Sheet

Algorithmic Discrete Mathematics 6. Exercise Sheet Algorihmic Dicree Mahemaic. Exercie Shee Deparmen of Mahemaic SS 0 PD Dr. Ulf Lorenz 7. and 8. Juni 0 Dipl.-Mah. David Meffer Verion of June, 0 Groupwork Exercie G (Heap-Sor) Ue Heap-Sor wih a min-heap

More information

The Residual Graph. 12 Augmenting Path Algorithms. Augmenting Path Algorithm. Augmenting Path Algorithm

The Residual Graph. 12 Augmenting Path Algorithms. Augmenting Path Algorithm. Augmenting Path Algorithm Augmening Pah Algorihm Greedy-algorihm: ar wih f (e) = everywhere find an - pah wih f (e) < c(e) on every edge augmen flow along he pah repea a long a poible The Reidual Graph From he graph G = (V, E,

More information

ODEs II, Lecture 1: Homogeneous Linear Systems - I. Mike Raugh 1. March 8, 2004

ODEs II, Lecture 1: Homogeneous Linear Systems - I. Mike Raugh 1. March 8, 2004 ODEs II, Lecure : Homogeneous Linear Sysems - I Mike Raugh March 8, 4 Inroducion. In he firs lecure we discussed a sysem of linear ODEs for modeling he excreion of lead from he human body, saw how o ransform

More information

Essential Microeconomics : OPTIMAL CONTROL 1. Consider the following class of optimization problems

Essential Microeconomics : OPTIMAL CONTROL 1. Consider the following class of optimization problems Essenial Microeconomics -- 6.5: OPIMAL CONROL Consider he following class of opimizaion problems Max{ U( k, x) + U+ ( k+ ) k+ k F( k, x)}. { x, k+ } = In he language of conrol heory, he vecor k is he vecor

More information

2.7. Some common engineering functions. Introduction. Prerequisites. Learning Outcomes

2.7. Some common engineering functions. Introduction. Prerequisites. Learning Outcomes Some common engineering funcions 2.7 Inroducion This secion provides a caalogue of some common funcions ofen used in Science and Engineering. These include polynomials, raional funcions, he modulus funcion

More information

T L. t=1. Proof of Lemma 1. Using the marginal cost accounting in Equation(4) and standard arguments. t )+Π RB. t )+K 1(Q RB

T L. t=1. Proof of Lemma 1. Using the marginal cost accounting in Equation(4) and standard arguments. t )+Π RB. t )+K 1(Q RB Elecronic Companion EC.1. Proofs of Technical Lemmas and Theorems LEMMA 1. Le C(RB) be he oal cos incurred by he RB policy. Then we have, T L E[C(RB)] 3 E[Z RB ]. (EC.1) Proof of Lemma 1. Using he marginal

More information

Section 3.5 Nonhomogeneous Equations; Method of Undetermined Coefficients

Section 3.5 Nonhomogeneous Equations; Method of Undetermined Coefficients Secion 3.5 Nonhomogeneous Equaions; Mehod of Undeermined Coefficiens Key Terms/Ideas: Linear Differenial operaor Nonlinear operaor Second order homogeneous DE Second order nonhomogeneous DE Soluion o homogeneous

More information

Online Convex Optimization Example And Follow-The-Leader

Online Convex Optimization Example And Follow-The-Leader CSE599s, Spring 2014, Online Learning Lecure 2-04/03/2014 Online Convex Opimizaion Example And Follow-The-Leader Lecurer: Brendan McMahan Scribe: Sephen Joe Jonany 1 Review of Online Convex Opimizaion

More information

Inventory Analysis and Management. Multi-Period Stochastic Models: Optimality of (s, S) Policy for K-Convex Objective Functions

Inventory Analysis and Management. Multi-Period Stochastic Models: Optimality of (s, S) Policy for K-Convex Objective Functions Muli-Period Sochasic Models: Opimali of (s, S) Polic for -Convex Objecive Funcions Consider a seing similar o he N-sage newsvendor problem excep ha now here is a fixed re-ordering cos (> 0) for each (re-)order.

More information

Physics 235 Chapter 2. Chapter 2 Newtonian Mechanics Single Particle

Physics 235 Chapter 2. Chapter 2 Newtonian Mechanics Single Particle Chaper 2 Newonian Mechanics Single Paricle In his Chaper we will review wha Newon s laws of mechanics ell us abou he moion of a single paricle. Newon s laws are only valid in suiable reference frames,

More information

Isolated-word speech recognition using hidden Markov models

Isolated-word speech recognition using hidden Markov models Isolaed-word speech recogniion using hidden Markov models Håkon Sandsmark December 18, 21 1 Inroducion Speech recogniion is a challenging problem on which much work has been done he las decades. Some of

More information

Supplement for Stochastic Convex Optimization: Faster Local Growth Implies Faster Global Convergence

Supplement for Stochastic Convex Optimization: Faster Local Growth Implies Faster Global Convergence Supplemen for Sochasic Convex Opimizaion: Faser Local Growh Implies Faser Global Convergence Yi Xu Qihang Lin ianbao Yang Proof of heorem heorem Suppose Assumpion holds and F (w) obeys he LGC (6) Given

More information

Adaptation and Synchronization over a Network: stabilization without a reference model

Adaptation and Synchronization over a Network: stabilization without a reference model Adapaion and Synchronizaion over a Nework: sabilizaion wihou a reference model Travis E. Gibson (gibson@mi.edu) Harvard Medical School Deparmen of Pahology, Brigham and Women s Hospial 55 h Conference

More information

CS 580: Algorithm Design and Analysis

CS 580: Algorithm Design and Analysis CS 58: Algorithm Design and Analysis Jeremiah Blocki Purdue University Spring 28 Announcement: Homework 3 due February 5 th at :59PM Midterm Exam: Wed, Feb 2 (8PM-PM) @ MTHW 2 Recap: Dynamic Programming

More information

Circuit Variables. AP 1.1 Use a product of ratios to convert two-thirds the speed of light from meters per second to miles per second: 1 ft 12 in

Circuit Variables. AP 1.1 Use a product of ratios to convert two-thirds the speed of light from meters per second to miles per second: 1 ft 12 in Circui Variables 1 Assessmen Problems AP 1.1 Use a produc of raios o conver wo-hirds he speed of ligh from meers per second o miles per second: ( ) 2 3 1 8 m 3 1 s 1 cm 1 m 1 in 2.54 cm 1 f 12 in 1 mile

More information

Linear Response Theory: The connection between QFT and experiments

Linear Response Theory: The connection between QFT and experiments Phys540.nb 39 3 Linear Response Theory: The connecion beween QFT and experimens 3.1. Basic conceps and ideas Q: How do we measure he conduciviy of a meal? A: we firs inroduce a weak elecric field E, and

More information

Notes for Lecture 17-18

Notes for Lecture 17-18 U.C. Berkeley CS278: Compuaional Complexiy Handou N7-8 Professor Luca Trevisan April 3-8, 2008 Noes for Lecure 7-8 In hese wo lecures we prove he firs half of he PCP Theorem, he Amplificaion Lemma, up

More information

Article from. Predictive Analytics and Futurism. July 2016 Issue 13

Article from. Predictive Analytics and Futurism. July 2016 Issue 13 Aricle from Predicive Analyics and Fuurism July 6 Issue An Inroducion o Incremenal Learning By Qiang Wu and Dave Snell Machine learning provides useful ools for predicive analyics The ypical machine learning

More information

Retrieval Models. Boolean and Vector Space Retrieval Models. Common Preprocessing Steps. Boolean Model. Boolean Retrieval Model

Retrieval Models. Boolean and Vector Space Retrieval Models. Common Preprocessing Steps. Boolean Model. Boolean Retrieval Model 1 Boolean and Vecor Space Rerieval Models Many slides in his secion are adaped from Prof. Joydeep Ghosh (UT ECE) who in urn adaped hem from Prof. Dik Lee (Univ. of Science and Tech, Hong Kong) Rerieval

More information

Notes on Kalman Filtering

Notes on Kalman Filtering Noes on Kalman Filering Brian Borchers and Rick Aser November 7, Inroducion Daa Assimilaion is he problem of merging model predicions wih acual measuremens of a sysem o produce an opimal esimae of he curren

More information

Some Basic Information about M-S-D Systems

Some Basic Information about M-S-D Systems Some Basic Informaion abou M-S-D Sysems 1 Inroducion We wan o give some summary of he facs concerning unforced (homogeneous) and forced (non-homogeneous) models for linear oscillaors governed by second-order,

More information

Lecture 20: Riccati Equations and Least Squares Feedback Control

Lecture 20: Riccati Equations and Least Squares Feedback Control 34-5 LINEAR SYSTEMS Lecure : Riccai Equaions and Leas Squares Feedback Conrol 5.6.4 Sae Feedback via Riccai Equaions A recursive approach in generaing he marix-valued funcion W ( ) equaion for i for he

More information

Math 10B: Mock Mid II. April 13, 2016

Math 10B: Mock Mid II. April 13, 2016 Name: Soluions Mah 10B: Mock Mid II April 13, 016 1. ( poins) Sae, wih jusificaion, wheher he following saemens are rue or false. (a) If a 3 3 marix A saisfies A 3 A = 0, hen i canno be inverible. True.

More information

Application of a Stochastic-Fuzzy Approach to Modeling Optimal Discrete Time Dynamical Systems by Using Large Scale Data Processing

Application of a Stochastic-Fuzzy Approach to Modeling Optimal Discrete Time Dynamical Systems by Using Large Scale Data Processing Applicaion of a Sochasic-Fuzzy Approach o Modeling Opimal Discree Time Dynamical Sysems by Using Large Scale Daa Processing AA WALASZE-BABISZEWSA Deparmen of Compuer Engineering Opole Universiy of Technology

More information

Optimal Embedding of Functions for In-Network Computation: Complexity Analysis and Algorithms

Optimal Embedding of Functions for In-Network Computation: Complexity Analysis and Algorithms 1 Opimal Embedding of Funcions for In-Nework Compuaion: Complexiy Analysis and Algorihms Pooja Vyavahare, Nuan Limaye, and D. Manjunah, Senior Member, IEEE arxiv:1401.2518v3 [cs.dc] 14 Jul 2015 Absrac

More information

1 Motivation and Basic Definitions

1 Motivation and Basic Definitions CSCE : Deign and Analyi of Algorihm Noe on Max Flow Fall 20 (Baed on he preenaion in Chaper 26 of Inroducion o Algorihm, 3rd Ed. by Cormen, Leieron, Rive and Sein.) Moivaion and Baic Definiion Conider

More information

Lecture 23: I. Data Dependence II. Dependence Testing: Formulation III. Dependence Testers IV. Loop Parallelization V.

Lecture 23: I. Data Dependence II. Dependence Testing: Formulation III. Dependence Testers IV. Loop Parallelization V. Lecure 23: Array Dependence Analysis & Parallelizaion I. Daa Dependence II. Dependence Tesing: Formulaion III. Dependence Tesers IV. Loop Parallelizaion V. Loop Inerchange [ALSU 11.6, 11.7.8] Phillip B.

More information

t is a basis for the solution space to this system, then the matrix having these solutions as columns, t x 1 t, x 2 t,... x n t x 2 t...

t is a basis for the solution space to this system, then the matrix having these solutions as columns, t x 1 t, x 2 t,... x n t x 2 t... Mah 228- Fri Mar 24 5.6 Marix exponenials and linear sysems: The analogy beween firs order sysems of linear differenial equaions (Chaper 5) and scalar linear differenial equaions (Chaper ) is much sronger

More information

Computer-Aided Analysis of Electronic Circuits Course Notes 3

Computer-Aided Analysis of Electronic Circuits Course Notes 3 Gheorghe Asachi Technical Universiy of Iasi Faculy of Elecronics, Telecommunicaions and Informaion Technologies Compuer-Aided Analysis of Elecronic Circuis Course Noes 3 Bachelor: Telecommunicaion Technologies

More information

Problem Set #1. i z. the complex propagation constant. For the characteristic impedance:

Problem Set #1. i z. the complex propagation constant. For the characteristic impedance: Problem Se # Problem : a) Using phasor noaion, calculae he volage and curren waves on a ransmission line by solving he wave equaion Assume ha R, L,, G are all non-zero and independen of frequency From

More information

Morning Time: 1 hour 30 minutes Additional materials (enclosed):

Morning Time: 1 hour 30 minutes Additional materials (enclosed): ADVANCED GCE 78/0 MATHEMATICS (MEI) Differenial Equaions THURSDAY JANUARY 008 Morning Time: hour 30 minues Addiional maerials (enclosed): None Addiional maerials (required): Answer Bookle (8 pages) Graph

More information

cs/ee 143 Communication Networks

cs/ee 143 Communication Networks cs/ee 143 Communicaion Neworks Chaper 3 Eherne Tex: Walrand & Parakh, 2010 Seven Low CMS, EE, Calech Warning These noes are no self-conained, probably no undersandable, unless you also were in he lecure

More information

Chapter 8 The Complete Response of RL and RC Circuits

Chapter 8 The Complete Response of RL and RC Circuits Chaper 8 The Complee Response of RL and RC Circuis Seoul Naional Universiy Deparmen of Elecrical and Compuer Engineering Wha is Firs Order Circuis? Circuis ha conain only one inducor or only one capacior

More information

PHYSICS 220 Lecture 02 Motion, Forces, and Newton s Laws Textbook Sections

PHYSICS 220 Lecture 02 Motion, Forces, and Newton s Laws Textbook Sections PHYSICS 220 Lecure 02 Moion, Forces, and Newon s Laws Texbook Secions 2.2-2.4 Lecure 2 Purdue Universiy, Physics 220 1 Overview Las Lecure Unis Scienific Noaion Significan Figures Moion Displacemen: Δx

More information

Matrix Versions of Some Refinements of the Arithmetic-Geometric Mean Inequality

Matrix Versions of Some Refinements of the Arithmetic-Geometric Mean Inequality Marix Versions of Some Refinemens of he Arihmeic-Geomeric Mean Inequaliy Bao Qi Feng and Andrew Tonge Absrac. We esablish marix versions of refinemens due o Alzer ], Carwrigh and Field 4], and Mercer 5]

More information

Flow networks. Flow Networks. A flow on a network. Flow networks. The maximum-flow problem. Introduction to Algorithms, Lecture 22 December 5, 2001

Flow networks. Flow Networks. A flow on a network. Flow networks. The maximum-flow problem. Introduction to Algorithms, Lecture 22 December 5, 2001 CS 545 Flow Nework lon Efra Slide courey of Charle Leieron wih mall change by Carola Wenk Flow nework Definiion. flow nework i a direced graph G = (V, E) wih wo diinguihed verice: a ource and a ink. Each

More information

Mathcad Lecture #8 In-class Worksheet Curve Fitting and Interpolation

Mathcad Lecture #8 In-class Worksheet Curve Fitting and Interpolation Mahcad Lecure #8 In-class Workshee Curve Fiing and Inerpolaion A he end of his lecure, you will be able o: explain he difference beween curve fiing and inerpolaion decide wheher curve fiing or inerpolaion

More information

A NOTE ON THE STRUCTURE OF BILATTICES. A. Avron. School of Mathematical Sciences. Sackler Faculty of Exact Sciences. Tel Aviv University

A NOTE ON THE STRUCTURE OF BILATTICES. A. Avron. School of Mathematical Sciences. Sackler Faculty of Exact Sciences. Tel Aviv University A NOTE ON THE STRUCTURE OF BILATTICES A. Avron School of Mahemaical Sciences Sacler Faculy of Exac Sciences Tel Aviv Universiy Tel Aviv 69978, Israel The noion of a bilaice was rs inroduced by Ginsburg

More information

This document was generated at 7:34 PM, 07/27/09 Copyright 2009 Richard T. Woodward

This document was generated at 7:34 PM, 07/27/09 Copyright 2009 Richard T. Woodward his documen was generaed a 7:34 PM, 07/27/09 Copyrigh 2009 Richard. Woodward 15. Bang-bang and mos rapid approach problems AGEC 637 - Summer 2009 here are some problems for which he opimal pah does no

More information

Let us start with a two dimensional case. We consider a vector ( x,

Let us start with a two dimensional case. We consider a vector ( x, Roaion marices We consider now roaion marices in wo and hree dimensions. We sar wih wo dimensions since wo dimensions are easier han hree o undersand, and one dimension is a lile oo simple. However, our

More information

10. State Space Methods

10. State Space Methods . Sae Space Mehods. Inroducion Sae space modelling was briefly inroduced in chaper. Here more coverage is provided of sae space mehods before some of heir uses in conrol sysem design are covered in he

More information

Timed Circuits. Asynchronous Circuit Design. Timing Relationships. A Simple Example. Timed States. Timing Sequences. ({r 6 },t6 = 1.

Timed Circuits. Asynchronous Circuit Design. Timing Relationships. A Simple Example. Timed States. Timing Sequences. ({r 6 },t6 = 1. Timed Circuis Asynchronous Circui Design Chris J. Myers Lecure 7: Timed Circuis Chaper 7 Previous mehods only use limied knowledge of delays. Very robus sysems, bu exremely conservaive. Large funcional

More information

15. Vector Valued Functions

15. Vector Valued Functions 1. Vecor Valued Funcions Up o his poin, we have presened vecors wih consan componens, for example, 1, and,,4. However, we can allow he componens of a vecor o be funcions of a common variable. For example,

More information

Math 221: Mathematical Notation

Math 221: Mathematical Notation Mah 221: Mahemaical Noaion Purpose: One goal in any course is o properly use he language o ha subjec. These noaions summarize some o he major conceps and more diicul opics o he uni. Typing hem helps you

More information

Soviet Rail Network, 1955

Soviet Rail Network, 1955 Sovie Rail Nework, 1 Reference: On he hiory of he ranporaion and maximum flow problem. Alexander Schrijver in Mah Programming, 1: 3,. Maximum Flow and Minimum Cu Max flow and min cu. Two very rich algorihmic

More information

Approximate String Matching. Department of Computer Science. University of Chile. Blanco Encalada Santiago - Chile

Approximate String Matching. Department of Computer Science. University of Chile. Blanco Encalada Santiago - Chile Very Fas and Simple Approximae Sring Maching Gonzalo Navarro Ricardo Baeza-Yaes Deparmen of Compuer Science Universiy of Chile Blanco Encalada 2120 - Saniago - Chile fgnavarro,rbaezag@dcc.uchile.cl Absrac

More information

4 Sequences of measurable functions

4 Sequences of measurable functions 4 Sequences of measurable funcions 1. Le (Ω, A, µ) be a measure space (complee, afer a possible applicaion of he compleion heorem). In his chaper we invesigae relaions beween various (nonequivalen) convergences

More information