A search problem. Formalizing a search problem. Our Search Problem. Our Search Problem. Overview

Similar documents
Searching: Deterministic single-agent

CS 188: Artificial Intelligence Fall Announcements

CS 188: Artificial Intelligence Spring Announcements

Announcements. CS 188: Artificial Intelligence Fall Today. Reflex Agents. Goal Based Agents. Search Problems

CS 188: Artificial Intelligence Fall Announcements

Announcements. CS 188: Artificial Intelligence Spring More Announcements. Today. From Last Time: Reflex Agents.

CS 188: Artificial Intelligence Spring 2009

Outline. CSE 473: Artificial Intelligence Spring Types of Agents

Announcements. CS 188: Artificial Intelligence Fall Reflex Agents. Today. Goal Based Agents. Search Problems

CS 188: Artificial Intelligence Fall 2011

CS 188: Artificial Intelligence Spring Announcements

CS 188: Artificial Intelligence Spring Announcements

Today. CS 232: Ar)ficial Intelligence. Search. Agents that Plan. September 3 rd, 2015 Search Problems. Uninformed Search Methods

CS 188: Artificial Intelligence

Reminder. CS 188: Artificial Intelligence. A reflex agent for pacman. Reflex Agent. A reflex agent for pacman (3) A reflex agent for pacman (2)

CSE 573: Artificial Intelligence Autumn Search thru a. Goal Based Agents 9/28/2012. Agent vs. Environment. Example: N Queens

Announcements. CS 188: Artificial Intelligence Fall Office hours, Section. Today. DFS and BFS. Recap: Search. Lecture 3: A* Search 9/3/2009

Self-Adjusting Top Trees

Exam 2 Solutions. Jonathan Turner 4/2/2012. CS 542 Advanced Data Structures and Algorithms

Course Logistics Textbook: Artificial Intelligence: A Modern Approach, Russell and Norvig (3 rd ed) Topics

10.3 The Quadratic Formula

Announcements. CS 188: Artificial Intelligence. Costs on Actions. Recap: Search. Lecture 3: A* Search

(2) If we multiplied a row of B by λ, then the value is also multiplied by λ(here lambda could be 0). namely

T h e C S E T I P r o j e c t

Tangram Fractions Overview: Students will analyze standard and nonstandard

Weighted Graphs. Weighted graphs may be either directed or undirected.

d e c b a d c b a d e c b a a c a d c c e b

Easy Steps to build a part number... Tri-Start Series III CF P

OpenMx Matrices and Operators

CS 103 BFS Alorithm. Mark Redekopp

Using the Printable Sticker Function. Using the Edit Screen. Computer. Tablet. ScanNCutCanvas

P a g e 3 6 of R e p o r t P B 4 / 0 9

P a g e 5 1 of R e p o r t P B 4 / 0 9

An undirected graph G = (V, E) V a set of vertices E a set of unordered edges (v,w) where v, w in V

Who is this Great Team? Nickname. Strangest Gift/Friend. Hometown. Best Teacher. Hobby. Travel Destination. 8 G People, Places & Possibilities

KEB INVERTER L1 L2 L3 FLC - RELAY 1 COMMON I1 - APPROACH CLOSE 0V - DIGITAL COMMON FLA - RELAY 1 N.O. AN1+ - ANALOG 1 (+) CRF - +10V OUTPUT

1 Introduction to Modulo 7 Arithmetic

CSE 373: AVL trees. Warmup: Warmup. Interlude: Exploring the balance invariant. AVL Trees: Invariants. AVL tree invariants review

Classical Theory of Fourier Series : Demystified and Generalised VIVEK V. RANE. The Institute of Science, 15, Madam Cama Road, Mumbai

Series III, TV Breakaway Fail-Safe Connectors Quick-Disconnect with an Axial Pull of Lanyard

Math 166 Week in Review 2 Sections 1.1b, 1.2, 1.3, & 1.4

Language Processors F29LP2, Lecture 5

