Bidirectional Dijkstra's algorithm • A ∗ search • ALT Algorithm • Definition of reach • Reach-based algorithm • Reach for A ∗ • Demo Reach for A∗ MIT
Previous PDF | Next PDF |
[PDF] 6006 Lecture 16: Dijkstra - MIT OpenCourseWare
Dijkstra's Algorithm Readings CLRS, Sections 24 2-24 3 Review d[v] is the length of the current shortest path from starting vertex s Through a process of
[PDF] 6006 Lecture 18: Speeding up Dijkstra - MIT OpenCourseWare
Algorithm terminates when some vertex w has been processed, i e , deleted from the queue of both searches, Qf and Qb Subtlety: After search terminates, find
[PDF] Dijkstra - csail
5 avr 2011 · Single source shortest path problem • Problem: Given a digraph G = (V, E) with non- negative edge-weight function w, and a node s, find
[PDF] Class on Design and Analysis of Algorithms, Lecture 11 Notes - MIT
We achieve a O(E + V lg V ) bound on Dijkstra's algorithm using Fibonacci heaps All-pairs shortest paths • given edge-weighted graph, G = (V, E,w)
[PDF] 6006 Lecture 15: Single-source shortest paths problem - MIT
Two algorithms: Dijkstra O(V lg V + E) assumes non-negative edge weights Bellman Ford O(V E) is a general algorithm Application • Find shortest path from
[PDF] 6006 Recitation 15 Notes 1: Shortest Paths - MIT OpenCourseWare
4 nov 2011 · Normally we'd be thinking Dijkstra; we have nonnegative edge weights and we only want a single-source shortest path Dijkstra's algorithm, as
[PDF] Lecture 16: Shortest Paths III - Dijkstra and Special Cases - courses
DIJKSTRA Demo Dijkstra's Algorithm For each edge (u, v) ϵ E, assume w(u, v) ≥ 0, maintain a set S of vertices whose final shortest path weights have been
[PDF] Reach for A : an Efficient Point-to-Point Shortest Path Algorithm
Bidirectional Dijkstra's algorithm • A ∗ search • ALT Algorithm • Definition of reach • Reach-based algorithm • Reach for A ∗ • Demo Reach for A∗ MIT
[PDF] Lecture 15: Shortest Paths I: Intro
Two algorithms: Dijkstra O(V lg V + E) assumes non-negative edge weights Bellman Ford O(V E) is a Find shortest path from CalTech to MIT – See “ CalTech
[PDF] Dijkstras Algorithm
analyze the performance of Dijkstra's algorithm using various data structures (i e set 18 math mit edu/~rothvoss/18 304 3PM/Presentations/1-Melissa pdf
[PDF] dijkstra algorithm ppt
[PDF] dijkstra algorithm pseudocode
[PDF] dijkstra algorithm python
[PDF] dijkstra algorithm runtime
[PDF] dijkstra algorithm space complexity
[PDF] dijkstra algorithm table
[PDF] dijkstra algorithm time and space complexity
[PDF] dijkstra algorithm time complexity
[PDF] dijkstra algorithm time complexity proof
[PDF] dijkstra algorithm visualization
[PDF] dijkstra pseudocode
[PDF] dijkstra's shortest path algorithm complexity
[PDF] dijkstra's shortest path algorithm explained
[PDF] dijkstra's shortest path algorithm time complexity
Reach for A?: an Efficient
Point-to-Point Shortest Path Algorithm
Andrew V. Goldberg
Microsoft Research - Silicon Valleywww.research.microsoft.com/≂goldberg/Joint with Haim Kaplan and Renato Werneck
Einstein Quote
Everything should be made as simple as possible, but not simplerReach for A?MIT 2/17/09 1Shortest Paths with Preprocessing
Variants
Nonnegative and arbitrary arc lengths.
Point to point, single source, all pairs.
Directed and undirected.
Here we study
Point to point, nonnegative length, directed problem.Allow preprocessing with limited (linear) space.Many applications, both directly and as a subroutine.Reach for A?MIT 2/17/09 2
Shortest Path Problem
Input:Directed graphG= (V,A), nonnegative length function ?:A→R+, origins?V, destinationt?V.Preprocessing:Limited space to store results.
Query:Find a shortest path fromstot.Interested in exact algorithms that search a (small) subgraph.Related work:reach-based routing
[Gutman 04] , hierarchi- cal decomposition [Schultz, Wagner & Weihe 02] ,[Sanders &Schultes 05, 06]
, geometric pruning [Wagner & Willhalm 03] , arc flags [Lauther 04] ,[K¨ohler, M¨ohring & Schilling 05] ,[M¨ohring et al. 06]Reach for A?MIT 2/17/09 3
Motivating Application
Driving directions
Run on servers and small devices.
Typical production codes≈5 years ago:
◦Use base graph or other heuristics based on road cate-gories; needs hand-tuning. ◦Runs (bidirectional) Dijkstra or A?with Euclidean bounds on "patched" graph. ◦Non-exact and no performance guarantee. We are interested in exact and very efficient algorithms.New results finding their way into products.This talk is not about modeling ... but exact algorithms help.Reach for A?MIT 2/17/09 4
Outline
Scanning method and Dijkstra"s algorithm.
Bidirectional Dijkstra"s algorithm.
A?search.
ALT Algorithm
Definition of reach
Reach-based algorithm
Reach for A?
Demo.
Reach for A?MIT 2/17/09 5
Scanning Method
For each vertexvmaintain its distance labelds(v) and statusS(v)? {unreached,labeled,scanned}.
Unreached
vertices haveds(v) =∞.Ifds(v) decreases,vbecomes
labeledTo
scan a labeled vertexv, for each arc (v,w), ifds(w)> ds(v) +?(v,w) setds(w) =ds(v) +?(v,w).Initially for all vertices are unreached.
Start by decreasingds(s) to 0.
While there are labeled vertices, pick one and scan it. Different selection rules lead to different algorithms.Reach for A?MIT 2/17/09 6
Dijkstra"s Algorithm
[Dijkstra 1959] ,[Dantzig 1963] At each step scan a labeled vertex with the minimum label.Stop whentis selected for scanning.Work almost linear in the visited subgraph size.Reverse Algorithm:Run algorithm fromtin the graph with all
arcs reversed, stop whentis selected for scanning.Bidirectional Algorithm
Run forward Dijkstra fromsand backward fromt.
Maintainμ, the length of the shortest path seen: when scan- ning an arc (v,w) such thatwhas been scanned in the other direction, check if the correspondings-tpath improvesμ. Stop when about to scan a vertexxscanned in the other direction. Outputμand the corresponding path.Reach for A?MIT 2/17/09 7Bidirectional Algorithm: Pitfalls
The algorithm is not as simple as it looks.
5 x2 2 s tba5 5 The searches meat atx, butxis not on the shortest path.Reach for A?MIT 2/17/09 8Example Graph
1.6M vertices, 3.8M arcs, travel time metric.
Reach for A?MIT 2/17/09 9
Dijkstra"s Algorithm
Searched area
Reach for A?MIT 2/17/09 10
Bidirectional Algorithm
forward search reverse searchReach for A?MIT 2/17/09 11
A?Search
[Doran 67] ,[Hart, Nilsson & Raphael 68]Similar to Dijkstra"s algorithm but:
Domain-specific estimatesπt(v) on dist(v,t) ( potentials At each step pick a labeled vertex with the minimumk(v) = d s(v) +πt(v).Best estimate of path length.
In general, optimality is not guaranteed.
Reach for A?MIT 2/17/09 12
Feasibility and Optimality
Potential transformation:Replace?(v,w) by?πt(v,w) =?(v,w)-πt(v) +πt(w) (reduced costs).Fact:Problems defined by?and?πtare equivalent.
Definition:πtisfeasibleif?(v,w)?A, the reduced costs are nonnegative. (Estimates are "locally consistent".) Optimality:Ifπtis feasible, the A?search is equivalent to Dijk- stra"s algorithm on transformed network, which has nonnegative arc lengths. A?search finds an optimal path.Different order of vertex scans, different subgraph searched.Fact:Ifπtis feasible andπt(t) = 0, thenπtgives
lower bounds on distances tot.Reach for A?MIT 2/17/09 13Computing Lower Bounds
Euclidean bounds:[folklore]
,[Pohl 71] ,[Sedgewick & Vitter 86] For graph embedded in a metric space, use Euclidean distance. Limited applicability, not very good for driving directions.We use triangle inequality v wa b dist(v,w)≥dist(v,b)-dist(w,b); dist(v,w)≥dist(a,w)-dist(a,v).Reach for A?MIT 2/17/09 14Lower Bounds (cont.)
Maximum (minimum, average) of feasible potentials is feasible.Select landmarks (a small number). For all vertices, precompute distances to and from each land- mark. For eachs,t, use max of the corresponding lower bounds for t(v).Why this works well(when it does)
s ta x y ?πt(x,y) = 0Reach for A?MIT 2/17/09 15
Bidirectional Lowerbounding
Forward reduced costs:?πt(v,w) =?(v,w)-πt(v) +πt(w).Reverse reduced costs:?πs(v,w) =?(v,w) +πs(v)-πs(w).What"s the problem?Reach for A?MIT 2/17/09 16