Discrete Structures Lab Report

You might also like

Download as pdf
Download as pdf
You are on page 1of 30
Discrete Structures Subject Code: CSC160 | ® Submitted To Bal Krishna Nyaupane SOCH COLLEGE OF IT (AFFILATED TO TRIBHUVAN UNIVERSITY) Ranipauwa, Pokhara-11 Submitted By Ankit Pangeni University Registration Number: College Roll Number: Program: Bachelor of Science in Computer Science and Information Technology (B.Sc.CSIT) Semester: Second (2"4) Batch: 2076 B.Se (Str 2rd Gener CSc S60 - Drswvele Hauchre Jamet Ant Pango Lab Task-01 and 02 [pes i Tete & Sot operaton (unten, Trdonscohton, So4 dP f feren o ~~ and nplament ): Theowys (ger Al sok 8 any wen defored un-ordered tnetdon 0 dP ytenct obfetds » called a4 Llamenis ov members of tne ged. WA sol &% doncted by an auphorg (Unters The unton of two Sets A and 8, denrted by | AuB Pe the Sot of eny those Clemanie Whi'ek baiengg to @Pther ov “B or both A and B Sym crrcany, We wile thes ais Avb: fafa ov HEB or HE both A end e] (Defforenceyp Lo A and B be two sete ancl aach got Ps the Subset of unfvortal set U. Then, A diffs B dencted by A-G.% the Set of aut hese guren WhPth Ubeung to A but not B. Dn Sy mbes A-g:L219A and x E83 Aigo, B-A> La]aeG and x ¢Ay (Tolersechen) § The ¢nlorsoekon Of two Seig Aawe denoted by AnB , P8 the sot Of enwy Ahase Clemence wher beige - both and a Tr pwrdel, Anb- LafareA and ata} (Crmplaments Lar A be the subset of on? versa 0+ VU. Then the (6 mplament of A wit wresped toU Pe the 304 0] those glements_ oF U which do nea belong 40 Ax deneqod by A EeYnctude ZstdPob> oe : [ Source code _ | rl At Pretude £ (onPo-hy Ht define MAX U0 Pt UCT LO128, 4672945 |] Universal set vovd cveale (Pat Set UI, ®t); Pot UnPon(Pnt geti0I, fet, Pat Soi2 C3, Fk et Fot 904309); Pot Tnlorsechon (Prt go1sl7, Pat, Int slat J, Pot, Fnt 904307); | Prt Deffewente (Pat Setsl] ,Pnt, Ink set27, Pot, Pnesera CI); Pot Complement (nt Setsl J, Prt, Prisets lI); Prt marcy Po+ SetsIMAXT, Set2PMAYT, 8043 [ MAXI, -L)? 5 Pot MM Il Length of gels PON, Length of Sod Fs MA parol ("Ln No. of glemenis fo the SErL: "), Scant ( "Mod "UN; Print f ("Jo No-of groments fr ver 2. 1); Seanf("owd", KM); Preotf (My --------- 2-2-2 -- eel); PrPotf(" Entor elements of sets"); create ($ersyN)3 PrP ft" Enter elements of set 2. "')} trveate [Set21™); Patotf ("Ip --------- 22+ ------------t0"); L- UnPon (Seda, N» S04 29M, 804595 porn ("In Un Pon of two Ses >"); for( Pro yP2-L 5244) Prof [ "Sod", S013F I) 5 Patmif ("In ------------ == ---- = lo 5 ) = Prdowsorkor (Ge44, N,Set2 »M, Set 3); Prag" \n Trtenrseoh sy Of hwo sels 2”); fot p=0; PLL, P44) — PoP PU" rod Ys $e 3t¥]), PoPaf o\n ee L: DPPforence (Sef4)N, $042, M. $013); PoPoid (\n De Pference of two sels Selo -sels: "5 Jor(P-0 Pe Ly Pas) PrPrf Ul ored' SA3UTT); a eee ------\o"); ike Compiement ( $e4 4 DN, 803); Pafots ("\n (ompument 5 "5 Ovi Pro 5 PLL, F444) @ PrPoif( "ood", Se1grt7) § PatoefU'ln SET OPERATION COMPLETE .In'"); vord create [Fnt sett 7,Pntn) Pe Px Prtni{( "0 Enter get elornents: \n”); ort P-0, Pony ita) Scanj{ "10d" © got (73); Got Unton (Fnt Setsl3, Prt n, Prt set 207, ent m Int Sorat) Prt Kbps flag: 0; Or(K205 KLO\K44) SO3CkJ= gots (kT; ke-j fol Poo} Pern P44) Tage 43 (Poo, fen, faery AU selacri== sea cry 'agz05 ne , Tf fiag=-4) SC3 [44k] = Saorry; 3 | veturn Ky I. 5 | Pot Tolergectten (tnt geist a Fol n, Pt Sorat T {PO Mm, 4 soraty) | § | Por x0 Pf, fag; fork Poo+ Pam: P44) £ Prageo ; fort f=0 5 320544 i} q Ff (Soler) == ses Cpa) L fiages ; wea, 4 5 Pf frags=4) SU3Ck+1y - set2 [7]; : Volorn e--5 3 ° For De fference (fot gsessl7, Pot, Pot set20I, Pd m, Pn ser) Pol Kr0; Peg G, Prag: foe tre of Mm P4+) £ fiag = a) for pro f4r9 544) i - of ( seratra= = seu Upz) s fiogco, brea, 4 | v4 frag ==1) Se13 [kai qe sete (FI) 3 — Vehurn k-- 5 Fot Compiement (fot Seti 09 Fol, Gnd Se77) s Pot «ro, Po fy fiag, forl P05 Paso f44) Vagri, for lpooy pens faa) x 9p (Ute == seu Cf7) + frag=o,, brea ; g j Ppl fiag==4) §0i3( Kka4 query}: 5 Yeturn k--} 4 Oviput ; ie | No. of elements frthe sets % 5 | No of elements Fn the 8125 5 Enter elements qSols Enloy sel Llomants $4124 68 | Enlor clements Of Seto | Entew get er Unfen of tu sets: 1 2 4 6 9 8g Torlersect on of two sets: 1 4 9 Diflerenca of wo seis: seto- sos: 3 9 Complement OF setu; 0 B85 F g BET OPERATTON CONpLeTE Result and D Powe Hence, the Jab tent of set opewahen (un Pony Prlencebn, lt Plarenco and Cemptement Wag Soecessfernr'y done Pn C- Pong ramming dangoaye on the Dev cay. Bye. (Pr ord soe - e eee ee Ce S60 DPserele [ Nama, Ante? Poegens| Lab Tagk-03-2 “Tues Cross product of hoo sels neon) a O perr-atprns Theory ° (oss prodoct | camtesfan Produ > The cartes'an|erosg Product of two Men- erp See A and @i defnad the got of 2 Possreie ordinad PaPve (aib) Such that aeA and be® Note: The ca ¥iesian prodvet AXxXG Yead ws A cwase ¥3 the conethen of ordered Pars Of aements (arb) Whore a ?s Chosen Poon A and b ?s Chosen Pers TM generar AXB# RxA Th Parhwiar. AvR= RxA 8. Ff and omy my A-rz (Cior and Cor ?ng Cperakens ) 4 Pla, frochons ~The froor fonchen ’s the Luncken thas Fares Pyout as a veal Number X and ores -ag Output the! greatest prleger 1238 than 97! o, ay mow TN ts denoted aa fuori 0 ov Log he Ox for 2-u- Lous-9 CePing fonchon: The corning oe Ps the fenchen that 4aves Propur asa Your PUMber X. and gives as OUtpot the gmatess Prtogor or quar to x. 1 Ps clonered as cer Ge Cem 24) -Tru7 =3 WMbh?r1¢2 Hoe aac elas yearoy than now [« 7 Q Soore Code § I] twos prodoet of “hoo sek. Ht Pncade tt Fnciude Lem?o-h> tH define MAX 4d Vold croalolPnt sett J,fot), Nord Goussprnduck (Ft Servs], Pt, Pol Selpt 7, fob): Pod maPncy 3 Pot Ser [NAY] , Se12 (MAx7 , $013 [HAA], Lo? 5 Poe NM 3 |] Length of Sets oN, Se Ps mM Prot fU"\n No.of shements #r the SETL + "9; e Seanpl" cred", ON); Prenif( "Ip No-0} elements Pn Deno Gig ume i Scanft" ctod'") &M) > Poof (pe inne a>) printf ("\n Chter elements of SET); treate( Seldon); Prpnifl” Chtew elements of SET 2"), (veate ( Set 2,4); ® Poort (" \n weessescee Fending Conse Produce xvercevy y|n”) Grossprduct (844, So} MIs 4 VoPd evoale (Pot sey (7, Pal ny g Got Ps Patni# ("\n Ender S04 Qlemenis: \n")! or( fo; Pen P44) Scant ("0d ", vselrry); 4 Votd Crossprduc( tnt sot7,8ntr, Yt Set 27, Fod my) Prt PP Daerd ttn (Conge Prwduct Of two sels aves MDs ie forlPs oP ep 5Pa9) i forl pros femsfon S Prtoif LY Ceted, ood)", SeeIEF I, SeHIETI)s 5 ‘ Dotput 3 No of glemenis Pathe SETIE ZB No: of Clements Pa the Ser2¢ 2 Enter elements of seT1 | Enlew eet Slemenig: 3 & 8B |“ Enler elements of sero Enter get Qemens: 1 9 @ | Xe Fincleng (rose Produc xxexvwyvxy (rose Prdott of two sale me (Bis) (B29 (Fay EH2) Bow on Source Codes /] For and cefling openatens Pnciude ZSidPo-h> t+ Pnciude Zmath:b> Pol mained Pant ln Freer of 1.6 Ps + of", freer (4-6)); Patsy ("ln Fiewr of -56 Ps 2 Of”, Preoy (4-69); Pofox{t"n Fi cor Of B-4 Ps: oTef"s fier 3 wu); PrFoy ("In Frepy of ~64-P sz ae frevr(- 6y9))5 PrPoifl! I"\n- ve eee oe 2 ee ee 2 = -- = 10); Prtoi{["In Celttng of 21.P HS ¢ eTofY, cet (21-2) ); Pr?oy i'n Cefiing Of -B2 es 3 of» ceri(- 32))5 Pr®otf ln cofiing of Fars : ef, eel 4-3)); PrP" \n Cefitng of -999 Ps: orf" cer (-3P-~)): Yotm O54 J Fieoy of 3-6 Ps : 1.000000 Preov of -s-& Pe { - 2.000000 Fier of 3-4 %s + 3.000000 Ficoy of ~64y-9 Po: ~-65.000000 Cefitng Of 95-9 #8 22.00 0000 CoPiing of -32 Ps + -3-000000 Cofifng Ol F-a Ps + 7.000006 ce Pitng of ~49- 9 Po > ~ JI 0000a Roguit and Descownn ! Hen, Crmsy parduct of tux Seis “and fio CP tag Opowahongs Wat dernonetrata) fr Lab vsPr 9 C prmgrannen:ng Janguage om deve+y. ee ff IES” 8.0 (SPr QF Somertos t8e-J60 - Dererele Hmvohwe obTag k -04 (Names Anse Joven Tre Evel Feban and blended Cucrtdean Agent then Theeny§ Te Cvertdean Argon? > DI Ps used & Compute the realest caren Myiiny (gcd) ThE greatest Comma olivPsor, Yopresented 22 aidan ard ® olefnod as Cdtab-d, (where d te the Layget normber thar dovesee beth Gand h 9 Tf gcdlarr-4, +hen we Say that 2 and bare Yoratyer, Prime, WhPch meane that bot 7 and bdonet obyrye 00h Other CEvlended Evettdlean Argortthm ) st food anothoy way of frodeog greater tommen devision as we did PA wetrg Evettd ean a4gort tha V1 Po Q SimPlay atgorfdn for Computing ged and the Coop free. ents of Bezout9 Fdens7y Of two un? Van ake Potunomian We can find toe Fed ag an Prloqor, embinahm Lineay of a and b Source Code § lic prgea +> demonsdrale Basie Cvertean Aigontin C Hencraudo ceddPo-h~ Ii Fonckon +o xehan ged of 2 andb | Fol ged (Fo! ay Pat b ) 2 Ff (az-0) ~ Pebuen b erse Vehon ged ( betea.b)j 0 Pol marae) Pat aby Potors ("\n Enter Ihe vawe of a and b fod gan"); Seanf( "Fed Med", wa, Lb) } Paioif ("\n (ne D (Sed, Tod) = 0d!) a bi ged 63/6) ); Yohon 0; 5 Qvipot Enlea the vawe of a ard b tp Bond gcdey? gy | GePl4F. 64) = 9. © gy | Score code; Hie peeve to clemonstrate Working of extended Sucusean 711 gore? Hen Hpcwde 2d Po-ny Prd gedt xlerded (Fol a, Gal by So Hx POEX 5 y) J! Bage cage. rfc a-=0) g 42-0; Yycy | Yehnn b 3 _ rt 3,455 [170 Fhme Yesors of Yotorsive Cam de> : / Tot acd ged Uxtended( b Toa , 4, wH1: Hy): ead Mopdate Kandy Vesuris Of Verursive Ca!” X= yr-tbla) ¥ oa 5 ¥ysxa 7 Ye tuyn ged 3 Pol maines Pod BbAd yes Patol p(n Enter the vane 0 a ard bt Ard gear) " Seanft" aed ced, ¥%4 ,eb)*, Pt ge ged Extend ed (aby UH Ly) ; Print Cun In CD Fed, ot0ed) = OTe)” whig). Printf( ted + eed) ¥ Clod 4 Iod ¥o}ag ”, Vay b): vetorn 05 4 Enter tho va ©. Ovtpet + enter the vawe ofa onde te foe geats-4 9 (reol 30:90) = 20 The Extlendod CvcrPdean Alger ithrns 30=1*36 ox 95 Resolt and Drswssien Hence, Everdean aigor* thy 9 Extendeal BUgovHthym, (Was clerronHvated Fr Jab ‘ Working Everrdean O8Ing C pregrameens) larguae om dew c+4 Bese. (SPT 2d Sonestor ($e 16o- Deewrele Mowe Ayest Pago} Lab TUK Of and os Tele + x Qewwrarve fonction 4p Fenplernent powsoy (9:5) x Permu dahon and Cmbinaten “Theoy ye (Powmutaker): 29 Parmutah'en yuates + the act of arranging au te memlos of a %t Po geome Sequence OY ore. Pn Hu, Words, Pf get Pe prepemy ordones , then the vearvangeny oie Cloynends 9 Caled permutabo Pewmutahren (rise ushon dPPforent orderings or cemlain fpnite Lets Gwe Constdered The formura for permutaken Ppr= Of echo Feo of things fom Cnn] PSO Op n “Hhirge (Woot Vepioearnent 1 (ordermatey) (tombrnaken) z 2) The Combfraton Ps way of sereehng Sloms fram a ton eekon, Such has ( Unico Permutations) te order of Selechon gloeintd mater The fernuta for wmbinahe « Dae Mb Y= Chote ©, thing ¢ (n-rv! oo n2se4 of thing: [order does ni motser) / Row ahve fonction ty ?mpiemend poset (arb) 4 Pnciude 2s4dfo-h> L5n--) Fit Pr (Pnt ny fot) § Koto factoatat (n) | fathorrarin.v: 3 fn} mafney Pot my; PrP oH (Mn Enter the vaiue af nandy to carwiale MPT, ”)° Stanford sted") wn evs Pro" ood Pated - sed |n", mi, nP-x (nid ” Yotwn 05 5 Ovtpot Enter the vawe af nand vy 4+ carulate Pr: 5 y SiP4s120: Source tode |] Tmpterven| akon of Combioation Using Yeon HPniwde Lytelfo-hy fot factorr'ar (Pn 9) 5 Pot f fortes S954 59-2) ¥on5 Vern f, Y Yok OC Lol n, fot 1) 2 Yolo factoria (ry/ ( fathersar (x factoreaitn-13; Pot nya ened Pat ny 7 I Fave Pnput 92 ¥ Prot pl'\n Enter the vaive of mand ~ to Carwurate Cv 51), Scanj{ "ted sted '', “pn, ex); PrPIL Loe ¢ tad = Todd In, ni, 2 (¥lmr))3 Volum 0+ % Ovlpot Enlor +he vatue of n and ~ bh Catwiale M(y +7 & ACLs QL Resort and Drswsnon: Henee, demonrdevahion Powertarb) osing Yorwrnve fonckon And the demmonttyahen af Pevrodaben | and tembPrak was done Pn Lab viag ¢ program mana Sang uage B.se. CIT and Somerter CSC 160 -DPoevole Hmvedure seen - Names Anxri Pampers} Lab Task 01 and op TPHIe = Recursive fonckin “to Pepiement Brnony Scanh ang Monga Sort oe Benany Search 9: a fal gearth Algor rhe, (Binary Search) § Brnary search Looics for @ Porturar Plen by comparing the meiio moyt Ptem of a Colleohkm. Tp 2 Math oteurs, then the fndex of PHIM PS rohrey Pl +he mPddie Pom fs Growler than the P€m, then tne Plom Ps SearChed fh the Sub-arvay to the 1ef4 of the meddle Plem. Otherwue ,+he Ptem %& Searthed for fm the Sub. areveuy to The wight of tho middie Plem. Thee prs Combinveg om tho Sub-aavasy ag wel univ) the 8Pze of the ireraayy Yedv (29 ty om: Notes Pov benary search +o work prperly, the data Wiech thouid be tn sorted ; (Merge Cort) § Mowg e Sort Fs an aigortthey to Sox the nurnbow fm ano - TH Ps constdere ty be one of fee faster Sorbng algorPhms, Pi Psa bPY move compew than Seleehon -and Bobbie sot bor pig more ef frerens TRe Pdea of merye SOM 3 > dre the datg-coy Foto StmPlax dada sore Sont there Smaiior data-sois and “the, Pry the er te D> foPs thom (merge them) SouIe Codes 1 Tompternert atten of Binany Search using Rotwrsien Hincude 2stdPon> +H Pociwwde Zmatirh> tt define Nax 50 I Rotwrstue funedon for Benary Search Pot bsnamy sear ch (Pot arr 7; foto, 904 aby , Pot kery) Pod mpd: Pl hryph >= low ) ott: floor (Crowther) 12); IIL] Clement Re pretent at the mn Pelote pe ( ary Cenie J == Key) Vetuen mF ; nW ¢ Llement Pa grmaier than med, then A can mig be MW Present Po left Su barray 2180 Pf (an CenPd J > Key) VYekrn biroanyseantn [arr Vow, MPd ~1y Key) ' I) Gise the element can amy be Prekent riybt Subarva, else Pf (ary (mfai ¢ key) _ Fram san0ch Cary, MPd-t1, hgh ex); ide reach hare When Slenent Ps not Prezent in foray | Volum -1} 3 Fd mati) 3 Prt ¥ tow, igh key, Prder ; I Most be Sorted Array Prot ALT -fL46, 92, 26) 3% 41, 46, 50, £5, 65593} ow-o 3 bigb-4; patnif("Arvay ee fort? 0; 1hPob, P44) PoPrte CNE stool") ALP I), | Pafoty Ma Enter the key to be searched: "); Seang Usted", #0x) ; Prdex 2 UbPnarysearch (A, Loca chrgh key) 5 | Pf CPndex = --4) PrPor ye data toot present Pa Ihe given Array"): | eve paral (“\n Data @& present 2 aod Poder. '', Pndey) Yeluyn oO 5 4 Ov+tper> Array | J6 02 25 BFP 41 ag ss 89 65 FI Enter the key +e he Searched 2 44 Data Pe Prreeot at Y Prdew. Source tode ||Thes Prayram fs Merge Sort of ome dimensiones array 4ePociude 2stdiobs FRPocwde LemPons H define Max. STZE 50 | votd Drepray, Arway_ Cloment tint ACM AX SP2E], fl Lon pity. 4 ) nt PS forl Poo), Pelton g Pr4) Prferf("It eed", A cra) vord Menge (nt ALMAX-ST2E], Fine Loft, fot MYC , Frt righ) Yt Pro, Kop, Templ MAX SPzE J} Kerrept 5 PoMid+s) lee eee ve pe= Veh) BEAL IEE T CAPT ) Sa a near SRN Temp (919 ALLeft 44] Lise Temp 9147 AlPHtT: 3 Whee (eff e=nfd) : Temples 4 ACL HI: wahive ( Pe: VoHbt) Temp [P14] APHID 5 forlF- ke) PL: Vpbt Pa) ACP]: Tempr?-« J; a) VoFd Merge_Sort (ft AIMAX. $7267, Pot Lf Tol n grad 3 pied Ps the lower *ndex wright Fs upper ine IT" Ho} , NT our example Trght Vs 6: Frnt M¥ol_; Pf Lope 2wPght ) 2 ard = (tept repre) /2 5 Heyge_sov! (A , Lop, MPa), Merge sort (A, MPd+L, WiGHE); Merge (A, LO, HP dice Peyht) % YM End of foackon, vofd maint) te Len: 75 |) tetar number Of corray ecomen. Mt ATI = $16, 9,24, 24519, 88,29}: prfrtf ("lp Refore Sorbry: 1) 5 DPspiey Array Element (Alen); Merge. Sort (AsO) Lens), Patol {U'In Aer gorbng : ")", 1 esplay_Arereuy Ererna 4(A, Len)? o Poeleno>, * , 4 Ovtpot Belore Sorta” 16 9 24 24 13 83 25 After Sovhng: 9 s6 19 2! 2H 29° 93 lo Roguit and DP uss hence, dernontrarh'en of bfravy search and Menge Sort using Yousvtgive foochon was Socaesfory doe ' fab sing copragram ming clang wage om dover, B.ge- (977 and Semester coo 0- Drordle Souehove. (80g [wine ; Anu Pangeni| lab Taek 9 andJo Trlle = Grvaph Represent chen and Pmplementatia Of Krseat : igo hn + Reon (Graph vepreientation) : P Ke Process Of vreprelerhing the Connection beher Verrkcos Po mahttx form % Cauing! Graph vepresentabtn, Lot &= (Vv, ©) be a stmpie graph with |v =n. Sup pose thar the vertitos of G are chested Mm arbetrany order 2g VIV2)—--1¥n The adPatnty Marr: Alor Ay) with reepecr to thes esting of the vertices, 9 the nyn er¥0-we Mat x WP Lal PIS (RP erly eh, ve A Bnd 0 othenvise J Gen WE ard Ve ave adlpacen, Th other words, fy an al fiatoncy rota y ARf4 PPL ve.usd Po an ee of Gy, APP0 Ff Othenwise. A> [a 2 (kavsvanvAl ort thn) + ~) Krvsvanrs Aigertthn fpade a mtrimam spaoning forest Of an undProotod edge-werghted graph. Tf the graph Fe connecied, 4 fends a mPnimuen Spanning tree. (A minimum Spanning +ree Of 2 Connodted Gph Fo a subset of the edge, +hat forms a te that Pnevudeo eve Vertex, whee the sum of the Wefkhis of an the Cdge Fh the 4720 Fe M¥nimizeg for a clPeeonneeled Graph, 2 MPrimun Spannry forest Ps Composed Of 4 roinmen Spanntig hee for cach Gmeeles Component) “Ft Ps a greedy Ayo thn Pry graph theoy ag °n each Step 7+ adde the next Lowe st - COR AE edge thay wen ne} form a tye tothe mfnimum Spanning L Source (ole? I] Craphieat Rapa ho £9) atahm ai HPrcrude £64‘ b> , # delve art & IINember of Verhces Vord add Edge (fot 4 wor (DQ CHAAT 1 Pot S% Pot dew) ave CereJ Coes] =4 5 5 Ui prfot the Adjrconty atrix vord prot Adpr abn Uirt arr (ICH a7) t FEES, Prvotpl inte Ole} b2|tsltu ")5 PoPoyp "ng 4 Pretwde Leants h> Poewwde | tnt Pf. icy arb, Wy mH MES; - “Smt men mPncost 0, Cos (91097 parentl IT, Pot find (Pot), Pot une (Pnt jPot); Pod marntd) " 1 P4bry \n"') Pri ("bolt Bnpiementation of keroskan's 21707 ; prrt¢("ln Ender the eof verdes "5 Scangl "orod", @ NJ); Pry "Jn Enter the cost adlPrcan ty maleic: Jol); fort rss; Pe=n jr) ae _ | fort ferns fe | Prtnif( Cost Ceted ICer0d I: "5 HPD | Grang MeT0d", KeostLPICFI)5 Pe (cost CPICPI== 0) cost CPICII2 9.99; 5 5 prio tla lathe edges of Minimor Cesk Spanning Tres au In) vohtidnecn) : for P24) mtp= 939; Pe=n; Pay t ry for Fr43 F403 FY 2 PPL cost CP ITPIE MP) | y | ; | mm - cost CP ICP] 5 acusP, 5 iw = food 10); Ve find (v9; of (unt (Vv) ) 8g PrPoyf ("sro edge CIed --- eed )z 0d|p",no44 ary, MF (ost +="; Min) + cost Cad Cby ~ Cost C63 Ca =999: 3 Prot fC" bnle MPrPmom Cai= Tod", mia lost ) } Yet 0; j Por fend (¥nt 2) whpie ( parent (19) Pe Parent (73; Veture Py 4 Prt one (Pod P, Pol 2) g Pot kK} Pf( PhP) 2 arent f=? 5 na (K20 5 kLG; kK +4) Ptoylt ered, parent te): Yeoturn 15 3 yoturn 0; y ourper . ana caigoritom Ten plement ater o, { krusk Enlor the roof verses 4 Enter the cost adfacery cou cuales & cost ca 29 3 cost Cua C32! 6 Cost C43 Cue 2 cost (27 0Ie 4 Costa Cras B cos (27 C4 Cost C27 (UTS 2 co (a9 9 (ost 639 OS Cost 029 15 (oy C37 (4a? cosy C47 (23: 6 st CuI; B (sd C47 (397 2 Cost Cua CH mal wo LED The edgeo of Mintmem (ost $ panning Trea ave 0300000 1 edge (3--->2)= 03°10 00 8 2 ag 330400 608% MPnfmom Costes Regult and DPrcvssion Ken Lenco, derron strakon of Graphical vepretent aber and Koucvat aigooilnrey was sucasfory deve fn faly O6Sng Cpregran ring Janguaye en dey cee.

You might also like