16.unified Introduction to Computers and Programming. SOLUTIONS to Examination 4/30/04 9:05am - 10:00am

Lecture 20: Minimum Spanning Trees (CLRS 23)

Chapter 6 Perturbation theory

ENGO 431 Analytical Photogrammetry

Problem solving by search

CSE 373. Graphs 1: Concepts, Depth/Breadth-First Search reading: Weiss Ch. 9. slides created by Marty Stepp

The University of Sydney MATH 2009

Stable Matching for Spectrum Market with Guaranteed Minimum Requirement

Module graph.py. 1 Introduction. 2 Graph basics. 3 Module graph.py. 3.1 Objects. CS 231 Naomi Nishimura

Spanning Trees. BFS, DFS spanning tree Minimum spanning tree. March 28, 2018 Cinda Heeren / Geoffrey Tien 1

Planar Upward Drawings

4.1 Interval Scheduling. Chapter 4. Greedy Algorithms. Interval Scheduling: Greedy Algorithms. Interval Scheduling. Interval scheduling.

LWC 434 East First Street 4440 Garwood Place

176 5 t h Fl oo r. 337 P o ly me r Ma te ri al s

Trade Patterns, Production networks, and Trade and employment in the Asia-US region

Functions and Graphs 1. (a) (b) (c) (f) (e) (d) 2. (a) (b) (c) (d)

Multicast routing algorithm based on Extended Simulated Annealing Algorithm

ECE COMBINATIONAL BUILDING BLOCKS - INVEST 13 DECODERS AND ENCODERS

Paths. Connectivity. Euler and Hamilton Paths. Planar graphs.

Math 61 : Discrete Structures Final Exam Instructor: Ciprian Manolescu. You have 180 minutes.

L...,,...lllM" l)-""" Si_...,...

A L A BA M A L A W R E V IE W

C-Curves. An alternative to the use of hyperbolic decline curves S E R A F I M. Prepared by: Serafim Ltd. P. +44 (0)

(Minimum) Spanning Trees

Problem 1. Solution: = show that for a constant number of particles: c and V. a) Using the definitions of P

Solutions for HW11. Exercise 34. (a) Use the recurrence relation t(g) = t(g e) + t(g/e) to count the number of spanning trees of v 1

learning objectives learn what graphs are in mathematical terms learn how to represent graphs in computers learn about typical graph algorithms

Appendix. In the absence of default risk, the benefit of the tax shield due to debt financing by the firm is 1 C E C

Nefertiti. Echoes of. Regal components evoke visions of the past MULTIPLE STITCHES. designed by Helena Tang-Lim

Improving Union. Implementation. Union-by-size Code. Union-by-Size Find Analysis. Path Compression! Improving Find find(e)

Outline. 1 Introduction. 2 Min-Cost Spanning Trees. 4 Example

b. How many ternary words of length 23 with eight 0 s, nine 1 s and six 2 s?

COMP 250. Lecture 29. graph traversal. Nov. 15/16, 2017

( ) ( ) ( ) 0. Conservation of Energy & Poynting Theorem. From Maxwell s equations we have. M t. From above it can be shown (HW)

7 ACM FOR FRAME 2SET 6 FRAME 2SET 5 ACM FOR MAIN FRAME 2SET 4 MAIN FRAME 2SET 3 POLE ASSLY 1 2 CROWN STRUCTURE ASSLY 1 1 CROWN ASSLY 1

NUCON NRNON CONRNC ON CURRN RN N CHNOOGY, 011 oo uul o w ul x ol volv y y oll. y ov,., - o lo ll vy ul o Mo l u v ul (G) v Gl vlu oll. u 3- [11]. 000

Econ 401A Three extra questions John Riley. Homework 3 Due Tuesday, Nov 28

Housing Market Monitor

DUET WITH DIAMONDS COLOR SHIFTING BRACELET By Leslie Rogalski

Pythagorean Theorem and Trigonometry

I N A C O M P L E X W O R L D

