0% found this document useful (0 votes)
36 views

Ada Assignment 2

ada

Uploaded by

sageranimesh20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
36 views

Ada Assignment 2

ada

Uploaded by

sageranimesh20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 19
Rawls nando ~ Asslawment- Cana *csben we KON: Asslgomeyt “2. Ea Nor 14gigooagar (ad) QE Find an optimal Huffman code. for folowing sek of frey A250, oras cals 4a 218 Fy 16815 ,de 40, e215 D 66, first of atl making @ sorted disk of Prequenciy GCOS combiving lak wo clemenls amd sor ting again we Mowe (40 sol AS againd adding Jot two alements and coring, we ge repeating procedure t eteet [eel 2e| Bes] nov creaking Mulfman’s coding Wee and abe! ing, Jett 2 © ond might a> \) we gek + Ges) oe @ © scanned with OKEN Scanner from Waltman te. zB ~adion ae $ code Mee we hove the bina ep) Crtubtman code table) Q3- Find the optimal sched for He falling Jeale) with given ~~ deadline & genadkion, T = a) 4 a ao | we cam ‘nave ak mosh deadline of 6 day, 23 4 8S Jarl : a “adereaah fo do tos optimally , we wilh set peiis in cureaning, order Ge of tir profits c | . (i) Iwerkng ol Ty on dog 4 2 3 4 6 Lit Tt 1 Giiy ironing HK Te on dey 2 tyme eee Taya hi: en dog > “Cor Lith doy ts 1 Zo. alveady (led) on a 4 ss ¢ yer © scanned with OKEN Scanner iM) oe on Aas Vay doy 2/3 gore” aca ) Ts coms be Iwrerked 8 we are busy UML dead ine Wi) Te cam alto nol be inerbed + (Ui) Ty cam Wee interked an onaj Hep ey among: dey S 4 ¢ Final sched \ 2 32 4 se Ti Tt 1m UT % o's tote penal = + Pe = TQ Ce) f z ala] a} >] \ fj 2 yl 1 ph foo} to]. Is [2t sovting tanks accor dingy to profiles My Ta Sle a 2/1 a |i Pi woo} 24 1g 10 GF inserting, We hwe marmem deadline, op 2 dog, sro om inser reay foxk T, ob eg at \ 2 T © scanned with OKEN Scanner UD rosertng tok Ty ak day 14 ~ \ i wt 7 a ayy ane WYhed we can't do teks 1, ov Ty amd Wig ib gure fina) adudue “He tered goncblyy= [25 | Qe Find ty optimal sol" for te Wwapsadk Instomey n=Et, Mets VuPLy ty Pa) = (lo 5) 15,4) 6) 18) 3) (wr) way 937 9d Cry ays,aly al) Sok veh ok ae al calodode px feadtonal prot per daw o& cach elemenk now, sects, Grackion grutits we 7 © scanned with OKEN Scanner ewanlg from The top now, we wl sry to tee all He ok : ah Xp bottom HL cur tobe wet ts Int Maney “8 to We \s, margin * ro = S534 © scanned with OKEN Scanner 32 Yoly, Ss © the shovbest prt ews shag Diletta’ alge a hg ey BD Se, est of al, apply Aijtes\dva's algo. wie wil oni dAistana From veya (to every, other vertioe al 00 amd umove abl ac ro) ® & O On ® $ e © ops) we have 2 crvaielsle eger Er amd Ex, chedking utv< Wyt 2K 00 Ces) akc), inger Hing €, and €r¥ - 20 ,70 «@ o ®©. ? © now, we howe eae cago? Gs, @,, Ey, e, chedeing condition ue have Es, 243400 Cus are fe ee £42 8t6<00 a © scanned with OKEN Scanner | | | | | iS . Seeeeeeseereeeres eaters eee eereee © Temoving C4 am Vencr ting Es, €3, 8 ame Be s oO Oo _ 3 |. Oe + \3 now, availalle edgy s Ey Ba, Cyy Cg, Sy > Cresking eendition + BE, 3 si < tS) Gg i jaad7s bgt Sit A\D ey) 13t2<00 br BIAZY SS &, Sx6X% 0 60, “Femovng €3 aad ivierking Cg, Eg and Ero, we have fina) shorted pakh ayt Z s —_> > 2 “ 6 K% Ona) 6 We 62 we sholot pal Crom verti @ fo oll edges is an shown alooues © scanned with OKEN Scanner © Hrd He shovtoh path ual ; S tol I, talloun Wing Bellmmunford algortin fron Figure: To start wilh, Bellman favs alge, We will anrign die, distint a =. pk sod real now, moiloble verkar ig ©, exploring oS possibly pals , we have (a): 0+ X20 (BD (bs or < 09 C2) 50) updatinas @ and @, we hed © scanned with OKEN Scanner of? Or 4 aa SP Secon\_vound = now, available verkos + @), explo ings all gala Prom @ ond Ore (@s 2-2 <3 CE,) G+ 23%" (ep apdking distanar of @ and OQ + an &. oe Ee “) | “2 now, awailalle wale verlions(ay aud Q on exploring a possible pa o af @ and (f) we found sre Hey loothh don'k nave amy outgoing eds, eo ferminakiy) Ballmanfora algeritwm, © scanned with OKEN Scanner EE "SO 1G Pe, our Kinch shorter pal trom sto fh ts 1S volt ef walgt a4e Solve the (allowing using prim's amd KirusKal 's alge Hom . 3 @ (D Kru 5 al gow sorting al eAgs amd making dist © scanned with OKEN Scanner ComMuckin, mn . : aph Wing all . in, eed oo one mon tyche mahal edgey 3 ed Mou) oe to visthed Boe svat ancy ie be fron vite \Ptep_ aie \Step 2+ 0 (ee 2|+ (Bey 4\ This is our final winimum Samming tree. © scanned with OKEN Scanner aaNet Starring Sdae 04 @), colding vrata Coaaiete eda > 5 6,0, adding edge Sos it han minim wedge + Sn 7. AN, ‘ pe = () awadllalbte edguy~ f + Bey By, £3,6, int . adding aie qe fa, bey &) bei mame edge $ By ae Pe vy Ve 6 ®) &® ee S © scanned with OKEN Scanner CY) availabe ¢, gat BB : «2, Be, Beg ne tit aad c 5) £5,8, minimum edge 6, aCe ji oO & and Es, we have, a & : db oP IN 11 Pt Cy Ge, Cy, minima ee Prey Ei, Minimum edger by (V9 awaidaloe edguy* © ro,Fra , mininu ebay + e © scanned with OKEN Scanner kina) atabwun, spamni 3 tee wing priva’s alge + 2 $8 © Before arpa ane, alaoritnn , we wall ignore sdf cyclase (0 Keretea’s algorithm Sorti, all edga on thar weight, we howe . g Crapred Hen rnus tw pr Pee ee et (ga em’o0l | © scanned with OKEN Scanner Oe Oe ISve = a SEPA nud pop Elep = fs— nd ¢-8 4 ©+® b (e) ee nad CFamd C-8 blep u| CR amd -P ® e Bie discarded dua to cy dt Ia & (Sep S\ B-C discarded Gt pa a-ce due to Bat formalin q \s \ 3 aah Al of the cage verthe are Induded, 0 his ts ous Gna win wu Spawning tree + ® % 1 ©+© {3 ©, ® © scanned with OKEN Scanner Step 3+ Available edger 6,84) By Pw Su, & Minimum + Cw Ske YE Dvotlabole edger ey Ey 7 REx, Er) Sus S mi may edgy a & adding eg s Step St Available cAge+ Eby Cy, &y Miyiveoaiven edge > addiva, 4+ es © scanned with OKEN Scanner LY rs algpetin: Tedsaning Awe given mop, we have now, for prim s Algor, we will Aalte aia an bibrary stort hodty a @+ step + Availabu. edges 81) Pry Ba, minimum edge £3 step 27 Available Aga 62) £4) Es) 65 minim edge adaling Go © scanned with OKEN Scanner which Is came teiutk a. Kyurleal's algovittrn: GW: Nerange tne ackvilig so that darrae woof achviia can be scheduled Se 4A, Rey nnn A atom ‘ e i= <35, 44, io 3, Wy 3) Ry wy @D *e solve His, firsk of all we sowh ty adivity array bey cond He as Primary parambor and stant Hme at sewndary + S | Ay el Bool 84 | Asc Ros lh | Apa |g Mio 5; 1 [wg elu ls et\ alu fa ho Fi ala\s + \s 0 Ju fe [3 fy () ob y=0, al activity, are awailabli, 50, Webi talking mini muvy, end Hye adkivity + a) Qi) of te 3, Availabe ackiviHa=hy- Aro, Miabmun end Hime fs (l) ( \) akre4, Availabk acti = Ay-Proy minimum end fin A, GD) (vy ab ke, Availdole activitiaSA,—Piy, minimum end tine= Ae (3) (yak $29, Available ativiiy= Am Nyy mnioun onl vn Ag CW) © scanned with OKEN Scanner wb ak oe\ ania achive, = hy Aro, minimum end Hint hy W) @) ak tel2, awaildby adivily = Aig 30 We optimal seludult Jo have maximaun number ob ackvitiey is + i. 4 ye 39 Ww males VAST EL |S) [Forel punber of adiviia =F] Tokal number _o © scanned with OKEN Scanner

You might also like