15.08.2013 Views

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Sibiu<br />

253<br />

Greedy Search: Romania<br />

Arad<br />

366<br />

Fagaras<br />

176<br />

Arad<br />

366<br />

Timisoara<br />

329<br />

c○: Michael Kohlhase 474<br />

Sibiu<br />

253<br />

Greedy Search: Romania<br />

Arad<br />

366<br />

Sibiu<br />

253<br />

Fagaras<br />

176<br />

Oradea<br />

380<br />

R. Vilcea<br />

193<br />

Arad<br />

366<br />

Timisoara<br />

329<br />

c○: Michael Kohlhase 475<br />

Sibiu<br />

253<br />

Bucharest<br />

Oradea<br />

380<br />

Greedy search: Properties<br />

0<br />

R. Vilcea<br />

193<br />

Arad<br />

366<br />

Timisoara<br />

329<br />

c○: Michael Kohlhase 476<br />

Zerind<br />

374<br />

Zerind<br />

374<br />

Zerind<br />

Complete No: Can get stuck in loops<br />

Complete in finite space with repeated-state checking<br />

Time O(b m )<br />

Space O(b m )<br />

Optimal No<br />

Example 602 Greedy search can get stuck going from Iasi to Oradea:<br />

Iasi → Neamt → Iasi → Neamt → · · ·<br />

Worst-case time same as depth-first search,<br />

Worst-case space same as breadth-first<br />

But a good heuristic can give dramatic improvement<br />

c○: Michael Kohlhase 477<br />

Greedy Search is similar to UCS. Unlike the latter, the node evaluation function has nothing to<br />

do with the nodes explored so far. This can prevent nodes from being enumerated systematically<br />

254<br />

374

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!