sin sin 1 d r d Ae r 2

The local orthonormal basis set (r,θ,φ) is related to the Cartesian system by:

F102 1/4 AMP +240 VDC SEE FIGURE 5-14 FILAMENT AND OVEN CKTS BLU J811 BREAK-IN TB103 TO S103 TRANSMITTER ASSOCIATED CAL OFF FUNCTION NOTE 2 STANDBY

Beechwood Music Department Staff

Cycles and Simple Cycles. Paths and Simple Paths. Trees. Problem: There is No Completely Standard Terminology!

Winnie flies again. Winnie s Song. hat. A big tall hat Ten long toes A black magic wand A long red nose. nose. She s Winnie Winnie the Witch.

Section 2.1 Special Right Triangles

G-001 CHATHAM HARBOR AUNT LYDIA'S COVE CHATHAM ATLANTIC OCEAN INDEX OF NAVIGATION AIDS GENERAL NOTES: GENERAL PLAN A6 SCALE: 1" = 500' CANADA

Three Phase Asymmetrical Load Flow for Four-Wire Distribution Networks

Gavilan JCCD Trustee Areas Plan Adopted November 10, 2015

Planar convex hulls (I)

CSE 373: More on graphs; DFS and BFS. Michael Lee Wednesday, Feb 14, 2018

5/1/2018. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees

What are S M U s? SMU = Software Maintenance Upgrade Software patch del iv ery u nit wh ich once ins tal l ed and activ ated prov ides a point-fix for

BASIC CAGE DETAILS SHOWN 3D MODEL: PSM ASY INNER WALL TABS ARE COINED OVER BASE AND COVER FOR RIGIDITY SPRING FINGERS CLOSED TOP

Martin menait son pourceau au marché

PLAYGROUND SALE Take up to 40% off. Plus FREE equipment * with select purchase DETAILS INSIDE

Transcription:

Sing: Dtministi singl-gnt Atully, tis is otimiztion ov tim wit ist vils Anw W. Moo Posso Sool o Comut Sin Cngi Mllon Univsity www.s.mu.u/~wm wm@s.mu.u -6-7 ot to ot ts n uss o ts slis. Anw woul ligt i you oun tis sou mtil usul in giving you own ltus. Fl to us ts slis vtim, o to moiy tm to it you own ns. PowPoint oiginls vill. I you mk us o signiint otion o ts slis in you own ltu, ls inlu tis mssg, o t ollowing link to t sou ositoy o Anw s tutoils: tt://www.s.mu.u/~wm/tutoils. Commnts n otions gtully iv. Sli Ovviw Dtministi, ist, singl-gnt, s olms Uninom s t Fist S Otimlity, Comltnss, Tim n S omlxity S Ts Dt Fist S Ittiv Dning st Fist Gy S Sli A s olm How o w gt om S to G? An wt s t smllst ossil num o tnsitions? Sli Fomlizing s olm A s olm s iv omonnts:, S, G, sus, ost is init st o stts. S is non-mty st o stt stts. G is non-mty st o gol stts. sus : P() is untion wi tks stt s inut n tuns st o stts s outut. sus(s) mns t st o stts you n om s in on st. ost :, Positiv um is untion wi tks two stts, s n s, s inut. It tuns t on-st ost o tvling om s to s. T ost untion is only in wn s is susso stt o s. Sli Ou S Polm = {,,,,,,,,,,, } S = { } G = { } sus() = { } sus() = {, } sus() = U t. ost(s,s ) = o ll tnsitions Sli Ou S Polm = {,,,,,,,,,,, } S = { } G = { } sus() = { } sus() = {, } sus() = U t. ost(s,s ) = o ll tnsitions Wy o w? Wt olms lik tis? Sli 6

