L12 - 6.889 Lecture 12: Exact Distance Oracles (a.k.a....

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
6.889 — Lecture 12: Exact Distance Oracles (a.k.a. Shortest-Path Queries ) Christian Sommer csom@mit.edu (figures extracted from [ Dji96 , FR06 ]) October 24, 2011 Distance Oracle : given a graph G = ( V,E ) , preprocess it into a data structure such that we can compute shortest-path distances d G ( v,w ) ( distance queries ) efficiently (and output path if desired). two algorithms: one algorithm to preprocess the graph, one algorithm to query the data structure. Assumption (all of Lecture 12) planar G , non-negative edge lengths : E R + Lazy strategy run SSSP algorithm for every query d G ( v,w ) preprocessing time 0, space O ( n ) (store the graph), query time O ( n ) Eager strategy precompute APSP, complete distance matrix, one table lookup to answer query d G ( v,w ) preprocessing time and space O ( n 2 ) , query time O (1) Oracle something “between” SSSP and APSP? applications: route planning, traffic simulations, etc. main concern: preprocessing time (running time of the first algorithm), space consumption of the data struc- ture (size of the output of the first algorithm), and query time (running time of the second algorithm) — in particular, tradeoffs between these quantities Recall: MSSP data structure preprocessing time and space O ( n log n ) , query time O (log n ) (queries how- ever restricted to source on single face) r –division approach pieces of size O ( r ) with boundary O ( r ) per piece (total boundary O ( n/ r ) ) precompute APSP for all nodes on the boundary, space O ( n 2 /r ) ; at query time, explore piece of v (say P v ) and piece of w ( P w ) and find best connection pair ∂P v × ∂P w , piece sizes O ( r ) and O ( r ) 2 connection pairs, total query time O ( r ) smoothly interpolates between SSSP and APSP (only separators used, extends to minor-free graphs). can we do better? Connections between pieces O ( r ) 2 connection pairs in ∂P v × ∂P w , not independent! (assume boundary ∂P on O (1) cycles, r –division with O (1) holes per piece P ) 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Non-crossing property and bipartite Monge search Main idea store distance from v to all nodes in ∂P v with respect to G (not just P v ). space O ( n r ) . between boundary nodes, precompute distance in G \ ( P v P w ) . space O ( n 2 /r ) . at query time, divide and conquer for the best pair in ∂P v × ∂P w . FOR EACH boundary node y ∂P w , find the best boundary node x ∂P v , minimizing min x ∂P v d G ( v,x ) + d G \ ( P v P w ) ( x,y ) if query algo already found pairs ( x 1 ,y 2 ) , ( x 2 ,y 2 ) , the min for y is restricted to all x between x 1 and x 2 Figure 1: Non-crossing property also known as the Monge property: u 6 v x 6 y : d ( u,x ) + d ( v,y ) 6 d ( u,y ) + d ( v,x ) Figure 2: Non-crossing and Monge properties: d ( u,x ) + d ( v,y ) 6 d ( u,y ) + d ( v,x ) . Monge property is
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

L12 - 6.889 Lecture 12: Exact Distance Oracles (a.k.a....

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online