0% found this document useful (0 votes)
67 views34 pages

DAA Unit 4 Notes

Uploaded by

karan Dabhade
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)
67 views34 pages

DAA Unit 4 Notes

Uploaded by

karan Dabhade
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/ 34
j; —IL ave, Chas», —S ————_ | Chit “TL : a | RBacktrackiug ._ | — 7 _ A }- Many Problems aahich_cleal_u2 ne PSek Of Solutions ot eahtch ask fee GM SO PHmal— | Solution. salts fying ome concinaints canbe yp Selved_using thd backtracking _Armusalten. 2 “Ih many “bpp ication. ba Rb Kea cle " ——pmetned, “the. desived Soluiton.{a_enep : Gar. _Vt-_tupia Cat) ,=-- Hn). Wher _cthe 2 i s Often the Pwbiem tn be Salved Calls Lae senting one verter thal mnauimizes a Cxthenian pam Pie Tts base tdeg te to build. up the. Solutton Ved One component Qt a cime and to Ue — modified cxtheston Punesyons Pt C2, -= 2€1) PO fee he ee te et bee See at gn. chance of success. = =? || The- man, uv Or this: jf th 18 weali Zed that the santtal Vettye Cr) Xo ~- 21) nin Mo way bead ty Lo Qn optimal SoluwHyn then. Witt = my, | Ly{Pestible ted ects can hs ignored ent | Many pf dhe Problems we Salve stra | ba ob e | aHsPy a] CamPlexe Ser of conshraim | Constraints are of- fuse Fy pes | ¢ Boepticik a Emetigh | 1 aD Eeptiat:- expat canstreunts OMe anu | nae restrted each Xj +t take an Values only Grom a (piven bet. @ scanned with OKEN Scanner DATE: / (20 PAGE NO. = ei ge mare cre @l_nonnerak ve “real nosh peo ord of spe 0,14 = ALL trples that Satts-Ry the explicit con siraly : define a possible Solution spate. fa T + 2) LrePplicn= con fronds 1 Tete ave - detesmine. cahich of the tuple jn th . Soluton Space of — SatePy the Cotfevtan \ 1 lei cop <3 _ -clescotks he. way fu _which the 27 mua aN wT 2 classic’ Combinatwnel lace SOW 1“ Iolern | } aa "4 f not S let us o> eat b “The Queens can alsa be numbed _ Since 2 | { @ scanned with OKEN Scanner PAGE NO. AR Pesmutattor2 Ch, pee oy) eee eee see eee : Jol space (3 4) tuple SMcttaten bee ful 24 4 Wenac : Sas Fo [tows 24 leaps je |m2q.. | (S Soliton gpace. eae Ge C S - = is : le ew) 1) haw -bacietsa cxin L | on dhe 4 gue ae ae (ater! TeATHUIN PAIGE Z Je TT] © | fe fo 1-4 at [7 ie PY EE | i @) CD cS [ () i @ scanned with OKEN Scanner Ve Feccmulagon LE Pangea x27 Lb)! Seb of aU posybie vag lis Feo ip) uth that (%) A%,~- XU vp} 1S oA fath tO 4 Potbrem @ scanned with OKEN Scanner Un SSS PEP Bi Ce = OG erty) 18 as LL Bodin Canny be eretended Ip. rege Ain antwer yo { 2 Pos ssh) [ a le algo fr beak back ug L. iam i al EB Reece pateteadues li a | Toittally invored Joy Cawirace (4) - 4 Ai gectition Racntsak Cy) 7 Ce Coan aS rtrtCr 4 SE (Be Ceca ere Ea) he, & = L 3 : | if Cec, *b)-- XO} fs 4 Pah IO _Gnu_Answeb nede\: then ude Cx bt: KI. FR CKen) dle - % Returack CED: = 4 = ai L ‘Pheralive Radeauuns aloe aor AA gedit m | Race rrace Cn. ee White CK#0) do 2 Ce) @ scanned with OKEN Scanner 20 tO an angwet. Celis ky) Osteo. Ji congrdes. Newt Sk Kis Bp Jelse Kis k-L I Racctrae te te WY Pwertous Set EF Cen, of eee ere ere eee : —| on 4 — Pa eters 2) "Tim da generate the newt Xe “The. 0. OR ke acts y.09 dae | | — enpitcld Conctsaints 2) atime Re the sounding 29.9 Be “The no o- %. sate Mia tee Kx a @ scanned with OKEN Scanner Poe Ba fucins pablo: E-Dxn Cre &xe) ches board fs Grd ee Gueens gee qv, Pia Jusén to be. olqced in Yast Wu) [ Sesend__Queen fv second aow fe L pth} —ouecen to ba Plared ty ite row L I Prd)lens {S40 And dhe columm itt ‘n_whteh tina’ Queen js do pe placed — SP Dounding, Runchon —} sthot Plated - A nenateacking Gueens — ~-r—i¢ no Gi.een in Cuma ow, gare — Column f=_ Same dpagoana/ ah UPPOSe trioa Gucen Qane._stated at - QosiHon Ci 3D" and re 0 Then they Oe. On dir Same cllagang| only ff le fof RY og itjs key fats jak € } 2 wa4 SKE | je two queen le ay the Same —} dagen} sel ¢ one {2 —— i — | hea pepe] Cp Bigatti Al gorttnm place CK j) M_-Retucns — t5u¢ if a Quesh 2 Placed ta eth yeu & ith "oo lumn yjr eum: false. xPF > can be } Lo Muhece feat Ce!) values pare bean ¢ Ag "Ros vetuens abeolure Value, (o)) : Wie — 1 eat ss L a @ scanned with OKEN Scanner oJ @ scanned with OKEN Scanner Discovers. Color odes _h @ scanned with OKEN Scanner 0 DATE ps PAGE NO. AIS. Algosithm sae a This al goaiddom uu) — es eee auc pea ces % “The. Qarapn_t “rep. 1) _booleam ad jarency L_@ti_ascign ments of =) h_gyeh —— Wddre vertices 9 thee garap fe Uther -adjaceni- vert ces gare. _sst9 ne —— Os, 1 distal Integers axe Printed Kis —~ Lte- Snderse- of the next ote 1. | Color i “repeat ie ee Next Value Ce), // Asean to xfe] 4 19a color. ff Gerv = 6) then 11 NO new Colow on | ae puth* tl POSHbie i i 2—Ges 12 Cksn) then }) At mest _m color tLhave been Used be Lt_colow MN Vestices, Insite (xC1tn}); else. mcolowng Cre) 2 al unt (Pale: 5 @ scanned with OKEN Scanner tu as == xe hav ssigned nt : 1 tf ces, — [the seange C4, m1) suon thad—adjacene VEes have. distinc integers A_velue.— fea {s_assigned |cletmr mined in jhe range Co,)-—% = ee the. neal _Jat ges mw ened__catoe WORT bt _maintaiming, clistndness Erne acheter QnUs: = Tverittes ops vewtex Ke TE mo_such color uss tthen 2K i$ oO. repeat a tel Ser Gere ta) med Cmts] Net Mg ee i& (EK =o) then wetuens )An colors pve pee eu j= tt ndo \ Tl Chee iP THIS coloe fs disttnck tt fom adtaceni-_coloré. 3 1 CCG L¥g#O and Curd) > 2efi1)) — 7 thee [LEP Ce jSdIS an edge & i® adr. li vestices Jnave dhe Same colos- et break 5 % a ih Cys nad then i new color found: rretuer7 * 4 Uni (fake), J) Otverwise dey 1 Dnd [1 Anotresr Coles. uy Tone. om plenty f° oO Cnm™) () a @ scanned with OKEN Scanner DATE: 1120 PAGE NO. State SPare— All Paths From waurte wot Node ¢o Other holes \P2nblem Stake Each Nede jin dhe. date space iS Called Problem state. Solustton States — 4) Live node — A nede that has bee genesetaal but whose, Chi dren have ok Yet been Gen emated E-node- A {ive nale ahace, children Orme. _curmrenHy belva expand: Tn otter LIONS aun le-neddeSse a ndle_cummtty etna. enpondeds, - a Dead node— PE_genaxated nate tha fs not to be eepanded ny Buacther Wi Childwen of a dead node Jhave aiesan been extpandca Beanoh & bound — ~ePeres to all stabe cpace Lemeh methods in ushtoh uh chitdmens of an E—nede aqae Genera besa gn Hees [tye Dede an become te. Enda erence > Barcietocun) p RE Be @ scanned with OKEN Scanner & Beanch © Bound An =] f | BSR =| General Melved & —The_texm franch & bound refs to_alL Stare space. Seah metheds jn _urhidh 4 GU childwon of the €-node are — Jenesated befyra any other tive Nede— | Can becoms the | € node. — Rounding £unchens ave used to helP Guold he, Genexation of Subte0s that ot © a 6 = -Kle have 2 aap search RES ¢ D- sear fs Node ax pumation. BES- dike stake spare gegmh .pil) be Called FOFo (Bar Tn soct out) D-— 8 nh : be. called { TFo, | Least cost CLC) Caagch 1 The ceasch BS an answoe nae - can of) 1 a be -sPeeled by Une an “intel ent! Trani . Panton OC). Lag dive. z New €- node. 18 _Selevied ou tHe Joaste oo ths cows. Sincuon Fax_ary node this cost could be Ty No. oF nade tn the. Swine 2¢ the} Need +o be generated bef on, angsuat. Meds $$ enerated - &> “The no- of Jevels the neqest Qniwe - Node {8 Bom x. Ge) be an estimate of an _addthunal effort needed to se¢sch_an an Dod Bom 28 - r io @ scanned with OKEN Scanner eee ines eee ee ——_=>}|_ lee — Stele. Space tre nd CQ a cosh Runcton ee the nedes In ——4-Te2e_is_a node in: £, then _¢¢x¢)_1.$_the—— Minima Cot of “ary angus, ede ___§ da_delebe 4 adda_Lve nede vm _ox to toe trot of Live Nades res. I “This al qo. [Ps_the. pata ym dan Antwek node 1A Dade te the nat nede k, — l Egon an Mix Aistnode = Secovy 4 Jistnede # nevi» 2 Pasen}-* al A Remerims Flag d- casi { 4 Mgcadthm LCSearh Ct) | IL Seah +. fr an anewet nade. Cc iP ¥& ig an anewos nade then Output 8 cinder Fst) 1Ee-nede. Tn! thal} the Lic oF live try aodes ta ose Ad empdy » SEE @ scanned with OKEN Scanner UU es — | ee | fie etc an _ancwet_ nade. them ——— . Outpul she Path fom 210 E — Quad Tre kus, | Ardalcre)+__}) ¢_i8_new lve node - a gC Ramat s E5/) Polos fat path An vets | Th = —-_i12 thers cme no more lve neder Ho —| y 7 Witte C* No answet node’); = 26 bus q Et= leat(): Z Unt) CFales) 5 | 4 | | I : | “€ i o @) = = 7 @ scanned with OKEN Scanner node Commen Seach 1 astocated wotdin ce wre ‘Ob 4s comprede, jn dead tive, b ! —4 @ scanned with OKEN Scanner luton State. spare Apee can be —deemulared by : 2 Vartable tuple Size Pearnulation _—— 2 fixed tuple s20 fee nnulation — A oG OCS let Sy = be Subot 8 jabs Selected Bayt af node x. DA om = mar S15 e824 dn = pam PA 18 an entire Fe ae tee CC) [) Rr “nede 2 fp CC2) ms mae S 1 | yeSey zt buf Sx= Demag TY =) - med Pic oO rea iESe C) =0 aN tex . i aac freinds @ scanned with OKEN Scanner PAGE NU. @ scanned with OKEN Scanner Node Comen ponds do arisen fale 4 Pep ey ie 5 cA wie Node commosPonk to ermnisgon oP Tob 1 Job 2 Soa f eet PY fs Sti0a Js~ sp Node 5 Conras ponds 42 omsaton ot- fob 2 on o—penaulty is (0. 2 @ scanned with OKEN Scanner @ Olt Knapsage. Geoblenm) i— Cunn4 Bo) AAAS I 1 L PPreblem » x4 “HAs Knapsate 79 maximization poblen- _ = This _direy wlty |S easily. overcome by= ——— 4. vento: b wepla 3 the Objective TuneHor b Pie if —Zpix = Cleaat Spied will be Mmaccmtzed jf £. minimize — 2 Pix: =) Subject 10a 2 | Ke [deol | Bh A | ale leg 8} eisfap | fel . 4 ; f eal al ¢- 4 EKDTHO! | IH | [als ele 8) | fy € +) Salt q IN NEP EE 4 $} elste]s| | fe ‘ 7 L- NJ yy [o = + ) Nols § gf 8is/9] 7 yy WW + q Cc « a a) a a q iat —— Sw SO \ —| 4 A Le ' \\ @ pau mabmx Fee (14% 25) L« GC 06 <6 ce | G6 Ge ets @ @ «6 ¢ «| CS HS co 6 | [ea io © &] C1426) = 26to¢ oO = 29 Ry C4, 2 5,3) RIGA IS bs, | Jan) |B AC1,4 2,5, 4) = 26 [CBS deeminates wire, Iyecknes 4 Pade ay rt lewd re. tout: (7) @ scanned with OKEN Scanner

You might also like