S Polms Mo S Polms Suling -uns Wt nxt? Sli 7 Sli Mo S Polms ut t lnty o tings wi w nomlly ll s olms tt on t it ou Suling igi inition A s olm s iv omonnts:, S, G, sus, ost -uns is init st o stts. S is non-mty st o stt stts. G is non-mty st o gol stts. sus : P() is untion wi tks stt s inut n tuns st o stts s outut. sus(s) mns t st o stts you n om s in on st. ost :, Positiv um is untion wi tks two stts, s n s, s inut. It tuns t on-st ost o tvling om Wt snxt? to s. T ost untion is only in wn s is susso stt o s. Cn you tink o xmls? Ou inition xlus Sli Sli 0 Gm ginst vsy Ou inition xlus Cn Hin Stt t Fist S Continuum (ininit num) o stts All o t ov, lus istiut tm ontol Sli l ll stts tt l om S in st ut n t l in lss tn st. Tn ll ll stts tt l om S in sts ut n t l in lss tn sts. Tn ll ll stts tt l om S in sts ut n t l in lss tn sts. Et until Gol stt. Sli

t-ist S st om stt t-ist S 0 sts om stt 0 sts om stt Sli Sli st om stt t-ist S st om stt t-ist S 0 sts om stt 0 sts om stt sts om stt sts om stt sts om stt Sli Sli 6 st om stt 0 sts om stt t-ist S sts om stt sts om stt sts om stt Sli 7 Rmm t t! Also, wn you ll stt, o t sso stt. Tis o is ll koint. T istoy o ssos is us to gnt t solution t, on you v oun t gol: I v got to t gol. I s I ws t o tis. An I ws t o I ws t. An I ws. so solution t is S G Sli

st om stt koints sts om stt st om stt koints sts om stt 0 sts om stt 0 sts om stt sts om stt sts om stt sts om stt sts om stt Sli Sli 0 Stting t Fist S Fo ny stt s tt w v ll, w ll mm: vious(s) s t vious stt on sotst t om stt to s. On t kt ittion o t lgoitm w ll gin wit V k in s t st o tos stts o wi t sotst t om t stt osts xtly k sts Tn, uing tt ittion, w ll omut V k+, in s t st o tos stts o wi t sotst t om t stt osts xtly k+ sts W gin wit k = 0, V 0 = {} n w ll in, vious() = U Tn w ll in tings on st om t into V. An w ll k going. V 0 Sli Sli V 0 V 0 V V V Sli Sli

V V V V V V V V 0 V 0 Sli Sli 6 t Fist S V 0 := S (t st o stt stts) vious() := I k := 0 wil (no gol stt is in V k n V k is not mty) o V k+ := mty st Fo stt s in V k Fo stt s in sus(s) I s s not ly n ll St vious(s ) := s A s into V k+ k := k+ I V k is mty signl FAIURE Els uil t solution t tus: t S i t it stt in t sotst t. Din S k =, n oll i <= k, in S i- = vious(s i ). V V 0 Suos you s s onvnintly llow you to otin ssos(stt). Cn you tink o int wy to o? An woul you l to voi stoing somting tt w viously to sto? V V V Sli 7 Sli Anot wy: Wok k l ll stts tt n G in st ut n t it in lss tn st. l ll stts tt n G in sts ut n t it in lss tn sts. Et. until stt is. num o sts to gol lls tmin t sotst t. Don t n xt ookking ino. Sli t Fist Dtils It is in o t to mo tn on gol stt. It is in o t to mo tn on stt stt. Tis lgoitm woks ows om t stt. Any lgoitm wi woks ows om t stt is si to ow ining. ou n lso wok kws om t gol. Tis lgoitm is vy simil to Dijkst s lgoitm. Any lgoitm wi woks kws om t gol is si to kw ining. kw vsus ow. Wi is tt? Ckmt xml Sli 0

