0% found this document useful (0 votes)
46 views46 pages

Daa Solved Kls - 2

Design and analysis of algorithm notes

Uploaded by

bhoomi3117
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)
46 views46 pages

Daa Solved Kls - 2

Design and analysis of algorithm notes

Uploaded by

bhoomi3117
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/ 46
Kordarak ta Soctely so Ss viehuoraltvan Peahpande Trabshote a, Tecralagy Haliyt Depadmrest 6 tonpebusdane + bang bb ! destqn and Analysu, 9 Algnichm. Srbtode : [is c42) Sot wome + Peo. Yainsees » Phat. e ; Jan Logo Mepue- 1. via. Explato Aayp tele notatont fo detafl otth exanples 9 = : ; (tom) plo: We have ‘the "folowing Asyenpin He notatfons | : 4) Bt Oh (0) ii). 84 ‘mega (-0.)” i» Big. theta. >) 1) Bfq Oh Co) Notattfon A function tn) i fot Ae be io * eigen) _ denied by. 4tn).e etn) it Hen) Us . bounded above by dome ~ Cong Janet anal Hele HAP bE a tage om. he iP there ertsl Some. gestive constont. ¢ -.anol tome Bon negaire Kegs Np Sach 4a 40) Login) foe “au ny,00 Graph guren below vepreaents Big oh —notatc ‘ Cty) tty) eraupk: Hn) = 100M +5 replacing LS OPA, ene get oe C. gin) = loon +5 . =loont+ 9. .- = loln nfo) Cgc) F “Pris tuplier that oontS < lon, for NAS fer Cc =tol ) qmieo ee ae Ft) ~€ otgtn)) Nene tn) “E®BM)- 1) 84 twega robo (209 AL jynctuic, +0) card tp be AG) dened by He) € 2.) | if eta 4 ‘pounded’ below ‘oy » ome pasi bre forstan muliple * of go) po au lange >, . - if there erick ome pote ton bon ¢ and Somme “hor segabve. inbtger ho tucs | Jha a Gs) y, Cegln) © for Ale n>-° The abave caprent too Gan be eupremed guy $e ly ad Se 9 » ' \ ag tn) ’ 1 l 1 , no n on eranipe a Hoda weer : now, loon +S 2 Ieen,. for 0% he. Ho) > og tn) bhere eatb0 -gindee mao =o 1 FY € 0. Gin) ie, #0), € 2). . “ti “Big het. Nota linn (8° . 4 Jundtiio LOM) Batd to be in 9G) dented by 4) € OlyiM) , ACAD O bounded above. 4 below by .fome poet hive coretont | routes 4 gen) je “alt luge », Ve. 14 Here vent. pedttive: “constant ¢, «4.02 and avn negate dtger” no fuch She c2 gtnd £ ttn 2er ged por all nro The -obore eapreagtos © Can be eapromed arp Micali Ou ; 3 erample ket fO= loonts- box Lion te < lol» jo © 2» c1gtn) £40) Cy = 100 2 cag)’ P|. Goealtel Np 2S adtn) - € & gin) a he. fen) £ 6(n) tb Outline an -algerfibm, + tind “mate . _ ot ® Ceae and ® blero A be -tigwe Compleretty : sa got hrs a (am) Max Element’ (ace & nail) KB delesining ‘the oa of “the “Wage elrment in a given ores ye) I]. Tnput avr aiy” “RCo load HN ewtpab value” 5 vay gear clement -i» A oy motval < Ale) : for Pet bn do VE ACT > marval » mantval < ace) a oe | sehirn muaval. ; : oo, Thme eff dency tan be caltutiled as followe | _ SHpL Tn Thle,, probleen SIX. 94 put Uo | step! Batic. -epetatioe ae * if AK). >maaval ss Steps: Each time the Contant! tnterc’ he logy | he, basic ~oyetaben’ “Uo ereudid 9 nle foe Felt ni do | vt SUC) 3 manvas n-1 2. HN = Ll, Tel a Se p-t-l €L 2 dts) = O-! Sp 3 The dofat nember of times He’ basyc . opeta lion u exeuted “ponains Same both & “bet cae 4 word care” co ft) expremed’ using 6 ‘notaltin The abore tonst rato _ can be satibed 4, Wg Xn Zoya Zieh _Bheve (ey= V8. 2=1, gto) =n fy 7 %. Py, detention Fa eeu € & (gind) aa Detign algo?‘thry . for ‘tower. of Fano? prdlea - and oblato tune complexity, . pos {tom 4 Mg orien . Tower of Heo to, “Souste reo g vst) / W Purpote ° To move in Arlt Reon source to dest 0 ‘Input > numbss col clicky D ; Woomtpnh > click More ment iP.e=') hoite (" move. obs ¢- brow’ Cource!, ‘po', . datnata) yehern « ond if Tower >] Hanoi Un- =), sou, pec vdemp)s pike Comoe any” | Dior p Soute , "fo", delt) Tower of Hanoi bn “1, Hemp, aad aut) ° Analyst +. We BS The. deme ey picenty, Can be ‘-caltutaled as Lhown below ‘ steph. The, parameter . fo be, cont dered aon, Which mopued nam ber of disks : S0p2 2 the baste eper ator cls the moverned xf dic, . fps: total numer” of “ack inovements ean be solained — wwrey the Fetusrzeate’ 2elath'on ee } Y , reoned 4D +b4 +-) . SHerwde The abe velco Cane bitin ay time. f Poe atin) + i OFher wue ® The absve seunrente vetatiss Can be tury rejeated cubsishilion, © ag tM) 5 Htly-) +8 Al adir-2 +1) +2 £olved u " 2? ttn-2) 4 244° v o> [atCn-a) py] 4ate = 29 Lin-3d 4 224244 a are Jal faye 8 = a (m2) 4a +2 — at 234074244 geowweluee gewes “the ge@medvic fener (ap te tebad vary eee ale To ry ‘Mel, Ter, et g= lal), . ae = aia ntoye gi tint) +9'_) tet Fen-1 . "2b Prove dhe dhepren ol 2 £32 294 in-air) tay "ya tn -otD rants 2 40) 4 rn Lo ced ue grey Sibce number of. ‘eleck movements ty best Cane & tame of wit Ce ,. £0 diny € 8 0aP-1)7 x Ola”) i 4uln) £ BL4Ln) and Fal) € olgaln)) thea Hilm) + fated € olmar Laity) , g2tinds, : ( (losa) oleh a Contfdey jour arbitvary number. a1,a2 , bibr - : TR ar Sb , arZbr Bes . aytdr € 3 moa bibof The abwve fact Can be wed fy colve’ +Ku Henrm, he brow that te Auchan - 2tn) ty Said th be big 0h ger) denned yy 40), £ gin) uch tant here eae} A govitive , Corctaal e ¢ paths” fokeger no datishyu the lo nphaint Fey) Lewd — fou alt 0700, . TH YU gir tat Silo). € tg ln) «fo, by on hen ‘ “4 —O filo) 4 C1. g in) : : we y Qty the falas & 61g ator), Lo Bata) “£02. gc) i 702 oe ehh ade), ca maafe, 02% , 4, n=emargn, or] -B Py-addig © +@ be have: Pin Foln) Cl. Gln) 4 Co. g2ln) £ C3xgih) + €3-G20n) £3 [4dn) +920] E0842 % Mant Gila) ,grtn)4 in @ Sinte Fil) tF2tY 03. ey “mat £4, (n) 142003 , by detteition , ad Pro) +420). € Of maa $gilnd ,grlor?) Where C= 20g ° =3 mart er, al ys mead ar, nr} Ba : Module -7 : , 3a Design a “weturdive valgeridiim fos broare y Searth and Caliulal, Aime eager og / fom] S010! Algoettinn . Binoy - each, Cisero, a, 5) h Puspose | fearch Pov an Ween i the Viet Eppa + Wem — element do be fearched a - hy elonrencts ” bo = number oy element to the lit. No owkpak 2 VP Sutrer Pal earch post hsoo u crohined, “oermue --) © & vedned low eo hign <—n-) . Phils“ Clorog = hgh) mid < (tot Abgh)/y Mb ty. zalroid) > yeha mid-+4d * 1 Ween < ACroray high <— wid -| tbe. loo <- mid +1 - end it thd ohFle eh - 4 Analysur 1) Bes cate oct Whee ‘Ween, s'be Learched Present fo the wntddle ‘ot the- arvaay . £0 “the total number ot Cornpar's ons wt bes Time Cuplertly ty 0) HW) hove) Care” OCCU then he toy to be genatheh "co efiRen al the Pith portly vy at the Lat) Pavtlioo fo the array. The fume completty 6 Gute by gottowing, rropuntente cetatis, TH. fd. / . Tha) t4 plhenoie we doe above remrrente ebro we rdy aeperted salt Ith : : J tine [4 +(nIn) - 14 Pe-4"{ Shp) fe ted (4%) saved (4) - aed (°h3) -444(2) , 40) -ft++t (3) ft t-2° Loa tole fat (Me) = tet0 ote t ne hore g' =9 tobe leg 0 both fide ne get» ‘vlog 2 S i) » te Map 4th) 2 9 nth SF by 5 2. Time conplortley 6 tyo) Bb waite “He algesitteo Fou, ooeeguorl « 60, 8 ACO, 10, BL, QE, FC, Br, onl Vrae [rem] QI. Aagorttrin 7 Mergenoet (a low on . H purpare : ade cludth fo avray 4 « nxt + wnuortid -vecloe 4 y Owpd > A 'u. deslid vector ft Low % high mf & C Low + AighIL ° mergers (a; love, nid’) Nasgeros! (a, int high? Siemplamegea, low, rtd, Agh) ent Single Movge CA, loro, nud, hyp). N purpose : mage dwo ary aug) h Drpwt + 8 sorlid jore tors de a 4 mati fb _ "agp Wo owpwh > cortid ateay Leb , jeemider , k Slow while Cicomid ¢ 4 7 <=highd FAO <0lf2 Yoo’ COR) eared To eyed ee k < ke tbe clk] < acy) eo) k chet endif end hele whik (f4 Brg >ooy 7% how pos 1 apy . “v ‘bey oor: pduy wu + ‘hyew & pomp poy; andend u : Caby Toray 4) Harpy ay >: cyuoly Te (wry Ihvabvg map yy aun ye - poopy sf veyuoly yuo dora vf [># Ogle (rel op! 3g ! splot st ' se "ee ae | ( era 7 JB 01 ey ct Ter apy oe — : - aq'as } splot Partihecy (a, foot high) . WN puappre * isd Array wt -pav ti Ie dnpat 2° Low high, A’ howd ¢ Pahkoned array * pivot * allow) Pe lew, nl 2 hgh whik Ci c=]? do feiti ohik tpivet b= =Alil) de faq wrth sn md <3) , . Cachan aft), al § a ent while bathe AOE aClod) : veh Jf , : Analysu : : The bonck. Cave peeux: When at each — fovecalio’, Othe prtedun, the Uurent array ty pardthioned toto dwo Suboa vag BAK One of hea bury enighiy The reewrenie relaltic, foo AAU Care ob TO)=s o FP nes - se ) TOLATIAD 4 Odtgsisge Tinye Tl) 4+ Th to, - Tiny) to Tln-2) t@—Dvtn. = Tin-3) + heath e9 = Th-o)4) 404 --- 2% ots tn e 04) pan - = HLH 2) + loi to Tine nlot) ; Le, aoe ft) = alo) ‘ . ee | nln)? MD dw) € 0-9) fF) € begin) ve May & @ ln?) Ab Mat & topological opting ? apply DEC. -fov below op do olve topological fwehrg [eH so ‘The “opslogical Sort vt a divectid “ acyelde graph CDAG) @e=tv,e) & a dine ved uery af art verter Such Rat foc wrong edge (uw) lo graph Ge veka ut “ere bejere Mhe Veeden Sw fo he oxduetiy! | A sbopologicat Set oa geaph “Can be viewed al an ordeviry oh vertices” aor a horizontal Lig go fred oe “dinectid edger qe tom lat de Fos the geaph grin, the Lepoleg boat Ob}euned maine) the allgeitien qt belo. | Tepplogtcal Sost Using DPE Auwthed Can be obtarned aire) auemead * ohege : he Sebect any. orbitoy veel 2. Mhao Aver “G Wieffed for the me Ginig fu pushad ‘on the ofan Pee er ca “betoms _adead end. , a - Renrored — from Ke shacks « . A» Repeat “she sedoe Jor ane en rv) the Ha” - ff Rereue the | oder 4, Aeleld flere . fo oer the “topsogte equines : Sert Can be lye adjlsp)_ Neder Vis © | fps | shack Pa ee a = | a b - a,b | - | a,b & aby - a\b,¢ = arb é (e a,b 4 Abe, gi | ab, 4 ¢ aber git - al a bgt = Abie 14 ee . | abi 4 = arb, €) dF arb ~ abegit b al a Cc. 4b, 619,8,6 . a,c a Abe 19 B,C Cc | a | abe de feo 8 Mow the garh ne have. verde. ohech Je nl vReied puch Hondo the Meth 4 add cto ¢ a = Oybied Ad ~ | a S A be GFA the drdee to HMC — Ac weeds ces ute abetted yy obianed For lat Column Vatys are | et ei byeiaid Topologteal order & obdarned by voremtng the Pop pea eecleo AAC bog at 56 MODULE ~ IN «seq Fink nthe ophtrnas POURS te “the Enap ck, Tnstanct Net) Melt wl greedy mitted, Sepa ; objet | 1 | 2 ea ea weight | 2 | 3) \|t\t }4]4 mie tw Lelel Lele [2 Steph + Conpule the proftt |rsetyn aalio por each obyéck [objet wetgnd Probst | Rabi t 2 fo s 2 3 cae | 1-66 | 3 Ss ls 3 4 + + [4 gi ! 6 & Ge | lg AS FP i : 3 | Sepa! Soe au Hens to the descending pedis sy Ade prot} neta eabis . oes objed t objets —olyeck 3 lye # ohyeel > Ly Rog 3 3 bo bE obj eek + L 7 Sort {Fly Re banprach by pty objects One by ones Knaptoct : objec 4 Knaprack A it | @ pT ee 6 | obje as £ 7 Ig objed © object L 1h LO [Objet olject 4, objet ¢ | 24 s objeas objet! , objed 6, | Aa Obes 4 0 ect object} Object $, £2 ___fobject 3, obyect 4 _ 4 objet 5, Object! podject 6 , cF object 3, objecd 4 , object 2 Now the Fnmpcack — capaetty + be Helle we OL, bd objet 4 Aas Negrt of ot. nce 6 factional. kanpeack Prblex | even fhe Feacbra 81 any Hem can be dakn So, tnapcack tlt Contos Yollooirg F4emu be | gar rae x en ip v © ante gen geaph tock mun Willan, we Celect -1 2 Ale e cdges © the miloinum Spanning” tree. Ape g me ate Selecteol the alesis chy Cet of MST i= “gt aan te ot Nees fay Z ba- Conttuct 9 Huftera, code be che following |v" date a ey; fiom ehunctes A, | B | c Probable tity | 6.4 | 61 lca joss |o-te [Ore fo Ende Re fexl #OACKOAD 4devede’looolol!loololo. etept) Pue Wet are vealid dy Chataclter Ae, CD) [hs o-4) [e:0.1] fero-2) [oro] roe] Shepa; Tdendihy reer NH. Smaller Proquentitn f- make One wf tem as lett Child and Re OW aa Ke etght child Sepa: Seteck Ano-thee aoe least frequents 4 Mabe bee — ! ° ve Shep Af New anion We poobabflilees br 4y Orde 400865 Bde 4036+ are teat, qrequentiu So Agen & hee “tting ron SHA: Now ise would jou hve hag 0.4 do ¢o Now We tabnbate as codes ord obtained New, Ne vabnlal Picmmetat cad Rc lohatacs __# | ee Probably, | 6g to ois | ow | [octe rvord | © Tree [t TONES al AOE Bnipde The Sing st ABA CRBAD : © 10.0 Itoootollloorolo ; loo OL OLLIOOLOl0} 6O Folr{Ooloro pot ) | tipoloLre 10 | a ; | | | " Of010) 0 Pos jo 10, FOL | @|| | { Aeoded Sing BAD-ADA. | 6b Cobcubale he Shovdet dittante and chavtst- Path fom verter & do verter 6 Using Difbrads , ftom] v Solulisa - Soute =s~, Aestinadion 0. lett adjacency wadrin + [o Ws | to | eae @® \ O}| S| wlao} leu 20 | @& | O} 29} om} w ‘ wm [lo | @ PO Taste t ol a oo} a L “ © sy S |vew-s |afvlemin( atv], |Povl =u ed | | | dtu gout) pS nae | pa ($3 io) Naa JADd I= anim (094-460) = =e 3 la iy ' | JAN] = ainlee, tio) Lb | 2 | | besa: wink, 420)=% [prea g | { A049 = ening leatas)= H | | - a 1S 3,1 1, 2, ws di min (oy vt =€! pole Pa | t | | | ALD} s tN (oo, LRHIS)=. 9) Pla c1 | | ‘fo miami) 3 | 3,),2 | 0,4 ial) © mint, aaron) Phle2 | 43h j f | i (dlA0 = rnin (34, 2440) =34 | | | } | i $}3,1)2,4 0 alol= min (44, | _ 0.44 anneal = i eee ae a : L $13,424, — i ede ne i 0 wo . 1 eaaeeeee ect L | Shovtest pals (& 6539 2220 Cort, = APIO FIS+20 = 44 > | Oa Module - 4 Ha Explor the geneal eal “procedure + Solve | a oaks gah problero Ui backwarch* approach bh ao names 2, / [ tora _olutsg °, oo fet ppl) be A aioienum ¢ Gath pat Here, ae ‘ doy fovi. ‘ oer bees Ct 5) ‘be che toe! oa, bplip) Prem bachioatd. apprach we oblay : Beoet tt) = “nto £ blest cr, + e(a joe Leven pcp eat etietyy : Emauple 2 COMMA” musta geaph ith o stages 1 Mio beast C20 slept: toe} of verh cea _ At cheage 2. an bepett2,2') = ming “beat (1)\2 +6042) = inin 40449 24 24 bws(2d)=2 mts beoek (11) 4 CCUD} Smingo+sz? ope, bestO.4) stoi { best CN ACU) omin.f0435 9 bust ys.) Fenind buset (141) FCLYED] arming 0499 22 Exe > 5 out 4 vesces At Lage 3 Ave buet} G4) = min{ bead Gree, beast 62,6) 2 6l3, 65 eri {Athy 4423 5 minh 34? 24 obtaind fom reler 3 bios (8,9) = ming bin (2129-4 63149” bined C2,2946 (319, Déogt (2.8) clr t)4 emnin £442, $44, 24119" shning" 1413] etl, Oblained peered : bust (3\8)= ming btort- 0/2) #60218), Prost) acer ay, boot (ade ley} : ely {Athy Sth, 248] , = rib glo, [4 LY =10, obtained Po 2 oO Steps Cot a yerticed - Ad Hage 4 bioay LA,4) = anil beoet (BBV + CCEA) beortla,#) 464 4 . emo 46 NEEL emisdic, 8] clo obtanid le b + 7 bwer (410) = midL brow (3.4% ¢ (510), boot (3,4) C0419), bee (213 JE C( 8 rd) . zmb fare, ag 1048 J amin ity 1,13 ple Dbhasred gor 6 at, best C411) eming beost (3,8) +cl8H102 = mmfl0-46) le, OBarned por 2 Step & + Cost § vere ab Sage £ bwet (62) =w ief boot (4,4) 4014112), bloat (410), + Clio,!2) , butt Can ¢cUn,120f cals f S44) 1442 | 1645)! =m L149, 16 214 = 16, oblund joe recter to he now tabulate att Cort in table Vv ltl. is [4a [s [él evalortTy bed | o 14 + | 32 2 Af [to les [tg [we [re a |: rf de ft fepe ptf fee Ty Tie alsw) a. Als2)=t0 pats oblaméd 'u ACA Wo 26 {33 >6310 =p (3,6) =3 Aly3) =1 Hb Conehrack 00 opRenal binary Search free — foe othe fotlas iy Dems 4\B8 |e} o Prbabilthe; [5-1 fo-2 fO-4 [Ore Soludwo 2 There ate 4 aodu, now as Ae Pll Dunder the rods ABC O 1,2)2,4> 4 cake otuple tly 24 . The “dete sabes 4 “est “inble “ge a4 gies below 1 ee ' fi 4 | 2 62 2 2 3. i S 4 4 + s . " oo , yt © * Oh Fable = Adot ’ table c{t,0] 20 C0211 <0 cf3,2] =o aig pemula cfr, fa] Se ge clas )zo [ (atte) 20°” cls 4) 26 * - . . 7 C(t) 26-1 E02,27 20-2 C633) s0-4 CC4,4T 20-9 vaing formadta Cc, 1) = P(e) the root Fable etd ee foal 2 13,81 23 flag ai frenudla RY, = Klon Let Me soupy ete, 7) Atagonbly wary ele, J) cnte feliead eclke, 54 eh eee ee fa feee5 Re @ 02) kel +> C12) enur $e C107 £00227 +PCI HIT, Ken eciad ¢003,27 4701) €PC2I) FRUHL Onc, 0145 | eCi,2) = 4 joe Ke 2 RCi2) =2 ss €3 epyioa cla)? + P27 t70319 9 =n 11-0, 0.8 } CQ8) =08 bh bk 23 Rlasle2 € (3,4) = wir {CC03)2) £004, 4) £9091 +P 47) Celaad tes, £234 (41) Pt) «p04 envio F1.0,1010 one CL3AI ste0 ashen kK =8 ROB,47 =3 The mertirng abl are t [0 Lon On4 i uy Cee | 2 | © |o:2| 0-8 _| 2 | aie —| 2 [9 | 84 | eo 2 t24 “lo 0-2 * ae ° Le ® cLiad snwr{C e104 eclagrelrd +27 «PC2 Dv, B09 CC1 124 003,31 4) EPC2I 402) ) CCA) + claad + ped +927 + PDI = mtyLbsr ted Lot J ef1,3) =t6 3 £01,3] = 3 3) 0 vl &q o| : + Fle . Teiprd o ca e | € ral iil lenl ci a . elie zf] bel rele]? TY AME poor G . nL 409 langqmeae Sup. ee (vin prs (vyo jer to “eter gms ICUs (e144 (c+ US + C593 Ce) (Chg Ledge VO CI oh IF [211 19) “CLY dt Celdt Cd+ C084 (ye) TL) grertion (bode Wd} Utd C18 L¥'94 coigae vero ¢@ 5 ya-| co 3 | x trpbrojho |e my App yay + AGE fy bergpavae oy F, f= (viele $= (vga pte ‘vel orl ors LCChIE+ COM Clete Ce's)2 + (e!z] 2) “(LvId + (Ed + Ce Cole [2 eI) petecy ChbIdt [eld bt) Fe Eb! B04 crag dp ems [r'ejo ee doy Pua : Ae} pug (Sse Sagy wy \-u o=f vof oe | Gwe 2 by ep vue fopoyg © pede I we wy hsp Prvarol}oo og: pdua onypyoliya pod ynmays Mod 10 pangdyy a: wend jj Cp “480! v7 rphe1g coxyyyo Dy ___— | SAPS | [wat ] “pa yea Te of IPI NY YM romp gmpoyg pork oy ved nphog ubyna v3 pe aes orl | spor pa04 nowy | PRETFR] wo | e F ' pwnyry ay Es Co JliJe= LY ty vy ow aay “Prva of. joc Rs0 to a-t do fee P20 fontds fee j =o ton -1 do ALE Ts omiq (acess, Ali, 14 =o ate, ') end br end Pov gb Apply haukeLu —algoitien Je Compr tran Pbve Choture jor the gtaph belo. a—O (roma &—® The Acfjacency macs for the gio goph u 6 1 00 6 Oo © 000 { © 10 deep) TO jord path from @ 7, coasiu are 4 a% Colum ores gable! +. db) 21 wonder Mabie tu 6 oO © ' © oO L o 1 0 © 0 o 0 fot sige hep yaa pat hom wera b , loattdu Bh ro 4 5 column Cab! ee asi 3 Adel Aiwa ¥ (bade! esd Ades ryntant matvia be 610) ae (On OurOnO. [ 1 Lbyod port Fon) Veron c, Congidr CHA wn “ech Blume - Ln the Bbow hatix, there U Ne path from c any olker hedke . fo 00 hone ty Values - 1 To fad path Prem veserd, Conrd d> my 4 dt Column a=) ¢ Cd adel + (4a) 2) G@dles ¢@ibo1 @b) a1 AV 4 dey Cacd= I CAE b Cd Arey ot a,d)=) a)= a 6, Ds $ (Aa)=1 Chaos (bidet 4 (dhbd21 egy, bel F O=1 9. Ger Chdret $ CAA Chad ay The ronttant malian le i I 1 otoud 0 0 © 0 \ ete! au aa hhat tg. Hand Hats chr oth preblom hehad U he pracedutre ty find — Hart Honi an create oF a gph? {ho md Hang Ventas CFscutt problim Bb & pasbly ty ped homiltontan cycla ag vey gtaph + Fant Us niacy Gye Ua POU they path atong 9 edger polynomutat ort P denote the class g au delanialsh c Polywomial pablo sO ttnee PF SNP Problems 1hSch AL tnonn = ho HE Pare Ber @ited ac teattoble- Probume which Lie ontiid p ate offer toned a tw hactablke “The yalacbtoa she behwcen P $uD & dupteled 9 figure below , On ket Lt 412 be. prblems. — Problem Li reduetes fo Lp Cli vlo) iff 4here & Away 4 Colve Ly by 4 delemiaicke pormomtal Liew alge rFpans wiry a Acoemin she algod Pin thect solmet bd ty Pelyove netat fine 6 This de) tok hey Sinaplets Yat if bth a Polyre ne al tina atari thes pe $2, hen we can fO\verg 1 ain) polynonstal. Bind One Cin roa dely vewsly of u & tanwdye Lelat’, se ss A pobem to NP-hatd Ut docticfabi tty — redeeres fel. ho pobin Cu WP complub 1 bu MP gLewe Ht ean 4s vee Ant there are WP hard Problims at ae not wp Complcte ~ baby 4 dectsvbn problem Can be WP ~Corplete Hoven, ao — opal galio, probluu May be WP hard . Te Lid a deciCwn produ. -4L2 a oplSrurgates., pebim dh Ly dh2. bre cory Chow thot hnogpsacs prs blem redurw b Knap sack Opdtuazabies problem ~ephiigation probkan canndt be WP Complete» there as d eckain problem Cane This telabeon chip a deg fetid belo , 24 100 App the branch and ‘bound algoridhers fp Golme the traveling Salet rman proba Qr We -gpaph Qrre0 below. The lower bowed Jor TE? prsblinn Can be compwted wag “the qotlooing relode's + P= 4\ phn £ & fun sf Avo Gualed idence |_—_—_4 } vor each city = . 4 athgo Omallert dictonta » fray ‘ 2 = Iq qhe infkral Satiapace fee Wiis lower boul to Showa below Ee AbAg The dover bounds by facludery Various edger Gn be compnttd Showa below jos edgelap) Ab= (BF eC 346) tr) + (344) +43) =f Ve foc edge Cac) rot feaci bh jor edge (ad) ab = (F4VD G46) C042) 043 )t (043) = bb, 2 for Cavey the B40 4(346) + (ia) 413 4) R42). Iq 2 Conpritnsy lower bound by consider various ~eolges Rom verter b ! (b, DaLb each dow oy neadrie, So tute Minimum 6 eat, my 4 add tum br } Get the takyqt Doe bound as chown beloro "Yar [ap [53 [24 [uti # 3 | q h> a \9 ble e § a | & F 3 & q Hlop |B re ey Jonet bound tb=Io. The athal ftote Space be Hy lower bound & Far) bb=f0 Consider felon a Assig vort ous joer to a gy Compre the’ over bound ay Shoo below FA ast iho fs} 24 Sime Qt, hare woo, Columes T Yan) [33 [4 [iS enue ala [zi 7 [ez 4 bl ele [3 | g | 9/2] cls ! a la [ale [4 |4 Abs A384 tH =!F eb A= dr , Whe Coot = 2 hace kerr eare we a Column2. tbe €434144 =lo Ket a3 , ace ef -a>t, rokue Coot =7 oe) | QbeAt44044 220 care WHA, Column 3 ishue tort = 8 Lice are, heave wn a 7 Column t be B12 FIH sig + | Stak |. © tb=10 ° a) 2 eee | a3 O74 cLbeete Lb eth In the above partial dolutwy , mosh pratodg & the one yohtch has leat faoee bound Fy obelo. Heee a ast Tyned . ] 062 Soluble WPA Lod 22. Contdee jeuroo b : Asagry varldur obec ds peacon b Cleaving ond yok 2 phich q Aasiqrud fo Q bith Cost =2) 4 Compnite the lower boyd ar Lhown below + Let boi 7 rue eet 2k Leb?! | leave Corb, Column t dbs Sthtit4 = Kop bod , PAue Corr = 3 Lbte 633, Lane mob, column 3 Ab a dt3t044 al4 Kea bo Cort =4 ; Site b>4 feare toy b , Column ¥ Abe 4d ttt alt Fo dhe -akore paral delute, ) mort 1 mie golutieg Bi the. Soe xohfeh ha lent Lowes loud. Fre node £ piththela. Hete aU Od Grea jaw 2 ick ie AKTgned ob L nite co a6, Conatder peor ecg Various your de perdon ¢ Cleave ont “fob 2 4yeht shech & oudtgned & atank b with Cot 26) 4 Compl He lover pound ad Shann below det C23 , hue tot} =3 Since Co3,\eaw youc ,wlumn 3 db= Lette =le el co , hue Cort =F Che c574q Nenve Wow e Column 4 dba dts 1844 al pasa] [ars lb =oto be bo) b>3 b 34 tbe13 b= lq tbe) oe \ x |c2? | |co As 22 Cost = 13 Coste ks ophiual Solubiss, ~ A792, bol, 633 ,As4 [ ore STAT =B AB auth \N ‘ Mast, Oy Deni Reapemnes Prof. Nesmeen , Shaith

You might also like