Approxmate All-Pars shortest paths Approxmate dstance oracles Spanners and Emulators Ur Zwck Tel Avv Unversty Summer School on Shortest Paths (PATH05 DIKU, Unversty of Copenhagen All-Pars Shortest Paths Input: A weghted drected graph G=(V,E, where E =m and V =n. Output: An nn dstance matrx. Approxmate Shortest Paths Let be the dstance from u to v. Multplcatve error Addtve error An estmated dstance (u,v s of stretch t ff t An estmated dstance (u,v s of surplus t ff t Surplus 0 (k- (k- All-Pars Almost Shortest Paths unweghted, undrected graphs Tme mn n 5/ n 3/ m / n 7/3 n -/k m /k n +/(3k-4 Authors folklore Angworth-Chekur- Indyk-Motwan 96 Dor-Halpern-Zwck 96 The surplus- algorthm The surplus- algorthm v v For each non-selected vertex v, run an SSSP algorthm on the subgraph Select each For composed vertex each vertex ndependently of the adjacent selected wth to edges, a probablty selected augmented vertex, p=(n/m by new / select an edge connectng t to a selected vertex. Run a SSSP edges algorthm connectng from v to each all the selected selected vertex. vertces. For The each length vertex of each non-adjacent new edge to s a the selected dstance vertex, between the endponts select all n ts the edges. orgnal graph. Select each vertex ndependently wth probablty p=(n/m / Run a SSSP algorthm from each selected vertex.
The surplus- algorthm v The surplus- algorthm v For each vertex adjacent to a selected vertex, select an edge connectng t to a selected vertex. For each vertex non-adjacent to a selected vertex, select all ts edges. For each non-selected vertex v, run an SSSP algorthm on the subgraph composed of the selected edges, augmented by new edges connectng v to all the selected vertces. The length of each new edge s the dstance between the endponts n the orgnal graph. The Surplus- algorthm Correctness Case Case : All vertces on a shortest path from u to v do not have selected neghbors. The Surplus- algorthm Correctness Case Case : At least one vertex on a shortest path from u to v has a selected neghbor. All the edges on the path are selected. We fnd a shortest path from u to v. Consder the last vertex wth a selected neghbor. We fnd a path from u to v of surplus at most The Surplus- algorthm - Analyss HIGH degree vertex low degree vertex Wth hgh probablty at least one neghbor s selected Takng all adjacent edges s relatvely cheap The expected number of the edges selected s O((mn / The expected runnng tme s therefore O(n(mn / =O(n 3/ m / Surplus 0 (k- (k- All-Pars Almost Shortest Paths unweghted, undrected graphs Tme mn n 5/ n 3/ m / n 7/3 n -/k m /k n +/(3k-4 Authors folklore Angworth-Chekur- Indyk-Motwan 96 Dor-Halpern-Zwck 96
All-Pars Almost Shortest Paths weghted undrected graphs Spanners Stretch 7/3 3 Tme mn n 3/ m / Reference Djkstra + FT Cohen-Zwck 97 n 7/3 n Some log factors gnores Gven an arbtrary dense graph, can we always fnd a relatvely sparse subgraph that approxmates all dstances farly well? Spanners!" # $! %& $$%'$! %&&& &%( " (!$ *'+'$!%&$,- ++.* " #//0 3 %$ $!$ %$ 3 $ 44(43 " 5 67 8 9 67 8 $,'$ '%&&$$$44(%!3 4" #$$3!$ ++.* $%& * $ %: (;$ %$" Exstence Proof / Constructon Algorthm [Althöfer, Das, Dobkn, Joseph, Soares 93] Consder the edges of the graph n non-decreasng order of weght. Add each edge to the spanner f t does not close a cycle of sze at most k. The resultng graph s a (k--spanner. The resultng graph does not contan a cycle of sze at most k. Hence the number of edges n t s at most n +/k. Approxmate Dstance Oracles (TZ 0 <&= ( 4=* 3 %" >! Stretch-Space tradeoff s essentally optmal!!"# $
Approxmate Dstance Oracles [TZ 0] A herarchy of centers Bunches %!*" *!*" % &' '! $ ($ "' B( v { w A A ( w, v ( A, v} Lemma: E[ B(v ] kn /k Proof: B(vA s stochastcally domnated by a geometrc random varable wth parameter p=n -/k + The data structure Keep for every vertex vv: The centers p (v, p (v,, p k- (v A hash table holdng B(v For every wv, we can check, n constant tme, whether wb(v, and f so, what s (v,w. Query answerng algorthm $ * 6 45?+! @ Query answerng algorthm, - -!*" -,!",!*" *
Analyss Where are the spanners?!(," ( *!*(, " (!(,"!,(*"! "!$",!", $ $!*" $! " *! $" Defne clusters, the dual of bunches. For every, put n the spanner a tree of shortest paths from to all the vertces n the cluster of., %. w B( v v C( w C( w { v V ( w, v ( A, v}, f w A A C( w { v V ( w, v ( A, v}, w A A B( v { w A A ( w, v ( A, v } Addtve Spanners!" # $! %& $$% '$!&&& &%( " (!$ '$!%&$,-. " #A<B C /D 9C (!$ C'$!%&$,- 7. " 5EB 67 B :%%!!%43 /%44!$ $!$ %4(- + $&%( F6G Spanners wth sublnear surplus %(*F+(! % $$$! - ++.* $$ &%(& - +'+.*'+ " - +'+.*'+ Extends and smplfes a result of Elkn and Peleg (00
All sorts of spanners #$! %& $$%& %4 &'$!&&& & &%( " $, ++.*. 7. + ++.* & *'+ C + - +' +.*'+ & #//0 #A<BC /D 9C 5EB67 6+ 896H The constructon of the approxmate dstance oracles, when appled to unweghted graphs, produces spanners wth sublnear surplus! We present a slghtly modfed constructon wth a slghtly smpler analyss. p (v Balls v % The orgnal constructon Select a herarchy of centers # 6 # + I# *'+. For every, add to the spanner a shortest paths tree of A4$" p (v Ball( u { vv ( u, v ( u, A }, u A A Ball[ u] Ball( u { p ( u}, u A A The modfed constructon Select a herarchy of centers # 6 # + I# *'+. For every, add to the spanner a shortest paths tree of 544" Spanners wth sublnear surplus Select a herarchy of centers # 6 # + I# *'+. For every, add to the spanner a shortest paths tree of 544" Let The path-fndng strategy Suppose we are at # and want to go to *. be an nteger parameter. If the frst J ' '+ edges of a shortest path from to are n the spanner, then use them. Otherwse, head for the +-center + nearest to. The dstance to s at most. (As /.!". / / *
The path-fndng strategy We ether reach, or at least make J ' '+ steps n the rght drecton. Or, make at most J ' '+ steps, possbly n a wrong drecton, but reach a center of level +. If *'+, we wll be able to reach " $ 0 $ $ The path-fndng strategy 0 $0 $ After at most K steps: ether we reach or dstance to decreased by K -K '+ / * % % * The path-fndng strategy ether we reach or dstance to decreased by K -K '+ After at most K steps: Surplus K '+ Stretch The surplus s ncurred only once! '( u, v ( ( u, v k Sublnear surplus '( u, v ( ( u, v k /( ( u, v d, d k k '( u, v d O( d