Costs on tnsitions oti tt ins t sotst t in tms o num o tnsitions. It os not in t lst-ost t. W will uikly viw n lgoitm wi os in t lst-ost t. On t kt ittion, o ny stt S, wit g(s) s t lst-ost t to S in k o w sts. Sli st Cost t Fist V k = t st o stts wi n in xtly k sts, n o wi t lstost k-st t is lss ost tn ny t o lngt lss tn k. In ot wos, V k = t st o stts wos vlus ng on t vious ittion. V 0 := S (t st o stt stts) vious() := I g() = 0 k := 0 wil (V k is not mty) o V k+ := mty st Fo stt s in V k Fo stt s in sus(s) I s s not ly n ll OR i g(s) + Cost(s,s ) < g(s ) St vious(s ) := s St g(s ) := g(s) + Cost(s,s ) A s into V k+ k := k+ I not ll, xit signling FAIURE Els uil t solution t tus: t S k t kt stt in t sotst t. Din S k =, n oll i <= k, in S i- = vious(s i ). Sli Uniom-Cost S A ontully siml o wn t osts on tnsitions It uss ioity uus Pioity uu Rs A ioity uu is t stutu in wi you n inst n tiv (ting, vlu) is wit t ollowing otions: Init-Piuu(P) initilizs t P to mty. Inst-Piuu(P, ting, vlu) insts (ting, vlu) into t uu. Po-lst(P) tuns t (ting, vlu) i wit t lowst vlu, n movs it om t uu. Sli Sli Pioity uu Rs A ioity uu is t stutu in wi you n inst n tiv (ting, vlu) is wit t ollowing otions: Pioity uus n imlmnt in su wy tt t ost o t inst n o otions Fo mo tils, s Knut o Sgwik o silly ny ook wit t wo lgoitms ominntly ing in t titl. Init-Piuu(P) initilizs t P to mty. Inst-Piuu(P, ting, vlu) insts (ting, vlu) into t uu. Po-lst(P) tuns t (ting, vlu) i wit t lowst vlu, n movs it om t uu. O(log(num o tings in ioity uu)) Vy (toug not solutly, inily!) Sli Uniom-Cost S A ontully siml o wn t osts on tnsitions It uss ioity uu P = St o stts tt v n xn o witing xnsion Pioity o stt s = g(s) = ost o gtting to s using t imli y koints. Sli 6 6

Stting Ittions P = { (S,0) } Sli 7 P = { (S,0) } Ittion:. Po lst-ost stt om P. A sussos Sli Ittions Ittions P = { (,), (,), (,) } Ittion:. Po lst-ost stt om P. A sussos Sli P = { (,), (,), (,6) } Ittion:. Po lst-ost stt om P. A sussos Sli 0 Ittions Ittions P = { (,), (,), (,), (,6) } Ittion:. Po lst-ost stt om P. A sussos Sli P = { (,), (,), (,), (,6) } ot wt n : liz tt gtting to vi ws tt tn t viously st-known wy to gt to n so s ioity ws ng Ittion:. Po lst-ost stt om P. A sussos Sli 7

Ittions Ittions P = { (,), (,6), (,), (,6) } Ittion:. Po lst-ost stt om P. A sussos Sli P = { (,6),(,6),(,),(,),(,6) } Ittion:. Po lst-ost stt om P. A sussos Sli Ittions Ittions P = { (,6),(,),(,),(,6) } Ittion:. Po lst-ost stt om P. A sussos Sli P = { (,0), (,),(,) } Ittion:. Po lst-ost stt om P. A sussos Sli 6 Ittions ot wt n : oun nw wy to gt to ut it ws mo ostly tn t st known wy n so s ioity ws unng P = { (,0), (,),(,) } Ittion:. Po lst-ost stt om P. A sussos Sli 7 Ittions P = { (,),(,) } Ittion:. Po lst-ost stt om P. A sussos Sli

