CPSC 322, Lecture 5 Slide 1
Un Unin info form rmed ed Se Sear arch ch
Computer ter Sc Science ce cpsc3 c322 22, , Lectur ture e 5 (Te Textb xtbook
- k Ch
Chpt 3.5)
January, ary, 13, 2010
Un Unin info form rmed ed Se Sear arch ch Computer ter Sc - - PowerPoint PPT Presentation
Un Unin info form rmed ed Se Sear arch ch Computer ter Sc Science ce cpsc3 c322 22, , Lectur ture e 5 (Te Textb xtbook ok Ch Chpt 3.5) January, ary, 13, 2010 CPSC 322, Lecture 5 Slide 1 Of Offi fice ce Hours rs
CPSC 322, Lecture 5 Slide 1
January, ary, 13, 2010
CPSC 322, Lecture 1 Slide 2
sepp ppe e Ca Carenini ( carenini@cs.ubc.ca; office CICSR 129)
Hammad ad Ali Ali hammada@cs.ubc.ca
tt He Helmer shelmer@cs.ubc.ca
et Singh sstatla@cs.ubc.ca
CPSC 322, Lecture 4 Slide 3
state is reached.
CPSC 322, Lecture 5 Slide 4
Input: a graph, a start node, Boolean procedure goal(n) that tests if n is a goal node. frontier := { g: g is a goal node }; while le frontier is not empty: selec lect and remov move path n0, n1, …, nk from frontier; if if goal(nk) return turn nk ; for ever ery neighbor n of nk add add n0, n1, …, nk to frontier; end d while
search strategy.
CPSC 322, Lecture 5 Slide 5
CPSC 322, Lecture 5 Slide 6
CPSC 322, Lecture 5 Slide 7
De Def. . (time me complexity) xity) The time complexity xity of a search algorithm is an expression for the wo worst-case case amount of time it will take to run,
um path length m and the maximum mum branchin hing g factor tor b. De Def. . (space ce comple lexity) xity) : The space comple lexity xity of a search algorithm is an expression for the wo worst-case case amount of memory that the algorithm will use (number of nodes),
and b.
CPSC 322, Lecture 5 Slide 8
CPSC 322, Lecture 5 Slide 9
explored.
CPSC 322, Lecture 5 Slide 10
Dept pth-first irst sear arch: ch: Illustrat trative ive Graph ph ---
irst Searc rch Front ntier ier
CPSC 322, Lecture 5 Slide 11
is complete for finite acyclic graphs.
and the maximum branching factor is b ?
tree.
goal.
every node in that path must maintain a fringe of size b.
CPSC 322, Lecture 5 Slide 12
Appropri
ate
robotics)
particularly for the case in which all paths lead to a solution
CPSC 322, Lecture 5 Slide 13
CPSC 322, Lecture 5 Slide 14
CPSC 322, Lecture 5 Slide 15
queue
CPSC 322, Lecture 5 Slide 16
CPSC 322, Lecture 5 Slide 17
arcs (why?)
tree.
difference to the worst case: search is unconstrained by the goal.
CPSC 322, Lecture 5 Slide 18
are
CPSC 322, Lecture 5 Slide 19
CPSC 322, Lecture 5 Slide 20
CPSC 322, Lecture 5 Slide 21
CPSC 322, Lecture 5 Slide 22