{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

HW9_Solutions

# HW9_Solutions - ﬁmek ‘1 for E4004 LPNs 6.16 Sohm(Mina...

This preview shows pages 1–6. Sign up to view the full content.

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

View Full Document

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

View Full Document

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ﬁmek ‘1 for E4004. LPNs. 6.16 Sohm (Mina dqnmm pmqmmmrnﬁ. J; (a; PM W sh»er paw W W aﬁc‘rn at M002, A. Damn frcvr Length of vhz SW? Paw from A to U. using mam 7 edqu. i=l , f.(B)=2. f.co)=‘l, f1(3)=uo, f,cp;=lo. f.(c>=oo_ 1:), ](2.43): min (051 f.(C), madam), Eb-rflJE), F%+f,(p))= F] , (D ,F) We): mfn( Bedlam. Do+f.(D>, Fc+ f.(P>)= 5. (B) . fut»:— mrn( owﬁm, bv+f.(9>)= 1> (9) guy): mrn( 9E+ 19(3), FE+F.(F))': p (3,1?) 1MP): mrn( up {43), OH {1, (a), ewﬁm): ‘? (a), 1:3,, {5(8): mm ( 0% {21(0), bé+fsti>x fb+ﬁkthE+ﬁtP>= 8 (C) jaw): WMBc-ffum, bcﬁﬁtbx Fawn): I7 (F) fgw): mrn(w+f.cc), BD+ ﬂue»): :8 (0) {5(5): mrn(ge+ﬁ(la>, 3FE+ fun): H (F) fun: mm (EFJr ﬁn», (Inna), EF+ 11(6)): I’; (0) «=4, 114(3): rm'n(3;+‘?2.(0), Io+fw>>, Mimi), 7+ﬁm>= >0 (C) {14(6):an ( n, m. 1: )=H (a) f4u>>= mrncao, l3)\$!5 (9) 344(5): min( «8, I5)=15. (F) f4(F)=mrn(ng,25, 15):» (E) f: 5, #03): mm ( c4, :8, >5,>o>=(4, (C) f;(c>= mFAQ», 4., M): J. (p) fut»: rm‘nU4, go): 24 (0) {4(5): minUo, m: :5 (1:) {’NF): MDT "1/ m: :7 (E) E; shortest LUMij shown [min- shortest pm tree: Ma): 2 A—ue . 1141(6): 5 Aagac fl(m:7 MD {HEF‘O A-vE ¥,(F)=‘i Aw»? (b) PM W sfumcut pm tree ma m‘qm an: mm C. Dm 3am): bu)qu of ﬂu slwrtm pm from a tv u, using mam“ I adage/s. 12'. f.(A)= oo, was J; ,f.(1>>= (J) , {49:00 , fat): 8. 1:), Wu»: mfmlimﬁm, 5mm), em 12m, mqmm: 5 (a) 1am»): mmMB’rWM, DB—rﬁw), Ewﬁm, F0+€um= :5 (F) f>(D)=m;‘n(1ArD+fl-(A)l lawfwen: n, (m we): mrnmaﬁm). 33+ 10.02.). FE+ﬁ<F>>= [0 (F) {149: mm (AFJrfMA). Wham, "EF-f‘ﬁtEH: 10 (3,15) 1:1), qu): mrn(n7, )«o, )0, >0): :7 (g) {3(3): mrnq, >5, yo, :7 )=7 (A) ’ ﬁ<p>=mrn( p, >5): [2 (A) {1(E)=mm(15, 25, 1;): 12, (F) , fJF): mmua )>.12)=|2 (E) [:4, ﬁm): mrnUf, “1.2;, 22): ‘1 (B) 104(3): mm, >2, :2, 1‘1): H1 (A,F>,f4(p)= mrn(24, m: '7 (9) fans): mrnb‘], F1, «4 )= [4 (F) , {Zapammu‘h (4, l4)=l4.(B,E) . i=5, M): mm(1l, 14, >4, >47: 1!, (8) {5(9): mm(l|,l7,14, 1|): ll (A),f;(D>=mrn(Ib,a7>=rb (A) 125(13): minklﬁ, 1‘1, Ib)‘: 16(13), fHFF mrn(lﬁ,>b,1b)=rb (E). ,-—> shortut Lu)qu shortest pm: ghor‘tm W two fJA)‘ 5 CegaA ‘ f1de 1; Cat; g 10w)? :2 cabaAab 121(9): (0 cape ﬁcF>= 8 cal: 9. Use dalmmrc pmljrAmmfnﬁj {79 gall/a a knapsaok Problbm in which W knapsaob Can hold up to 1); Ma and ﬂu imms 1er Coner m cu famous: item waqmtm lgwfrt l ), [1 2 5 7 >5 1; 7 50 Answer fad) max bwefat of units (7f 00%th m cpw 071 Jam ’0 th )2 X. it of {tans u b.=1> 0;), W=1),. = ))‘ want ﬁn)». 0 fuel): {9m an d. _ 9 - 7: @ fuoh— £333 .bsxw fwd ax». bah. 9 €40): f6“): "‘= 5(6): 0 , Xr= 0. fan): fs(8)=~-- =12wM= 50, >0.= I. @ fz(d)= szXIXT ‘Ja; (d-Cﬁ‘ﬂ’. '5 ,(o)= fuo): 0 , funsfsm: o, ﬁbwﬁuwo, ﬂapfowwo, fd4)=)0)(47=0, X50. f:(5)=ma><?ﬁ(5),15+ﬁ(0)7c= :5, fab): max ?f»((7), >5+ 105m} = >5, X: =l {50): mm i fam, 25+ {’50) ’,= 50, {22(8): max H?qu 25+fsm’. = 50. X210 {54): mm ? fu‘h, 15+ﬁ£4ﬂ= 50. X, = 0. film): ww ffwm, 25+ 105(5) , 50+ {26(0)} = 50‘ X15 0, 2 f;(u)=m”\><?]as(m. 25+ “6), 50+f5m1= 5o. x;=o, 7, f¢(«2)=mm‘(fa(lz>, 254f5I—{M 50+ﬁ(z)’u= 75. xt=l 30mm: ynaxéﬁun, 25+ {15(3), 5044145)}: 75. mm SI blyv 4' . \$ 11.01;): max 9.103(9), [2+ am7), 24+ ,(7). 3b+ﬁ<4>, 48+f>(1>,=75, XI: 0. O uni-ts of item I => Total law'sz = 75. )7“ Conswtu vhb following pram: max 5x. +4x,+ >00, Sit. 4X.+ bx” YX; 5 8 XI. Xx, )0, 7,0 integer m» Sm WS 025 0 knapsauc problem. ‘Hm, knapsack can led H) to 8010. 17mm am 170 [email protected] wnsrdmal. Mm 00qu < vb) beneﬁt I 4 g; 2 ’2 4 1/ 7 > (b) Construot a MW fLo modal corrupondrnéj to «bias pmblsm. a) 7 v, Noduu pairs ( item Consrdared, wuqhx. of knapsack). Arts is); c if we can mow, fawn .' t0 bid Win51 cumin number of 17M items conSIdmo‘ in , and mm considered in — char in} = I . Baunds= All upper baunds v . Lowe; bounds 0. "ExtUna‘ FKOW= S’fart [I], “ﬁnd I’d. Arc [mph = baasz added If moving from i w J‘. Ara F(ow= I: 060%}? the, amp from 1' 1:0 J‘. 0- Wwisz. MAX W pod-A» from start; to and (Lorre/spends to an Optima! knapsad: solution. A‘nodner possTbkL mode/l rs an m mm: pmjz- . Nada/st me, i =5 , units of wag/d: m (aft for J;-i+l,---’). Ami-bji'ﬁa'm we, 1-» swap—J): jumbst 1»qu wawtfarsmjej, Wu «C (puts (7" might (in spent on ma 1. Emma's: All uppu bounds I, Mam bands 0. EXUZ/rnal Flaw 9mm D3 , and ["3. Are Length = bwef’nr added from H» 3. Amflnw= Izacwrv vha Stapfnm in‘,o:o-b6mwrs¢ Max Luau“ pawx fmm 9mm +0 and arrayed; 170 an opﬁmal knapsack golm‘on. (a) 80W, m problem u/sfrwj dljnamfo pmajrammrncj. fﬁdh my bwefu‘t if d units ma sperm 0/) items “b,'t+u~--%. Yr- n of item! , bn= 5, ct=4 110:8, T=2; Xy— 5?? of Franz , 1794, Gz=)) want, f,(8>. X»: t? a? Mm); , b5=1, OF) (Dfudwo «far all 01. max Q 115(01): :22); fbaxzﬁ fﬂd‘ C4Xa))) = )00‘0‘ b5)“ b 124(0): fun = 0, X»: 0 , ﬁm= fa)»: 2, x5=n {15(4): {25(5): 4 . x51“: , f5<e>=fm>= 6. xa,=% , {25(8)=8, ><+=4 Q) 111 (d )= \$33 ? bx. + fud'bx.) ’.. a ;(o>= fun): 0, fun: fwmo, fun: {ﬂow} , x; gm»: max H50), 4+fato)’. = 4 , x1: ll 0 {ﬁlm—~— max Ham), 4+ {huff 4 , XL: 0, I f;(5>= max Hus), 4+ {am}: b , x,= l. fab): max Had», Arm“st 8+f5w>1= 8 , X;= 2. ﬁn): max “25m, 4+fln,(4), 8+fwﬂ= 8, X}: I , 2. f,(3)= WW ﬂaw). 4+ \$45), 8+f5m‘,= go, xyc >_ @ fad): 4m? ? M. + fud- com} ~\$ f.(8)= max? {11(8), 5+f.(4>_ u0+f,(oz’;= I0, X),= 0, 2. 0 Watts of Item I Dr 2 units of item u 2 units of item 2 I M517 of item 3; % Tomi loanefrv :2 :0. Than is, far ﬂu; m‘qmw LP pro/ohm, vhz apn‘maL go/uﬁm Xi: 2, Xt=0/ X550, 3=f0. 09 E a 3:, 3+ § N is x.=0. >642, Xa=‘ .‘Z=IO 0T ...
View Full Document

{[ snackBarMessage ]}