Ittions Ittions P = { (,) } Ittion:. Po lst-ost stt om P. A sussos Sli P = { (,) } Ittion:. Po lst-ost stt om P. A sussos Sli 0 Ittions Ittions ustion: Is tmint s soon s you isov t gol t igt stoing ition? P = { (G,) } Ittion:. Po lst-ost stt om P. A sussos Sli P = { (G,) } Ittion:. Po lst-ost stt om P. A sussos Sli tmints P = { } Tmint only on t gol is o om t ioity uu. Els w my miss sot t. Ittion:. Po lst-ost stt om P. A sussos Sli Juging s lgoitm Comltnss: is t lgoitm gunt to in solution i solution xists? Gunt to in otiml? (will it in t lst ost t?) Algoitmi tim omlxity S omlxity (mmoy us) Vils: num o stts in t olm t vg ning to (t vg num o sussos) (>) t lngt o t t om stt to gol wit t sotst num o sts How woul w jug ou lgoitms? Sli

Juging s lgoitm Juging s lgoitm num o stts in t olm t vg ning to (t vg num o sussos) (>) t lngt o t t om stt to gol wit t sotst num o sts t vg siz o t ioity uu num o stts in t olm t vg ning to (t vg num o sussos) (>) t lngt o t t om stt to gol wit t sotst num o sts t vg siz o t ioity uu Algoitm C st Cost t Fist S Uniom Cost S Com Otiml Tim lt i ll tnsitions sm ost S O(log() * min(, )) Algoitm C st Cost t Fist S Uniom Cost S Com Otiml Tim lt i ll tnsitions sm ost S O(log() * min(, )) Sli Sli 6 S T Rsnttion Wt o o w go toug t s t wit? Sli 7 Dt Fist S An ltntiv to. Alwys xn om t mostntly-xn no, i it s ny unti sussos. Els ku to t vious no on t unt t. Sli in tion S t tvsl Cn you w in t o in wi t s-t nos visit? Sli Sli 60 0

Algoitm W us t stutu w ll ll Pt to snt t,, t om t to t unt stt. E.G. Pt P = <,,, > Along wit no on t t, w must mm wi sussos w still v vill to xn. E.G. t t ollowing oint, w ll v P = < (xn=, ), (xn = U), (xn = ), (xn = ) > Algoitm t P = < (xn = sus())> Wil (P not mty n to(p) not gol) i xn o to(p) is mty tn mov to(p) ( o t stk ) ls lt s mm o xn o to(p) mov s om xn o to(p) mk nw itm on t to o t P: s (xn = sus(s)) I P is mty tun FAIURE Els tun t t onsisting o stts in P Tis lgoitm n wittn ntly wit usion, i.. using t ogm stk to imlmnt P. Sli 6 Sli 6 Juging s lgoitm Juging s lgoitm num o stts in t olm t vg ning to (t vg num o sussos) (>) t lngt o t t om stt to gol wit t sotst num o sts t vg siz o t ioity uu num o stts in t olm t vg ning to (t vg num o sussos) (>) t lngt o t t om stt to gol wit t sotst num o sts t vg siz o t ioity uu Algoitm C st Cost t Fist S Uniom Cost S Dt Fist S Com Otiml Tim lt i ll tnsitions sm ost S O(log() * min(, )) /A /A Algoitm C st Cost t Fist S Uniom Cost S Dt Fist S Com Otiml Tim lt i ll tnsitions sm ost S O(log() * min(, )) /A /A Sli 6 Sli 6 Juging s lgoitm num o stts in t olm t vg ning to (t vg num o sussos) (>) t lngt o t t om stt to gol wit t sotst num o sts MAX ngt o longst t om stt to nyw t vg siz o t ioity uu Juging s lgoitm num o stts in t olm t vg ning to (t vg num o sussos) (>) t lngt o t t om stt to gol wit t sotst num o sts MAX ngt o longst t om stt to nyw t vg siz o t ioity uu Algoitm t Fist S Com Otiml Tim lt i ll tnsitions sm ost S Algoitm Com Otiml Tim lt C st Cost C st Cost Uniom O(log() * min(, )) O(min(, Cost S )) Uniom Cost S O(log() * min(, )) ** Dt Fist O( MAX S ) ** Dt Fist S O( MAX ) Assuming Ayli Assuming Ayli S S Sli 6 S S Sli 66 t Fist S i ll tnsitions sm ost S

