Shortest path and Informed Search Brian C. williams 16410-13 October 27th. 2003 Slides adapted from 6.034 Tomas Lozano Perez, Winston, and Russell and Norvig AIMA Assignment R adin Shortest path Cormen leiserson rivest Introduction to Algorithms"Ch 25. 1-.2 d search and explorati AIMA Ch 4.1-2 Homework Online problem set #6 due monday November Brian Williams, Spring 03
Shortest Path and Informed Search Brian C. Williams 16.410 - 13 October 27th, 2003 Slides adapted from: 6.034 Tomas Lozano Perez, Winston, and Russell and Norvig AIMA Brian Williams, Spring 03 2 Assignment • “Introduction to Algorithms” Ch. 25.1-.2 AIMA Ch. 4.1-2 • 3rd . Reading: Cormen Leiserson & Rivest, Homework: Brian Williams, Spring 03 – Shortest path: – Informed search and exploration: – Online problem set #6 due Monday November 1
How do we maneuver ImagestakenfromNasa'Swebsitehttp://www.nasa.gov/ Roadmaps are an effective state space abstraction Brian Williams, Spring 0 Courtesy of U.S. Geological survey
Brian Williams, Spring 03 3 How do we maneuver? 4 Roadmaps are an effective state space abstraction Brian Williams, Spring 03 Courtesy of U.S. Geological survey. Images taken from NASA's website: http://www.nasa.gov/
Weighted Graphs and Path Lengths 2|3 6 Graph G=<VE> Weight function w:E→ Path Path weight (p)=∑w(v1,v1) Shortest path weight b(u, v)=min w(p): u-P v) else oo Outline Creating road maps for path p Exploring roadmaps Shortest paths Single soure Dijkstra; s algorithm med searc · Uniform cost search Greedy search · Beam search Hill climbing Avoiding adversaries lext Lecture) Brian Williams, Spring 03
6 5 u v 1 x y 2 10 5 7 9 2 3 4 6 s Weighted Graphs and Path Lengths Graph G = <V, E> Weight function w: E ĺ Path p = < vo, v1, … vk > Path weight w(p) = Ȉ w(vi-1,vi ) Shortest path weight į(u,v) = min {w(p) : u ĺp v } else Outline • planning • Shortest Paths – • – • • • • • • Creating road maps for path Exploring roadmaps: Single Source Dijkstra;s algorithm Informed search Uniform cost search Greedy search A* search Beam search Hill climbing Avoiding adversaries – (Next Lecture) Brian Williams, Spring 03 Brian Williams, Spring 03
Single Source Shortest Path 2|3 6 Problem: Compute shortest path to all vertices from source s Brian williams, Spning 03 Single Source Shortest Path 2|3 7 Problem: Compute shortest path to all vertices from source estimate d v] estimated shortest path length from s to ian williams, Spring 03
Single Source Shortest Path u v 1 10 9 2 3 4 6 s 7 5 2 x y Problem: Compute shortest path to all vertices from source s Brian Williams, Spring 03 7 Single Source Shortest Path u v 1 10 8 9 9 2 3 4 6 s 0 7 5 5 7 2 x y Problem: Compute shortest path to all vertices from source s • estimate d[v] estimated shortest path length from s to v Brian Williams, Spring 03 8
Single Source shortest Path 6 Problem: Compute shortest path to all vertices from source s estimate dv estimated shortest path length from s to v predecessor iv final edge of shortest path to v induces shortest path tree Brian williams, Spning 03 Properties of Shortest Path 7 Subpaths of shortest paths are shortest paths S→pv <s,x, u,v> <x.U. v> <Xu> ian williams, Spring 03 u→pv <u v>
8 9 Single Source Shortest Path u v 1 10 9 0 2 3 4 6 s 7 5 5 7 2 x y Problem: Compute shortest path to all vertices from source s • estimate d[v] estimated shortest path length from s to v • predecessor ʌ[v] final edge of shortest path to v • induces shortest path tree Brian Williams, Spring 03 9 Properties of Shortest Path u v 1 10 8 9 9 2 3 4 6 s 0 7 5 5 7 2 x y • Subpaths of shortest paths are shortest paths. • s ĺp v = <s, x, u, v> • s ĺp u = <s, x, u> • s ĺp x = <s, x> • x ĺp v = <x, u, v> •x ĺp v = <x, u> Brian Williams, Spring 03 10 • u ĺp v = <u, v>