This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full 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 FordFulkerson algorithm to ﬁnd a maximum st—ﬂow and a minimum capacity
stcut in the digraph given below starting with the initial ﬂow given in the digraph. The ﬁrst value next to each arc is its capacity, the second its current ﬂow value. At each step indicate the residual digraph, and the augmenting path. (8,0) ﬂu 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, ﬁve 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 ﬁnding 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 "ﬁve ew/lrﬂ’ starf year“, 4v 7U”: [Alexi End/'4
3 Hr / 1‘ _ ,
7’ y e 0’ .126 ﬂ. a ﬁve]! L0,,ijanol/ﬂﬁ 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’%“
(PWSﬁ 'A 4 \
[Vex‘l/ (jg V a J’H/‘EurI/H'f) you»
O\ Mﬂﬁ’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 ﬁx; , v ' cur/(ﬂ .f
A {if fine sﬁvr'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 /ﬂ/ / \
\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
'ﬂns we have ‘{ case} 41;, ylr 6/4 :
5:13} N. w 42 5 2
L /
T v1 71?, a". na‘l‘ efFez'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) =ouiSI/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 ﬁnding a shortest stdipath. (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 stdipath then
w(P) 2 y:  y: (4) Using linear programming arguments show that if y are feasible potentials and P is an stdipath then P is a shortest stdipath 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)\/{
Sincﬁ (P)
;> a. min;m/Zm‘/""ﬂ A!" ”/ ,
[0/0 (I91 I ’5 G {/1 a/ 1‘ +9 1/!
14w ﬂavH‘ 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;zﬁ_{’gn / 1,]
% F l‘ 66‘. (D) 1’} 9‘ “ﬂak/M i2a~//gn ("Db/p,”
KJM) UV?“ Wily—Mu»;— W‘C «Dc'l/ ‘lhar (“‘f’ffﬂinjl:
Wl/V‘ "‘ 7v >/y‘r NJ SII’YLE
Ihvr (b) ’5
Ma);
?e~ ‘éé’;
5?” 2.54 in L‘ 7
u— 4 ‘ 
9' ﬂu — 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 Jae0+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 ﬁnd a tree of shortest dipath if there is no negative dicycle.
Suppose that you are also given a fast program that can ﬁnd a tree of shortest dipath if all arcs have
nonnegative length. Show how you can ﬁnd 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ﬂow :12. Give a fast algorithm to ﬁnd a minimum capacity stcut. Your algorithm should be faster than the MaxFlow MinCut algorithm and you should use the ﬂow :c to help you ﬁnd a minimum stcut. 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: ﬂu: loafk 0'? 44¢ v,v‘.‘JFpe+I \// W") = Wis +91' '2"; — gm“ 7'41) I; +/t¢ (so/uprv/ 54v /; lef 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 “ﬁn/awn a. 5‘ S” {0? Cap c/4y Lu“, 6762']; 54?? a Q
A. Who{“3 An Fur/ﬁle
“/é€ l/dA 9 r,'p£: that} I (0 Mﬂb y {‘55 :2 This page Ieﬂ intentionally blank 62, lax/Ln ‘ ,
/ ”I “"9 C(mL‘kex‘ 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‘ﬂdn;
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 beiwtﬁﬁ *4? co‘r'F’ﬁ‘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 maﬁa 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»! Deﬁlna
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é’ﬂw‘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 [onman ‘ This page leﬂ intentionally blank ...
View
Full Document
 Fall '05
 various

Click to edit the document details