ustions to on How woul you vnt om looing? How oul you o it to giv n otiml solution? ustions to on How woul you vnt om looing? How oul you o it to giv n otiml solution? Answ : PC- (Pt Cking ): Don t us on stt i tt stt is ly in t unt t Answ : MEM (Mmoizing ): Rmm ll stts xn so. v xn nyting twi. Sli 67 Sli 6 ustions to on How woul you vnt om looing? How oul you o it to giv n otiml solution? Answ : PC- (Pt Cking ): Don t us on stt i tt stt is ly in t unt t Answ : MEM (Mmoizing ): Rmm ll stts xn so. v xn nyting twi. ustions to on How woul you vnt om looing? A t osions wn PC is tt tn MEM? How oul you o it to giv n otiml solution? A t osions wn MEM is tt tn PC? Answ : PC- (Pt Cking ): Don t us on stt i tt stt is ly in t unt t Answ : MEM (Mmoizing ): Rmm ll stts xn so. v xn nyting twi. Sli 6 Sli 70 MAX Algoitm PC Pt Ck Juging s lgoitm num o stts in t olm t vg ning to (t vg num o sussos) (>) t lngt o t t om stt to gol wit t sotst num o sts ngt o longst yl- t om stt to nyw t vg siz o t ioity uu t Fist S C st Cost Uniom Cost S MEM Mmoizing Com Otiml Tim lt i ll tnsitions sm ost O(log() * min(, )) O( MAX ) O(min(, MAX )) S O(min(, MAX )) Sli 7 Juging s lgoitm num o stts in t olm t vg ning to (t vg num o sussos) (>) t lngt o t t om stt to gol wit t sotst num o sts MAX ngt o longst yl- t om stt to nyw Algoitm PC Pt Ck t vg siz o t ioity uu t Fist S C st Cost Uniom Cost S MEM Mmoizing Com Otiml Tim lt i ll tnsitions sm ost O(log() * min(, )) O( MAX ) O(min(, MAX )) S O(min(, MAX )) Sli 7

Juging s lgoitm num o stts in t olm t vg ning to (t vg num o sussos) (>) t lngt o t t om stt to gol wit t sotst num o sts MAX ngt o longst yl- t om stt to nyw t vg siz o t ioity uu Mz xml Imgin stts lls in mz, you n mov, E, S, W. Wt woul lin o, ssuming it lwys xn t E susso ist, tn, tn W, tn S? Algoitm C st Cost t Fist S Uniom Cost S PC Pt Ck MEM Mmoizing Com Otiml Tim lt i ll tnsitions sm ost O(log() * min(, )) O( MAX ) O(min(, MAX )) S O(min(, MAX )) Sli 7 S Ot ustions: G Exnsion o E,, W, S Wt woul o? Wt woul PC o? Wt woul MEM o? Sli 7 S Two ot xmls G O:, E, S, W? Fow o kw I you v ssos() untion s wll s sussos() untion you n gin t t gol n t-ist-s kws until you it stt. G O:, E, S, W wit loos vnt Wy/Wn migt tis goo i? S Sli 7 Sli 76 Invnt An Algoitm Tim! H s wy to mtilly s osts somtims. iitionl S. Cn you guss wt tis lgoitm is, n wy it n ug ost-sv? num o stts in t olm t vg ning to (t vg num o sussos) (>) t lngt o t t om stt to gol wit t sotst num o sts MAX ngt o longst yl- t om stt to nyw Algoitm MEM Mmoizing I iition F S t vg siz o t ioity uu t Fist S C st Cost Uniom Cost S PC Pt Ck Com Otiml Tim lt i ll tnsitions sm ost O(log() * min(, )) O( MAX ) O(min(, MAX )) O(min(, / )) S O(min(, MAX )) O(min(, / )) Sli 77 Sli 7

