Shortest Path With Negative Weights
|
|
- Sophia Lambert
- 6 years ago
- Views:
Transcription
1 Shor Pah Wih Ngaiv Wigh Conn Conn. Dird hor pah wih ngaiv wigh. Ngaiv yl dion. appliaion: urrny xhang arbirag Tramp amr problm. appliaion: opimal piplining of VLSI hip Shor Pah wih Ngaiv Wigh Shor Pah wih Ngaiv Wigh Ngaiv o yl. OPT(i, v) = lngh of hor -v pah uing a mo i ar. L P b uh a pah. - - Ca 1: P u a mo i-1 ar. Ca : P u xaly i ar. if (u, v) i la ar, hn OPT l b -u pah uing a mo i-1 ar, and hn u (u, v) If om pah from o v onain a ngaiv o yl, hr do no xi a hor -v pah; ohrwi, hr xi on ha i impl. W v OPT ( i, v) = min OPT ( i 1, v), min ( u, v ) E { OPT ( i 1, u) + ( u, v) } if i = ohrwi (W) < Goal: ompu OPT(n-1, ) and find a orrponding - pah.
2 Shor Pah wih Ngaiv Wigh: Algorihm Dynami Programming Shor Pah INPUT: G = (V, E),, n = V ARRAY: OPT[..n, V] FOREACH v V OPT[, v] = OPT[,] = FOR i = 1 o n FOREACH v V min OPT ( i 1, u) + ( u, m = OPT[i-1, v] u, v ) E m = FOREACH (u, v) E m = min (m, OPT[i-1, u] + [u,v]) OPT[i, v] = min(m, m ) { ) } ( v Shor Pah: Running Tim Dynami programming algorihm rquir Θ(mn) im and pa. Our loop rpa n im. Innr loop for vrx v onidr indgr(v) ar. v V Finding h hor pah. indgr( v) = m Could mainain prdor variabl. Alrnaiv: ompu opimal dian, onidr only zro rdud o ar. RETURN OPT[n-1, ] Shor Pah: Ding Ngaiv Cyl L1: if OPT(n,v) < OPT(n-1,v) for om nod v, hn (any) hor pah from o v uing a mo n ar onain a yl; morovr any uh yl ha ngaiv o. Proof (by onradiion). Sin OPT(n,v) < OPT(n-1,v), P ha n ar. L C b any dird yl in P. Dling C giv u a pah from o v of fwr han n ar C ha ngaiv o. Shor Pah: Ding Ngaiv Cyl L1: if OPT(n,v) < OPT(n-1,v) for om nod v, hn (any) hor pah from o v uing a mo n ar onain a yl; morovr any uh yl ha ngaiv o. Proof (by onradiion). Sin OPT(n,v) < OPT(n-1,v), P ha n ar. L C b any dird yl in P. Dling C giv u a pah from o v of fwr han n ar C ha ngaiv o. C (C) < v Corollary: an d ngaiv o yl in O(mn) im. Nd o ra bak hrough ub-problm
3 Ding Ngaiv Cyl: Appliaion Shor Pah: Praial Improvmn Currny onvrion. Givn n urrni (finanial inrumn) and xhang ra bwn pair of urrni, i hr an arbirag opporuniy? Fa algorihm vry valuabl! Praial improvmn. If OPT(i, v) = OPT(i-1, v) for all nod v, hn OPT(i, v) ar h hor pah dian.! Conqun: an op algorihm a oon a hi happn. $ 8 1/ F Mainain only on array OPT(v).! U O(m+n) pa; ohrwi Θ(mn) b a. / / /1 / 8 IBM No nd o hk ar of h form (u, v) unl OPT(u) hangd in prviou iraion.! Avoid unnary work. 1 DM 1/1 Ovrall ff. Sill O(mn) wor a, bu O(m) bhavior in prai. 9 1 Shor Pah: Praial Improvmn Bllman-Ford FIFO Shor Pah INPUT: G = (V, E),, n = V ARRAY: OPT[V], prd[v] FOREACH v V OPT[v] =, prd[v] = φ Shor Pah: Sa of h Ar All im blow ar for ingl our hor pah in dird graph wih no ngaiv yl. O(mn) im, O(m + n) pa. Shor pah: raighforward. Ngaiv yl: Bllman-Ford prdor variabl onain hor pah or ngaiv yl (no provd hr). Ngaiv yl wak: op if any nod nquud n im. OPT[] =, Q = QUEUEini() WHILE (Q φ) u = QUEUEg() FOREACH (u, v) E IF (OPT[u] + [u,v] < OPT[v]) OPT[v] = OPT[u] + [u,v] prd[v] = u IF (v Q) QUEUEpu(v) RETURN OPT[n-1] O(mn 1/ log C) im if all ar o ar ingr bwn C and C. Rdu o wighd bipari mahing (aignmn problm). "Co-aling." Gabow-Tarjan (1989), Orlin-Ahuja (199). O(mn + n log n) undird hor pah, no ngaiv yl. Rdu o wighd non-bipari mahing. Byond h op of hi our. 11 1
4 Tramp-Samr Problm Tramp-amr (min o o im raio) problm. A ramp amr ravl from por o por arrying argo. A voyag from por v o por w arn p(v,w) dollar, and rquir (v,w) day. Capain wan a our ha ahiv larg man daily profi. Wward Ho (189 19) 1 p = = p = 1 = p = - = Tramp-Samr Problm Tramp-amr (min o o im raio) problm. Inpu: digraph G = (V, E), ar o, and ar ravral im >. Goal: find a dird yl W ha minimiz raio Novl appliaion. Minimiz yl im (maximiz frquny) of logi hip on IBM proor hip by adjuing loking hdul. Spial a. Find a ngaiv o yl. µ ( W ) = W W. man daily profi = + 1 = Tramp-Samr Problm Linariz objiv funion. L µ* b valu of minimum raio yl. L µ b a onan. Dfin l = µ. Tramp-Samr Problm Linariz objiv funion. L µ* b valu of minimum raio yl. L µ b a onan. Dfin l = µ. Ca 1: hr xi ngaiv o yl W uing lngh l. W ( µ ) < µ > µ *. W W Ca : vry dird yl ha poiiv o uing lngh l. ( W µ < µ W W ) > for vry ylw for vry ylw µ < µ *. Ca : vry dird yl ha nonngaiv o uing lngh l, and hr xi a zro o yl W*. ( W µ µ W W W * W * ) for vry yl W for vry ylw = µ µ = µ *. µ µ *. 1 1
5 Tramp-Samr Problm Tramp-Samr: Squnial Sarh Produr Linariz objiv funion. L µ* b valu of minimum raio yl. L µ b a onan. Dfin l = µ. Ca 1: hr xi ngaiv o yl W uing lngh l. µ* < µ Ca : vry dird yl ha poiiv o uing lngh l. µ* > µ Ca : vry dird yl ha nonngaiv o uing lngh l, and hr xi a zro o yl W*. µ* = µ Squnial Tramp Samr L µ b a known uppr bound on µ*. REPEAT (forvr) l µ Solv hor pah problm wih lngh l IF (ngaiv o yl W w.r.. l ) µ µ(w) ELSE Find a zro o yl W* w.r.. l. RETURN W*. Thorm: qunial algorihm rmina. Ca 1 µ rily dra from on iraion o h nx. µ i h raio of om yl, and only finily many yl Tramp-Samr: Binary Sarh Produr Tramp-Samr: Binary Sarh Produr W yl lf -C, righ C Binary Sarh Tramp Samr lf µ* righ REPEAT (forvr) IF (µ(w) = µ*) RETURN W µ (lf + righ) / l µ Solv hor pah problm wih lngh l IF (ngaiv o yl w.r.. l ) righ µ W ngaiv o yl w.r.. l ELSE IF (zro o yl W*) RETURN W*. ELSE lf µ Invarian: inrval [lf, righ] and yl W aify: lf µ* µ(w) < righ. Proof by induion follow from a 1-. Lmma. Upon rminaion, h algorihm rurn a min raio yl. Immdia from a. Aumpion. All ar o ar ingr bwn C and C. All ar ravral im ar ingr bwn T and T. Lmma. Th algorihm rmina afr O(log(nCT)) iraion. Proof on nx lid. Thorm. Th algorihm find min raio yl in O(mn log (nct)) im. 19
6 Tramp-Samr: Binary Sarh Produr Lmma. Th algorihm rmina afr O(log(nCT)) iraion. Iniially, lf = -C, righ = C. Eah iraion halv h iz of h inrval. L (W) and (W) dno o and ravral im of yl W. W how any inrval of iz l han 1 / (n T ) onain a mo on valu from h { (W) / (W) : W i a yl }. l W 1 and W yl wih µ(w 1 ) > µ(w ) ( W1 ) ( W) ( W ) ( ) ( ) ( ) 1 W W W > 1 > ( W1) ( W) ( W1) ( W) numraor of RHS i a la 1, dnominaor i a mo n T Afr 1 + log ((C) (n T )) = O(log (nct)) iraion, a mo on raio in h inrval. Algorihm mainain yl W and inrval [lf, righ].. lf µ* µ(w) < righ.. Tramp Samr: Sa of h Ar Min raio yl. O(mn log (nct)). O(n log n) dn. (Mgiddo, 199) O(n log n) par. (Mgiddo, 198) Minimum man yl. Spial a whn all ravral im = 1. Θ(mn). (Karp, 198) O(mn 1/ log C). (Orlin-Ahuja, 199) O(mn log n). (Karp-Orlin, 1981) paramri implx - b in prai 1 Opimal Piplining of VLSI Chip Novl appliaion. Minimiz yl im (maximiz frquny) of logi hip on IBM proor hip by adjuing loking hdul. If lok ignal arriv a lah imulanouly, min yl im = 1. Allow individual lok arrival im a lah. Clok ignal a lah: A:, 1,,,... A 9 B B: -1, 9, 19, 9,... C:, 1,,, D: -,, 1,,... Opimal yl im = 1. Max man wigh yl = 1. C Lah Graph D
Ma/CS 6a Class 15: Flows and Bipartite Graphs
//206 Ma/CS 6a Cla : Flow and Bipari Graph By Adam Shffr Rmindr: Flow Nwork A flow nwork i a digraph G = V, E, oghr wih a ourc vrx V, a ink vrx V, and a capaciy funcion c: E N. Capaciy Sourc 7 a b c d
More informationFinal Exam : Solutions
Comp : Algorihm and Daa Srucur Final Exam : Soluion. Rcuriv Algorihm. (a) To bgin ind h mdian o {x, x,... x n }. Sinc vry numbr xcp on in h inrval [0, n] appar xacly onc in h li, w hav ha h mdian mu b
More informationDEPARTMENT OF ELECTRICAL &ELECTRONICS ENGINEERING SIGNALS AND SYSTEMS. Assoc. Prof. Dr. Burak Kelleci. Spring 2018
DEPARTMENT OF ELECTRICAL &ELECTRONICS ENGINEERING SIGNALS AND SYSTEMS Aoc. Prof. Dr. Burak Kllci Spring 08 OUTLINE Th Laplac Tranform Rgion of convrgnc for Laplac ranform Invr Laplac ranform Gomric valuaion
More informationDesign and Analysis of Algorithms (Autumn 2017)
Din an Analyi o Alorim (Auumn 2017) Exri 3 Soluion 1. Sor pa Ain om poiiv an naiv o o ar o rap own low, o a Bllman-For in a or pa. Simula ir alorim a ru prolm o a layr DAG ( li), or on a an riv rom rurrn.
More informationMax 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 informationSoviet 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 informationJonathan Turner Exam 2-10/28/03
CS Algorihm n Progrm Prolm Exm Soluion S Soluion Jonhn Turnr Exm //. ( poin) In h Fioni hp ruur, u wn vrx u n i prn v u ing u v i v h lry lo hil in i l m hil o om ohr vrx. Suppo w hng hi, o h ing u i prorm
More informationChapter 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 informationPoisson process Markov process
E2200 Quuing hory and lraffic 2nd lcur oion proc Markov proc Vikoria Fodor KTH Laboraory for Communicaion nwork, School of Elcrical Enginring 1 Cour oulin Sochaic proc bhind quuing hory L2-L3 oion proc
More informationBoyce/DiPrima 9 th ed, Ch 2.1: Linear Equations; Method of Integrating Factors
Boc/DiPrima 9 h d, Ch.: Linar Equaions; Mhod of Ingraing Facors Elmnar Diffrnial Equaions and Boundar Valu Problms, 9 h diion, b William E. Boc and Richard C. DiPrima, 009 b John Wil & Sons, Inc. A linar
More information! Abstraction for material flowing through the edges. ! G = (V, E) = directed graph, no parallel edges.
Sovie Rail Nework, haper Nework Flow Slide by Kevin Wayne. opyrigh Pearon-ddion Weley. ll righ reerved. Reference: On he hiory of he ranporaion and maximum flow problem. lexander Schrijver in Mah Programming,
More informationInstructors Solution for Assignment 3 Chapter 3: Time Domain Analysis of LTIC Systems
Inrucor Soluion for Aignmn Chapr : Tim Domain Anali of LTIC Sm Problm i a 8 x x wih x u,, an Zro-inpu rpon of h m: Th characriic quaion of h LTIC m i i 8, which ha roo a ± j Th zro-inpu rpon i givn b zi
More informationThe 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 informationTransfer function and the Laplace transformation
Lab No PH-35 Porland Sa Univriy A. La Roa Tranfr funcion and h Laplac ranformaion. INTRODUTION. THE LAPLAE TRANSFORMATION L 3. TRANSFER FUNTIONS 4. ELETRIAL SYSTEMS Analyi of h hr baic paiv lmn R, and
More informationLecture 4: Laplace Transforms
Lur 4: Lapla Transforms Lapla and rlad ransformaions an b usd o solv diffrnial quaion and o rdu priodi nois in signals and imags. Basially, hy onvr h drivaiv opraions ino mulipliaion, diffrnial quaions
More informationThe 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 informationMaximum Flow and Minimum Cut
// Sovie Rail Nework, Maximum Flow and Minimum Cu Max flow and min cu. Two very rich algorihmic problem. Cornerone problem in combinaorial opimizaion. Beauiful mahemaical dualiy. Nework Flow Flow nework.
More informationElementary Differential Equations and Boundary Value Problems
Elmnar Diffrnial Equaions and Boundar Valu Problms Boc. & DiPrima 9 h Ediion Chapr : Firs Ordr Diffrnial Equaions 00600 คณ ตศาสตร ว ศวกรรม สาขาว ชาว ศวกรรมคอมพ วเตอร ป การศ กษา /55 ผศ.ดร.อร ญญา ผศ.ดร.สมศ
More informationCSE 521: Design & Analysis of Algorithms I
CSE 52: Deign & Analyi of Algorihm I Nework Flow Paul Beame Biparie Maching Given: A biparie graph G=(V,E) M E i a maching in G iff no wo edge in M hare a verex Goal: Find a maching M in G of maximum poible
More informationProblem Set If all directed edges in a network have distinct capacities, then there is a unique maximum flow.
CSE 202: Deign and Analyi of Algorihm Winer 2013 Problem Se 3 Inrucor: Kamalika Chaudhuri Due on: Tue. Feb 26, 2013 Inrucion For your proof, you may ue any lower bound, algorihm or daa rucure from he ex
More informationChapter 12 Introduction To The Laplace Transform
Chapr Inroducion To Th aplac Tranorm Diniion o h aplac Tranorm - Th Sp & Impul uncion aplac Tranorm o pciic uncion 5 Opraional Tranorm Applying h aplac Tranorm 7 Invr Tranorm o Raional uncion 8 Pol and
More informationJonathan Turner Exam 2-12/4/03
CS 41 Algorim an Program Prolm Exam Soluion S Soluion Jonaan Turnr Exam -1/4/0 10/8/0 1. (10 poin) T igur low ow an implmnaion o ynami r aa ruur wi vral virual r. Sow orrponing o aual r (owing vrx o).
More information4.1 The Uniform Distribution Def n: A c.r.v. X has a continuous uniform distribution on [a, b] when its pdf is = 1 a x b
4. Th Uniform Disribuion Df n: A c.r.v. has a coninuous uniform disribuion on [a, b] whn is pdf is f x a x b b a Also, b + a b a µ E and V Ex4. Suppos, h lvl of unblivabiliy a any poin in a Transformrs
More informationGraphs III - Network Flow
Graph III - Nework Flow Flow nework eup graph G=(V,E) edge capaciy w(u,v) 0 - if edge doe no exi, hen w(u,v)=0 pecial verice: ource verex ; ink verex - no edge ino and no edge ou of Aume every verex v
More informationData 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 informationBoyce/DiPrima 9 th ed, Ch 7.8: Repeated Eigenvalues
Boy/DiPrima 9 h d Ch 7.8: Rpad Eignvalus Elmnary Diffrnial Equaions and Boundary Valu Problms 9 h diion by William E. Boy and Rihard C. DiPrima 9 by John Wily & Sons In. W onsidr again a homognous sysm
More informationDouble Slits in Space and Time
Doubl Slis in Sac an Tim Gorg Jons As has bn ror rcnly in h mia, a am l by Grhar Paulus has monsra an inrsing chniqu for ionizing argon aoms by using ulra-shor lasr ulss. Each lasr uls is ffcivly on an
More informationUNIT #5 EXPONENTIAL AND LOGARITHMIC FUNCTIONS
Answr Ky Nam: Da: UNIT # EXPONENTIAL AND LOGARITHMIC FUNCTIONS Par I Qusions. Th prssion is quivaln o () () 6 6 6. Th ponnial funcion y 6 could rwrin as y () y y 6 () y y (). Th prssion a is quivaln o
More informationREPETITION before the exam PART 2, Transform Methods. Laplace transforms: τ dτ. L1. Derive the formulas : L2. Find the Laplace transform F(s) if.
Tranform Mhod and Calculu of Svral Variabl H7, p Lcurr: Armin Halilovic KTH, Campu Haning E-mail: armin@dkh, wwwdkh/armin REPETITION bfor h am PART, Tranform Mhod Laplac ranform: L Driv h formula : a L[
More informationDiscussion 06 Solutions
STAT Discussion Soluions Spring 8. Th wigh of fish in La Paradis follows a normal disribuion wih man of 8. lbs and sandard dviaion of. lbs. a) Wha proporion of fish ar bwn 9 lbs and lbs? æ 9-8. - 8. P
More informationMatching. Slides designed by Kevin Wayne.
Maching Maching. Inpu: undireced graph G = (V, E). M E i a maching if each node appear in a mo edge in M. Max maching: find a max cardinaliy maching. Slide deigned by Kevin Wayne. Biparie Maching Biparie
More informationCopyright 2012 Pearson Education, Inc. Publishing as Prentice Hall.
Chapr Rviw 0 6. ( a a ln a. This will qual a if an onl if ln a, or a. + k an (ln + c. Thrfor, a an valu of, whr h wo curvs inrsc, h wo angn lins will b prpnicular. 6. (a Sinc h lin passs hrough h origin
More informationSOLUTIONS. 1. Consider two continuous random variables X and Y with joint p.d.f. f ( x, y ) = = = 15. Stepanov Dalpiaz
STAT UIUC Pracic Problms #7 SOLUTIONS Spanov Dalpiaz Th following ar a numbr of pracic problms ha ma b hlpful for compling h homwor, and will lil b vr usful for suding for ams.. Considr wo coninuous random
More informationDecline Curves. Exponential decline (constant fractional decline) Harmonic decline, and Hyperbolic decline.
Dlin Curvs Dlin Curvs ha lo flow ra vs. im ar h mos ommon ools for forasing roduion and monioring wll rforman in h fild. Ths urvs uikly show by grahi mans whih wlls or filds ar roduing as xd or undr roduing.
More informationAlgorithms and Data Structures 2011/12 Week 9 Solutions (Tues 15th - Fri 18th Nov)
Algorihm and Daa Srucure 2011/ Week Soluion (Tue 15h - Fri 18h No) 1. Queion: e are gien 11/16 / 15/20 8/13 0/ 1/ / 11/1 / / To queion: (a) Find a pair of ube X, Y V uch ha f(x, Y) = f(v X, Y). (b) Find
More informationEconomics 302 (Sec. 001) Intermediate Macroeconomic Theory and Policy (Spring 2011) 3/28/2012. UW Madison
Economics 302 (Sc. 001) Inrmdia Macroconomic Thory and Policy (Spring 2011) 3/28/2012 Insrucor: Prof. Mnzi Chinn Insrucor: Prof. Mnzi Chinn UW Madison 16 1 Consumpion Th Vry Forsighd dconsumr A vry forsighd
More informationAR(1) Process. The first-order autoregressive process, AR(1) is. where e t is WN(0, σ 2 )
AR() Procss Th firs-ordr auorgrssiv procss, AR() is whr is WN(0, σ ) Condiional Man and Varianc of AR() Condiional man: Condiional varianc: ) ( ) ( Ω Ω E E ) var( ) ) ( var( ) var( σ Ω Ω Ω Ω E Auocovarianc
More informationCPSC 211 Data Structures & Implementations (c) Texas A&M University [ 259] B-Trees
CPSC 211 Daa Srucurs & Implmnaions (c) Txas A&M Univrsiy [ 259] B-Trs Th AVL r and rd-black r allowd som variaion in h lnghs of h diffrn roo-o-laf pahs. An alrnaiv ida is o mak sur ha all roo-o-laf pahs
More informationMath 3301 Homework Set 6 Solutions 10 Points. = +. The guess for the particular P ( ) ( ) ( ) ( ) ( ) ( ) ( ) cos 2 t : 4D= 2
Mah 0 Homwork S 6 Soluions 0 oins. ( ps) I ll lav i o you o vrify ha y os sin = +. Th guss for h pariular soluion and is drivaivs is blow. Noi ha w ndd o add s ono h las wo rms sin hos ar xaly h omplimnary
More informationControl System Engineering (EE301T) Assignment: 2
Conrol Sysm Enginring (EE0T) Assignmn: PART-A (Tim Domain Analysis: Transin Rspons Analysis). Oain h rspons of a uniy fdack sysm whos opn-loop ransfr funcion is (s) s ( s 4) for a uni sp inpu and also
More informationMain Reference: Sections in CLRS.
Maximum Flow Reied 09/09/200 Main Reference: Secion 26.-26. in CLRS. Inroducion Definiion Muli-Source Muli-Sink The Ford-Fulkeron Mehod Reidual Nework Augmening Pah The Max-Flow Min-Cu Theorem The Edmond-Karp
More informationAlgorithm Design and Analysis
Algorihm Deign and Analyi LECTURE 0 Nework Flow Applicaion Biparie maching Edge-dijoin pah Adam Smih 0//0 A. Smih; baed on lide by E. Demaine, C. Leieron, S. Rakhodnikova, K. Wayne La ime: Ford-Fulkeron
More information1 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 informationNetwork Flow. Data Structures and Algorithms Andrei Bulatov
Nework Flow Daa Srucure and Algorihm Andrei Bulao Algorihm Nework Flow 24-2 Flow Nework Think of a graph a yem of pipe We ue hi yem o pump waer from he ource o ink Eery pipe/edge ha limied capaciy Flow
More informationSoviet Rail Network, 1955
7.1 Nework Flow Sovie Rail Nework, 19 Reerence: On he hiory o he ranporaion and maximum low problem. lexander Schrijver in Mah Programming, 91: 3, 00. (See Exernal Link ) Maximum Flow and Minimum Cu Max
More informationAdmin MAX FLOW APPLICATIONS. Flow graph/networks. Flow constraints 4/30/13. CS lunch today Grading. in-flow = out-flow for every vertex (except s, t)
/0/ dmin lunch oday rading MX LOW PPLIION 0, pring avid Kauchak low graph/nework low nework direced, weighed graph (V, ) poiive edge weigh indicaing he capaciy (generally, aume ineger) conain a ingle ource
More informationFlow 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 informationSupplementary Materials
6 Supplmntary Matrials APPENDIX A PHYSICAL INTERPRETATION OF FUEL-RATE-SPEED FUNCTION A truck running on a road with grad/slop θ positiv if moving up and ngativ if moving down facs thr rsistancs: arodynamic
More informationAdvanced Queueing Theory. M/G/1 Queueing Systems
Advand Quung Thory Ths slds ar rad by Dr. Yh Huang of Gorg Mason Unvrsy. Sudns rgsrd n Dr. Huang's ourss a GMU an ma a sngl mahn-radabl opy and prn a sngl opy of ah sld for hr own rfrn, so long as ah sld
More information6/3/2009. CS 244 Algorithm Design Instructor: t Artur Czumaj. Lecture 8 Network flows. Maximum Flow and Minimum Cut. Minimum Cut Problem.
Maximum Flow and Minimum Cu CS lgorihm Deign Inrucor: rur Czumaj Lecure Nework Max and min cu. Two very rich algorihmic problem. Cornerone problem in combinaorial opimizaion. Beauiful mahemaical dualiy.
More informationAlgorithmic 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 informationCHAPTER CHAPTER14. Expectations: The Basic Tools. Prepared by: Fernando Quijano and Yvonn Quijano
Expcaions: Th Basic Prpard by: Frnando Quijano and Yvonn Quijano CHAPTER CHAPTER14 2006 Prnic Hall Businss Publishing Macroconomics, 4/ Olivir Blanchard 14-1 Today s Lcur Chapr 14:Expcaions: Th Basic Th
More informationRandomized 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 informationCharging of capacitor through inductor and resistor
cur 4&: R circui harging of capacior hrough inducor and rsisor us considr a capacior of capacianc is conncd o a D sourc of.m.f. E hrough a rsisr of rsisanc R, an inducor of inducanc and a y K in sris.
More information6. 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 information2.1. Differential Equations and Solutions #3, 4, 17, 20, 24, 35
MATH 5 PS # Summr 00.. Diffrnial Equaions and Soluions PS.# Show ha ()C #, 4, 7, 0, 4, 5 ( / ) is a gnral soluion of h diffrnial quaion. Us a compur or calculaor o skch h soluions for h givn valus of h
More informationLecture 1: Growth and decay of current in RL circuit. Growth of current in LR Circuit. D.K.Pandey
cur : Growh and dcay of currn in circui Growh of currn in Circui us considr an inducor of slf inducanc is conncd o a DC sourc of.m.f. E hrough a rsisr of rsisanc and a ky K in sris. Whn h ky K is swichd
More informationDynamic 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 informationWrap up: Weighted, directed graph shortest path Minimum Spanning Tree. Feb 25, 2019 CSCI211 - Sprenkle
Objecive Wrap up: Weighed, direced graph hore pah Minimum Spanning Tree eb, 1 SI - Sprenkle 1 Review Wha are greedy algorihm? Wha i our emplae for olving hem? Review he la problem we were working on: Single-ource,
More information6. 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 informationNetwork Flows UPCOPENCOURSEWARE number 34414
Nework Flow UPCOPENCOURSEWARE number Topic : F.-Javier Heredia Thi work i licened under he Creaive Common Aribuion- NonCommercial-NoDeriv. Unpored Licene. To view a copy of hi licene, vii hp://creaivecommon.org/licene/by-nc-nd/./
More information14.02 Principles of Macroeconomics Fall 2005 Quiz 3 Solutions
4.0 rincipl of Macroconomic Fall 005 Quiz 3 Soluion Shor Quion (30/00 poin la a whhr h following amn ar TRUE or FALSE wih a hor xplanaion (3 or 4 lin. Each quion coun 5/00 poin.. An incra in ax oday alway
More information6. 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 informationCS4445/9544 Analysis of Algorithms II Solution for Assignment 1
Conider he following flow nework CS444/944 Analyi of Algorihm II Soluion for Aignmen (0 mark) In he following nework a minimum cu ha capaciy 0 Eiher prove ha hi aemen i rue, or how ha i i fale Uing he
More informationLecture 2: Current in RC circuit D.K.Pandey
Lcur 2: urrn in circui harging of apacior hrough Rsisr L us considr a capacior of capacianc is conncd o a D sourc of.m.f. E hrough a rsisr of rsisanc R and a ky K in sris. Whn h ky K is swichd on, h charging
More informationChapter 6. PID Control
Char 6 PID Conrol PID Conrol Mo ommon onrollr in h CPI. Cam ino u in 930 wih h inroduion of numai onrollr. Exrmly flxibl and owrful onrol algorihm whn alid rorly. Gnral Fdbak Conrol Loo D G d Y E C U +
More informationcycle that does not cross any edges (including its own), then it has at least
W prov th following thorm: Thorm If a K n is drawn in th plan in such a way that it has a hamiltonian cycl that dos not cross any dgs (including its own, thn it has at last n ( 4 48 π + O(n crossings Th
More information2. The Laplace Transform
Th aac Tranorm Inroucion Th aac ranorm i a unamna an vry uu oo or uying many nginring robm To in h aac ranorm w conir a comx variab σ, whr σ i h ra ar an i h imaginary ar or ix vau o σ an w viw a a oin
More information5. An object moving along an x-coordinate axis with its scale measured in meters has a velocity of 6t
AP CALCULUS FINAL UNIT WORKSHEETS ACCELERATION, VELOCTIY AND POSITION In problms -, drmin h posiion funcion, (), from h givn informaion.. v (), () = 5. v ()5, () = b g. a (), v() =, () = -. a (), v() =
More informationCircuits and Systems I
Circuis and Sysms I LECTURE #3 Th Spcrum, Priodic Signals, and h Tim-Varying Spcrum lions@pfl Prof. Dr. Volan Cvhr LIONS/Laboraory for Informaion and Infrnc Sysms Licns Info for SPFirs Slids This wor rlasd
More informationLongest 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 informationMicroscopic Flow Characteristics Time Headway - Distribution
CE57: Traffic Flow Thory Spring 20 Wk 2 Modling Hadway Disribuion Microscopic Flow Characrisics Tim Hadway - Disribuion Tim Hadway Dfiniion Tim Hadway vrsus Gap Ahmd Abdl-Rahim Civil Enginring Dparmn,
More information10. If p and q are the lengths of the perpendiculars from the origin on the tangent and the normal to the curve
0. If p and q ar h lnghs of h prpndiculars from h origin on h angn and h normal o h curv + Mahmaics y = a, hn 4p + q = a a (C) a (D) 5a 6. Wha is h diffrnial quaion of h family of circls having hir cnrs
More informationNetwork Design with Weighted Players (SPAA 2006 Full Paper Submission)
Nwork Dign wih Wighd Playr SPAA 26 Full Papr Submiion) Ho-Lin Chn Tim Roughgardn March 7, 26 Abrac W conidr a modl of gam-horic nwork dign iniially udid by Anhlvich al. [1], whr lfih playr lc pah in a
More informationChapter 3: Fourier Representation of Signals and LTI Systems. Chih-Wei Liu
Chapr 3: Fourir Rprsnaion of Signals and LTI Sysms Chih-Wi Liu Oulin Inroducion Complx Sinusoids and Frquncy Rspons Fourir Rprsnaions for Four Classs of Signals Discr-im Priodic Signals Fourir Sris Coninuous-im
More informationToday: Max Flow Proofs
Today: Max Flow Proof COSC 58, Algorihm March 4, 04 Many of hee lide are adaped from everal online ource Reading Aignmen Today cla: Chaper 6 Reading aignmen for nex cla: Chaper 7 (Amorized analyi) In-Cla
More information6. 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 informationChapter 5 The Laplace Transform. x(t) input y(t) output Dynamic System
EE 422G No: Chapr 5 Inrucor: Chung Chapr 5 Th Laplac Tranform 5- Inroducion () Sym analyi inpu oupu Dynamic Sym Linar Dynamic ym: A procor which proc h inpu ignal o produc h oupu dy ( n) ( n dy ( n) +
More information16.512, Rocket Propulsion Prof. Manuel Martinez-Sanchez Lecture 3: Ideal Nozzle Fluid Mechanics
6.5, Rok ropulsion rof. nul rinz-snhz Lur 3: Idl Nozzl luid hnis Idl Nozzl low wih No Sprion (-D) - Qusi -D (slndr) pproximion - Idl gs ssumd ( ) mu + Opimum xpnsion: - or lss, >, ould driv mor forwrd
More informationAlgorithms and Theory of Computation. Lecture 11: Network Flow
Algorithms and Theory of Computation Lecture 11: Network Flow Xiaohui Bei MAS 714 September 18, 2018 Nanyang Technological University MAS 714 September 18, 2018 1 / 26 Flow Network A flow network is a
More information18 Extensions of Maximum Flow
Who are you?" aid Lunkwill, riing angrily from hi ea. Wha do you wan?" I am Majikhie!" announced he older one. And I demand ha I am Vroomfondel!" houed he younger one. Majikhie urned on Vroomfondel. I
More informationLecture 1: Numerical Integration The Trapezoidal and Simpson s Rule
Lcur : Numrical ngraion Th Trapzoidal and Simpson s Rul A problm Th probabiliy of a normally disribud (man µ and sandard dviaion σ ) vn occurring bwn h valus a and b is B A P( a x b) d () π whr a µ b -
More informationDynamic Programming. Data Structures and Algorithms Andrei Bulatov
Dynamic Programming Data Structures and Algorithms Andrei Bulatov Algorithms Dynamic Programming 18-2 Weighted Interval Scheduling Weighted interval scheduling problem. Instance A set of n jobs. Job j
More informationMaster Thesis Seminar
Mar Thi minar Hlinki Univriy of Thnology Dparmn of Elrial and Commniaion Enginring Commniaion laboraory Mar hi rforman Evalaion of rially Conanad pa-tim Cod by Aboda Abdlla Ali prvior: prof vn-gav Häggman
More informationApplied Statistics and Probability for Engineers, 6 th edition October 17, 2016
Applid Saisics and robabiliy for Enginrs, 6 h diion Ocobr 7, 6 CHATER Scion - -. a d. 679.. b. d. 88 c d d d. 987 d. 98 f d.. Thn, = ln. =. g d.. Thn, = ln.9 =.. -7. a., by symmry. b.. d...6. 7.. c...
More informationEXERCISE - 01 CHECK YOUR GRASP
DIFFERENTIAL EQUATION EXERCISE - CHECK YOUR GRASP 7. m hn D() m m, D () m m. hn givn D () m m D D D + m m m m m m + m m m m + ( m ) (m ) (m ) (m + ) m,, Hnc numbr of valus of mn will b. n ( ) + c sinc
More informationCSE 245: Computer Aided Circuit Simulation and Verification
CSE 45: Compur Aidd Circui Simulaion and Vrificaion Fall 4, Sp 8 Lcur : Dynamic Linar Sysm Oulin Tim Domain Analysis Sa Equaions RLC Nwork Analysis by Taylor Expansion Impuls Rspons in im domain Frquncy
More informationwhere: u: input y: output x: state vector A, B, C, D are const matrices
Sa pac modl: linar: y or in om : Sa q : f, u Oupu q : y h, u u Du F Gu y H Ju whr: u: inpu y: oupu : a vcor,,, D ar con maric Eampl " $ & ' " $ & 'u y " & * * * * [ ],, D H D I " $ " & $ ' " & $ ' " &
More informationAlgorithm Design and Analysis
Algorihm Deign and Analyi LECTURES 17 Nework Flow Dualiy of Max Flow and Min Cu Algorihm: Ford-Fulkeron Capaciy Scaling Sofya Rakhodnikova S. Rakhodnikova; baed on lide by E. Demaine, C. Leieron, A. Smih,
More informationCPSC 665 : An Algorithmist s Toolkit Lecture 4 : 21 Jan Linear Programming
CPSC 665 : An Algorithmist s Toolkit Lctur 4 : 21 Jan 2015 Lcturr: Sushant Sachdva Linar Programming Scrib: Rasmus Kyng 1. Introduction An optimization problm rquirs us to find th minimum or maximum) of
More informationMaximum Flow. Contents. Max Flow Network. Maximum Flow and Minimum Cut
Conen Maximum Flow Conen. Maximum low problem. Minimum cu problem. Max-low min-cu heorem. Augmening pah algorihm. Capaciy-caling. Shore augmening pah. Princeon Univeriy COS Theory o Algorihm Spring Kevin
More informationNetwork Flows: Introduction & Maximum Flow
CSC 373 - lgorihm Deign, nalyi, and Complexiy Summer 2016 Lalla Mouaadid Nework Flow: Inroducion & Maximum Flow We now urn our aenion o anoher powerful algorihmic echnique: Local Search. In a local earch
More informationPhysics 160 Lecture 3. R. Johnson April 6, 2015
Physics 6 Lcur 3 R. Johnson April 6, 5 RC Circui (Low-Pass Filr This is h sam RC circui w lookd a arlir h im doma, bu hr w ar rsd h frquncy rspons. So w pu a s wav sad of a sp funcion. whr R C RC Complx
More informationMath 266, Practice Midterm Exam 2
Mh 66, Prcic Midrm Exm Nm: Ground Rul. Clculor i NOT llowd.. Show your work for vry problm unl ohrwi d (pril crdi r vilbl). 3. You my u on 4-by-6 indx crd, boh id. 4. Th bl of Lplc rnform i vilbl h l pg.
More informationMEM 355 Performance Enhancement of Dynamical Systems A First Control Problem - Cruise Control
MEM 355 Prformanc Enhancmn of Dynamical Sysms A Firs Conrol Problm - Cruis Conrol Harry G. Kwany Darmn of Mchanical Enginring & Mchanics Drxl Univrsiy Cruis Conrol ( ) mv = F mg sinθ cv v +.2v= u 9.8θ
More informationMA1506 Tutorial 2 Solutions. Question 1. (1a) 1 ) y x. e x. 1 exp (in general, Integrating factor is. ye dx. So ) (1b) e e. e c.
MA56 utorial Solutions Qustion a Intgrating fator is ln p p in gnral, multipl b p So b ln p p sin his kin is all a Brnoulli quation -- st Sin w fin Y, Y Y, Y Y p Qustion Dfin v / hn our quation is v μ
More informationCS 541 Algorithms and Programs. Exam 2 Solutions. Jonathan Turner 11/8/01
CS 1 Algorim nd Progrm Exm Soluion Jonn Turnr 11/8/01 B n nd oni, u ompl. 1. (10 poin). Conidr vrion of or p prolm wi mulipliiv o. In i form of prolm, lng of p i produ of dg lng, rr n um. Explin ow or
More informationBoyce/DiPrima/Meade 11 th ed, Ch 6.1: Definition of Laplace Transform
Boy/DiPrima/Mad h d, Ch 6.: Diniion o apla Tranorm Elmnary Dirnial Equaion and Boundary Valu Problm, h diion, by William E. Boy, Rihard C. DiPrima, and Doug Mad 7 by John Wily & Son, In. Many praial nginring
More informationNetwork Design with Weighted Players
Nwork Dign wih Wighd Playr Ho-Lin Chn Tim Roughgardn Jun 21, 27 Abrac W conidr a modl of gam-horic nwork dign iniially udid by Anhlvich al. [2], whr lfih playr lc pah in a nwork o minimiz hir co, which
More informationJunction Tree Algorithm 1. David Barber
Juntion Tr Algorithm 1 David Barbr Univrsity Collg London 1 Ths slids aompany th book Baysian Rasoning and Mahin Larning. Th book and dmos an b downloadd from www.s.ul.a.uk/staff/d.barbr/brml. Fdbak and
More information