{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CO-351-1029-Midterm_exam

CO-351-1029-Midterm_exam - Course Number Course Title...

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

View Full Document Right Arrow Icon
Background image of page 1

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

View Full Document Right Arrow Icon
Background image of page 2
Background image of page 3

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

View Full Document Right Arrow Icon
Background image of page 4
Background image of page 5

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

View Full Document Right Arrow Icon
Background image of page 6
Background image of page 7

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

View Full Document Right Arrow Icon
Background image of page 8
Background image of page 9
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Course Number Course Title Instructor Date of Exam Time Period UNIVERSITY OF WATERLOO MIDTERM EXAMINATION FALL TERM 2002 Surname: 4—.— First Name: M Name:(Signature) #— Id.#: L C&O 351 Network Flows Professor Bertrand Guenin November 7th, 2002 5:00 PM - 7:00 PM and 7:00 PM - 9:00 PM Number of Exam Pages (including cover page) 9 pages Exam Type Closed Book Additional Materials Allowed 1 Exercise 1. (1 7pts) Use the Ford-Fulkerson algorithm to find a maximum st—flow and a minimum capacity st-cut in the digraph given below starting with the initial flow given in the digraph. The first value next to each arc is its capacity, the second its current flow value. At each step indicate the residual digraph, and the augmenting path. (8,0) flu 5167!:de m D‘ ,-, F: 5,3.) 9.") 01.5)ch [9f J(VF)=I Exercise 2. (1 7pts) You have saved a 1000$ which you wish to invest over the next 10 years (from 2003 to 2013) so that you maximize the return on your investment. Suppose that you are given a set of investment alternatives which we call A, B, C, D, E and F, where (see table) for each investment you are told its starting date, its duration, and the return on your investment. To keep your strategy simple you want at each point all of your fund to be invested in at most one of A, B, C, D, E or F. As an example you could wait until ’04 to invest the 1000$ into B, five years later, in ’09 you would get 1000$ plus 10% of 1000$ back, so a total of 110025. You could then wait until ’10 to invest in C and three years later in ’13 you would get 1100$ back plus 6% of l 100$ back which is 11663. Formulate the problem of finding an investment strategy which will maximize your return in 2013 as a shortest dipath problem. _I smear durationmyears) pa o’ia (Hr-’0‘, D=(4§A}, wt,“ 7709/12 ,5 K (:ng far Yecm/ F’s/x "five ew/lrfl’ star-f year“, 4v 7U”: [Alexi End/'4 3 Hr / 1‘ _ , 7’ y e 0’ .126 fl. a five]! L0,,ijanol/flfi 7/9 year- )- Aau W A 5 1’ 11.; e“ 1,, {I J D so fha+ for empt‘ "9,13 ; ’ The»: “A “’5 1' {H 5’ g‘. , Wei 4* J W (we r r! A; m n ‘v i , j /' Tlere we; r 4 V Le} a Jig); W’%“ (PWSfi 'A 4 \ [Vex‘l/ (jg V a J’H/‘EurI/H'f) you» O\ Mflfi’t . c} 5.0! 4 5. 3 f“ f f 7 1" V13; '1‘ g. f _ ' I C 5 9" ear F m ’ ’ {Al [3’ Q) D/ffj / r & TLESE Arc; M 0"» ”1 +A€ dark ‘/.’\:A of .’nyc,~/mh¢ i IS *Le f6 +U',‘ 9n 92""V‘7‘lv)! Exercise 3. (15pts) (1) Run Dantzig’s algorithm starting from spanning tree rooted at s which corresponds to the bold arcs. The number next to each are is its length. Be sure to explain every step. (2) Same question but assume that the cost of arc de is 7. 5/0 ”v- n [A 5 -Kr\‘..¢- (M 47/ 7‘“ 4" [elm fix; , v ' cur/(fl .f A {if fine sfivr'huf W 7’7”“ 1/ v a; 5f¢\/‘nxn9 4"»? ”new” y wax {L1 ~(F 5 c)+ 0, 4w (P4) _ g + J 6 / m; W " P , e A“ C [MAM Ci g “Y 9» “9‘5 “+:‘/M€ dicyc/c) C — at) 6: (0’3 /fl/ / \ \l ‘ Tév} : Exercise 4. (I 7pts) Consider D = (N, A). Suppose that every arc a has a capacity ca and that every node n has a supply bu. Suppose x is a solution to the following linear program: fx(u)=bu HEN OquUScW quA Show that for every 5 g N we must have 2 bu E Z ues uveA(S,N—S) (i.e. the total supply in S is at most equal to what is allowed to leave S because of the capacities). hint: Find what is ZquA(S,N—S) 93m; — Zu‘uEA(N—S,S) mm, (this is similar to a homework question). YOUR ANSWER SHOULD BE SELF CONTAINED YOU ARE NOT ALLOWED TO USE ANYTHING WE PROVED IN CLASS OR IN THE ASSIGNMENTS. (arm/JV ‘ 1155 £(”) w‘vvc 55M (3‘) For 'flns we have ‘{ case} 41;,- ylr 6/4 : 5:13} N. w 42 5 2 L / T v1 71?, a". na‘l‘ ef-Fez'l (f) V 2:3; Lav 6; (If) 554‘ Tit/If fro/m u a) / '52” '2‘» m”. w Care 3 Tl” } «612 {L (y) =ou-iSI/V—I) 10’ - é ' / uu-éIACAw-‘L‘G “our Vl/‘f/‘c 5051‘“ +A‘+ f“ (9) ; 4’ y 2, £0) g 1,, / ; g , w €A($t,u.¢, 1,, - 2 )(W/ kn, ‘ 2 Off/((I’JU'S) 1.“, _ m/lt CVV‘ V car 624 / 1.th UV€(/V-£ s) Jaw-— .4 2 / uv—érIf5IA/.;) 3‘ au- 5 Z c // ’/ VV€A(;,W-;) ”r / 1/5 by f g / ‘ uwéAferiS} er / / 0/ / /2/’*/ saw 7‘ V C/ 5 Exercise 5. (I 7pts) Let D = (N, A) be a digraph and let in 6 572A be are lengths. Consider the following linear program: mm 2: war/35m; quA +1 u = t 2 Mr Z 2.”: -1u=s uEN (P) verueA vENmuEA 0 u E N — {5,t} 22m, 2 0 in) E A (1) Show that (P) is a linear programming relaxation to the problem of finding a shortest st-dipath. (2) Find the dual (D) of (P) (explain how it is obtained). (3) Using linear programming arguments show that if y are feasible potentials and P is an st-dipath then w(P) 2 y: - y:- (4) Using linear programming arguments show that if y are feasible potentials and P is an st-dipath then P is a shortest st-dipath if and only if every arc of P is an equality arc. YOUR ANSWER SHOULD BE SELF CONTAINED YOU ARE NOT ALLOWED TO USE ANYTHING WE PROVED IN CLASS OR IN THE ASSIGNMENTS. I) 16+ m Inf 2 V 7“ ~ ‘ 6‘ M A I )‘F our 5 4‘ «5+ dip *4 of D- LEI} J('mr ‘ ((0 ”T’WW”? W E 7"“ «area w”, xi: :W (M)\/{ Sincfi (P) ;> a. min;m/Zm‘/""fl A!" ”/ , [0/0 (I91 I ’5 G {/1 a/ 1‘ +9 1/! 14w flavH‘ 7 v v 47 o’mj, wa‘J‘A +511" Sma— //0J‘/' vol/9"!) wl:‘[- ,‘5 D‘Ae ‘4°r{€l./ ‘S{-J/f“+£’. 7.) 610:6 (B) ,‘5 A Minlm;zfi_{’gn / 1,] % F l‘ 66‘. (D) 1’} 9‘ “flak/M i2a~//gn ("Db/p,” KJM) UV?“ Wily—Mu»;— W‘C «Dc'l/ ‘lhar (“‘f’ffflinjl: Wl/V‘ "‘ 7v >/y‘r NJ SII’YLE Ihvr (b) ’5 Ma); ?e~ ‘éé’; 5?” 2.54 in L‘ 7 u-— 4 ‘ - 9' flu — My". V V”— 6A P “5V IM . ‘7‘, (In (‘61 i‘rk Ad V V é‘A/ ' a) F , Z. a My LP wLwe/e (P) .r a. MAXlwv£3‘*r;gn {Drab/em ~IL,+ 7) {canélfj we." know HM," "I'ch va.(v(" a‘F (P) r; alwaxy; 5 Jae-0+9- ft‘mn of f‘zvo—l +v +L'f Vw/vf’ 01F (D)a TLV5 , '1 i ’ In In} case - are? Wuriar ; (ll/(P) 2 LI) 610$??? W£*,~c lav/<14? 'rar (~ m,n,m.v,y. 5t-‘j.(1¢¥£ V? Wan‘yl' +A’(‘“"~ _ Exercise 6. (1 7pts) (1) Consider a digraph D = (N, A) with arc length 10 E 3?" and no negative dicycle. Suppose that you are given a slow program that can find a tree of shortest dipath if there is no negative dicycle. Suppose that you are also given a fast program that can find a tree of shortest dipath if all arcs have non-negative length. Show how you can find the length of the shortest dipath between every pair of nodes by using the slow algorithm once and the fast algorithm |N | — 1 times (we assume that there exists at least one dipath between every pair of nodes). (2) Consider a digraph D = (N, A) with source 3, sink t, and capacities c 6 RA. Suppose you are given a maximum st-flow :12. Give a fast algorithm to find a minimum capacity st-cut. Your algorithm should be faster than the Max-Flow Min-Cut algorithm and you should use the flow :c to help you find a minimum st-cut. l‘vr‘ fhe s/ow pk/SDri'fA/v‘ 4.3 4340/ M 4,1,5, a; gaaarkj/ als’fa+}i5_ Lt‘t y; 17: flu: loafk 0'? 44¢ v,v‘.-‘JFpe+I-- \// W") = Wis +91' '2"; — gm“ 7'41) I; +/t¢ (so/uprv/ 54v /; le-f 5={J} 546; I: an; M We 64 (51AM; I; n J ) suck ftnpf‘ x; L4, and I£;,;¢$ 3%!9 SJ ; ivc‘v avg, 570;? 5 ,5 a. (p “fin/awn a. 5‘ S” {0? Cap c/4y Lu“, 6762']; 54?? a Q- A. Who-{“3 An Fur/file “/é€ l/dA 9 r,'p£: that} I (0 Mflb y {‘55 :2 This page Iefl intentionally blank 62, lax/Ln ‘ , / ”I “"9 C(mL‘k-ex‘ c rags +542 Mé'me 5"”? ‘7 I4 - T0 36" +0 7‘er Sex/146 Side [m )(U " = 561 (1—900 0/) mr~%l¥f~ux1tl n d ”*1 c .; ale) fhey jus‘f Ase fhelr ‘func‘fldn; Tofu/o3/5/5 how 4 m wo/ 1Q ‘Hm _ ¥ me cc/ coffee brc’a. L: beravre 7 Cm 7‘ ‘lt/I +142 J‘ff cup I I erenc'e beiwtfifi *4? co‘r'F’fi‘e‘ W4” #6 Jonu‘f. 4 \ / VOL/A 1 I, on I A 9 6f w s ham/~15 greed] J) {fang/{r ww/A ”Ha-[A m‘f ' A ‘8 £va 3 c - He mafia Amy 56’ch $1,”! +4? a“! 5”“ /,-L A L L 49 SC 00’ AAJ ' em Exce//~O“/ ”waft, [0,03 an,“ A7046» 3w?! ome S-é‘m?!%&~ “)1 *Le new {‘4 / 7L Q‘KrajL‘f A i ”0 A? 9‘”/ WI»! Defilna 1 ‘1 , L WA ¥ 6/ In MA'fA- (uniov! Ag, Ma )lil'lez‘ €*5&‘€o/ A (LA ox mo. 6 U A . H W l/ S c a J.F{“erg»mcc. The gl'f/ ref: ”49/ 6 Ox'r'Ier I Saw {1‘ 56/» l" k ‘ a 9V7 “9’41““! 7" 7%" F/U’ new 7‘53, Mé’flw‘l 5‘4“”wa / .. Q_ W4m‘J 9’0 sffJe/‘j Wo/ (OM/wk jeeél [wave I‘h Au They‘re bo+k wig Mala; I [on-man ‘ This page lefl intentionally blank ...
View Full Document

{[ snackBarMessage ]}