C 88: Atiiil Intllign ing 009 Ltu : Quu-Bs //008 Jon DNo UC Bkly Mny slis om Dn Klin, tut Russll o Anw Moo Announmnts Pojt 0: Pyton Tutoil Post onlin now Du nxt Wnsy, Jn 8 T is l toy om m-3m in o 75 T l is otionl, ut t ssignmnt is not I you sumit, you won t gt n mil yt Pojt : Post tonigt Du in two wks: Wnsy, F tt ly n sk ustions. It s long tn most! tion Mo Announmnts tion stts Mony tion 0 om 5m - 6m will l in 9 Evns Tims n lotions will on t wsit sotly Oi ous My nw oi ous: Tus 3- n W - I oi ous (o will ) on t wsit Agnts tt Pln A Polms Toy Uninom Mtos (viw o mny) Dt-Fist Bt-Fist Uniom-Cost Huisti Mtos (nw mtil) y Fom Lst Tim: Rlx Agnts ol Bs Agnts Rlx gnts: Coos tion s on unt t n mmoy Do not onsi utu onsuns o ti tions Cn lx gnt tionl? How goo ws ou gnt om lst lss? Rmin: t oo i it ws t; voi gosts Aginst nom gosts: won 3% o t tim On t oiginl Pmn m: 5% win t Aginst lx gosts on smll m: 3% win t ol-s gnts: Pln Mk isions s on (yotsiz) onsuns o tions Must v mol o ow t wol volvs in sons to tions [mo: ln st/ ln otiml]
Polms A s olm onsists o: A stt s A susso untion A stt stt n gol tst N,.0 E,.0 A solution is sun o tions ( ln) wi tnsoms t stt stt to gol stt How Big is t tt? Polm: Et ll o t oo Pmn s ositions: 0 x Foo ount: 30 ost ositions: x Ditions: u, own, lt, igt, sto Ts tt s N,.0 E,.0 A s t: Tis is wt i t o lns n outoms tt stt t t oot no Ciln oson to sussos Nos ontin stts, oson to PLAN to tos stts Fo most olms, w n nv tully uil t wol t Fo vy s olm, t s osoning g o t stt s T susso untion is snt y s W n ly uil tis g in mmoy Lugly tiny s g o tiny s olm nl T Exml: T Dtil suoo is in t ook! T Initiliz t oot no o t s t wit t stt stt Wil t unxn l nos (ing): Coos l no (sttgy) I t no ontins gol stt: tun t osoning solution Els: xn t no n its iln to t t Imotnt is: Fing Exnsion ttgy: wi ing nos to xlo?
tts vs. Nos tt s vs Ts tt s gs v olm stts Rsnt n stt stt o t wol Hv sussos, n gol / non-gol, v multil ssos ts v s nos Rsnt ln (t) wi sults in t no s stt Hv olm stt n on nt, t lngt, t & ost T sm olm stt my in multil s t nos Polm tts No Nos Pnt Ation Dt 5 Dt 6 W lmost lwys onstut ot on mn n w onstut s littl s ossil. E NODE in in t s t is n nti PATH in t olm g. Rviw: Dt Fist Rviw: Bt Fist ttgy: xn st no ist Imlmnttion: Fing is LIFO stk ttgy: xn sllowst no ist Imlmnttion: Fing is FIFO uu Tis Algoitm Potis Comlt? unt to in solution i on xists? Otiml? unt to in t lst ost t? Tim omlxity? omlxity? Vils: n Num o stts in t olm T vg ning to B (t vg num o sussos) C* Cost o lst ost solution s m Dt o t sllowst solution Mx t o t s t DF Algoitm Comlt Otiml Tim DF Dt Fist N N N N O(B Ininit LMAX ) O(LMAX) Ininit TART OAL Ininit ts mk DF inomlt How n w ix tis? 3
DF Wit yl king, DF is omlt. m tis no nos nos m nos BF Algoitm Comlt Otiml Tim DF BF w/ Pt Cking s tis Y N O( m+ ) O(m) Y N* O( s+ ) O( s ) no nos nos s nos Algoitm Comlt Otiml Tim DF w/ Pt Cking Y N O( m+ ) O(m) Wn is DF otiml? Wn is BF otiml? m nos Ittiv Dning Ittiv ning uss DF s suoutin:. Do DF wi only ss o ts o lngt o lss.. I il, o DF wi only ss ts o lngt o lss. 3. I il, o DF wi only ss ts o lngt 3 o lss..n so on. Algoitm Comlt Otiml Tim DF BF ID w/ Pt Cking Y N O( m+ ) O(m) Y N* O( s+ ) O( s ) Y N* O( s+ ) O(s) TART 3 Costs on Ations 5 8 OAL Noti tt BF ins t sotst t in tms o num o tnsitions. It os not in t lst-ost t. W will uikly ov n lgoitm wi os in t lst-ost t. 9 8 3 Uniom Cost Pioity Quu Rs Exn st no ist: Fing is ioity uu Cost ontous 6 3 9 5 3 7 0 8 8 3 9 8 5 7 0 6 A ioity uu is t stutu in wi you n inst n tiv (ky, vlu) is wit t ollowing otions:.us(ky, vlu).o() insts (ky, vlu) into t uu. tuns t ky wit t lowst vlu, n movs it om t uu. You n s ky s ioity y using it gin Unlik gul uu, instions n t onstnt tim, usully O(log n) W ll n ioity uus o ost-snsitiv s mtos
Uniom Cost 5 Minut Bk Algoitm Comlt Otiml Tim DF BF UC w/ Pt Cking Y N O( m+ ) O(m) Y N O( s+ ) O( s ) Y* Y O( C*/ ) O( C*/ ) C*/ tis You n mo out uniom ost s s ilu in t ook, o y sking us A Dn illikoiginl Uniom Cost Issus Huistis Rmm: xlos insing ost ontous T goo: UC is omlt n otiml! 3 Any stimt o ow los stt is to gol Dsign o tiul s olm Exmls: Mnttn istn, Eulin istn T : Exlos otions in vy ition No inomtion out gol lotion tt ol 5 0. [mo: us ontous ] Bst Fist / y Bst Fist / y ttgy: xn t losst no to t gol =8 =0 8 =5 = 5 = 3 =8 9 9 = =6 5 = 5 3 = =9 =6 [mo: gy] A ommon s: Bst-ist tks you stigt to t (wong) gol Wost-s: lik lygui DF in t wost s Cn xlo vyting Cn gt stuk in loos i no yl king Lik DF in omltnss (init stts w/ yl king) 5
on Wong? Ext Wok? Filu to tt t stts n us xonntilly mo wok (wy?) In BF, o xml, w souln t ot xning t il nos (wy?) Vy siml ix: nv xn stt ty twi Cn tis wk omltnss? Wy o wy not? How out otimlity? Wy o wy not? om Hints s is lmost lwys tt tn t s (wn not?) Imlmnt you los list s it o st! Nos ontully ts, ut tt to snt wit stt, ost, lst tion, n n to t nt no 6