MAX Algoitm C st Cost PC Pt Ck MEM Mmoizing I iition F S num o stts in t olm t vg ning to (t vg num o sussos) (>) t lngt o t t om stt to gol wit t sotst num o sts ngt o longst yl- t om stt to nyw t vg siz o t ioity uu t Fist S Uniom Cost S Com Otiml Tim lt i ll tnsitions sm ost All tns sm ost O(log() * min(, )) O( MAX ) O(min(, MAX )) O(min(, / )) S O(min(, MAX )) O(min(, / )) Sli 7 Ittiv Dning Ittiv ning is siml lgoitm wi uss s suoutin:. Do wi only ss o ts o lngt o lss. ( givs u ny t o lngt ). I il, o wi only ss ts o lngt o lss.. I il, o wi only ss ts o lngt o lss..n so on until suss Cost is O( + + + + ) = O( ) Cn mu tt tn gul. ut ost n mu gt tn t num o stts. Sli 0 Mz xml Imgin stts lls in mz, you n mov, E, S, W. Wt woul Ittiv Dning o, ssuming it lwys xn t E susso ist, tn, tn W, tn S? S G Exnsion o E,, W, S Sli MAX Algoitm C st Cost PC Pt Ck MEM Mmoizing I iition F S Ittiv ID Dning num o stts in t olm t vg ning to (t vg num o sussos) (>) t lngt o t t om stt to gol wit t sotst num o sts ngt o longst yl- t om stt to nyw t vg siz o t ioity uu t Fist S Uniom Cost S Com Otiml Tim lt i ll tnsitions sm ost All tns sm ost i ll tnsitions sm ost O(log() * min(, )) O( MAX ) O(min(, MAX )) O(min(, / )) O( ) S O(min(, MAX )) O(min(, / )) O() Sli num o stts in t olm t vg ning to (t vg num o sussos) (>) t lngt o t t om stt to gol wit t sotst num o sts MAX ngt o longst yl- t om stt to nyw Algoitm PC Pt Ck MEM Mmoizing I iition F S Ittiv ID Dning t vg siz o t ioity uu t Fist S C st Cost Uniom Cost S Com Otiml Tim lt i ll tnsitions sm ost All tns sm ost i ll tnsitions sm ost O(log() * min(, )) O( MAX ) O(min(, MAX )) O(min(, / )) O( ) S O(min(, MAX )) O(min(, / )) O() Sli st Fist Gy S s uisti. A uisti untion ms stt onto n stimt o t ost to t gol om tt stt. Cn you tink o xmls o uistis? E.G. o t -uzzl? E.G. o lnning t toug mz? Dnot t uisti y untion (s) om stts to ost vlu. Sli

Huisti S Suos in ition to t stn s siition w lso v uisti. A uisti untion ms stt onto n stimt o t ost to t gol om tt stt. Cn you tink o xmls o uistis? E.G. o t -uzzl? E.G. o lnning t toug mz? Dnot t uisti y untion (s) om stts to ost vlu. Euliin Huisti = = = = = = =6 = = =0 = =6 Sli Sli 6 Euliin Huisti =0 = = = = = = =6 = = =6 = Sli 7 Anot ioity uu lgoitm. ut tis tim, ioity is t uisti vlu. st Fist Gy S Init-Piuu(P) Inst-Piuu(P,,()) wil (P is not mty n P os not ontin gol stt) (s, ) := Po-lst(P) o s in sus(s) i s is not ly in P n s nv viously n visit Inst-Piuu(P,s,(s )) Algoitm stfs st Fist S Com Otiml Tim lt O(min(, MAX )) S O(min(, MAX )) A w imovmnts to tis lgoitm n mk tings mu tt. It s littl ting w lik to ll: A*. to ontinu! Sli Wt you soul know Tooug unstning o, C,. PC, MEM Unstn t onts o wt s is omlt, otiml, its tim n s omlxity Unstn t is in ittiv ning n iitionl s l to isuss t oktil tis t os n ons o t ov ss Sli