220 likes | 364 Views
Oracles for Distances Avoiding a Link-failure. (U. Rome La Sapienza). C. Demetrescu. V. Ramachandran (U. Texas Austin). R.A.Chowdhury (U. Texas Austin). M. Thorup (AT&T Research). what is the distance x y in G avoiding edge (u,v) ?. Query(x,y,u,v):. x. u. v. y. x. u. v. y.
E N D
Oracles for Distances Avoiding a Link-failure (U. Rome La Sapienza) C. Demetrescu V. Ramachandran (U. Texas Austin) R.A.Chowdhury (U. Texas Austin) M. Thorup (AT&T Research)
what is the distance xy in G avoiding edge (u,v)? Query(x,y,u,v): x u v y x u v y The distance sensitivity problem Given a weighted directed graph G=(V,E,w),construct a data structure (oracle) that supports queries of the kind:
Related work Transitive Closure in Acyclic Digraphs - V. King, G. Sagert, STOC’99 Distances between fixed x,y avoiding an edge - J. Hershberger and S. Suri, FOCS 2001 Minimum Spanning Tree - E. Nardelli et al., Algorithmica 40(2), 2004
Motivating scenario Network where failures happen quite rarely
Dynamic Solution Time ~ O(n2) Router SP queries Updated routing table Oracle Solution Time Router SP queries Oracle Motivating scenario Network where failures happen quite rarely
d[x,y,0] x v y d[x,y,1] x u v y d[x,y,2] x u v y d[x,y,3] x u v y ... ... d[x,y,n-1] x u y Simple-minded oracle Keep a table of size O(n3) Query O(1) Using cubic space is prohibitive!
Space Query Preproc. ~ Oracle 1 O(mn2) O(n2 log n) O(1) ~ Oracle 2 O(n2.5) O(1) O(mn1.5) m = num. edges n = num. vertices Our results
sl[x,y,0] x y sl[x,y,1] x y sl[x,y,2] x y sl[x,y,3] x y ... ... sl[x,y,log n] x y 1 1 2 4 Oracle 1: data structure Keep four tables of size O(n2 log n): sl, sr, dl, dr
sr[x,y,0] x y sr[x,y,1] x y sr[x,y,2] x y sr[x,y,3] x y ... ... sr[x,y,log n] x y 4 2 1 1 Oracle 1: data structure Keep four tables of size O(n2 log n): sl, sr, dl, dr
Keep four tables of size O(n2 log n): sl, sr, dl, dr dl[x,y,0] x y dl[x,y,1] x y dl[x,y,2] x y dl[x,y,3] x y ... ... dl[x,y,log n] x y 1 1 2 4 8 Oracle 1: data structure
Oracle 1: data structure Keep four tables of size O(n2 log n): sl, sr, dl, dr dr[x,y,0] x y dr[x,y,1] x y dr[x,y,2] x y dr[x,y,3] x y ... ... dr[x,y,log n] x y 8 4 2 1 1
2i-1 dl[x,y,i] 1 u u u u v v v v x x x y y y y l r min 2j-1 d[x,l’]+sl[l’,y,j] 2 u v x y l’ l 2k-1 sr[x,r’,k]+d[r’,y] 3 u v x y r’ r Oracle 1: answering queries
√n Oracle 2: data structure Keep three tables of size O(n2.5): dl, dr, dc dl[x,y,0] x y dl[x,y,1] x y dl[x,y,2] x y dl[x,y,3] x y ... ... dl[x,y,√n] x y
√n Oracle 2: data structure Keep three tables of size O(n2.5): dl, dr, dc dr[x,y,0] x y dr[x,y,1] x y dr[x,y,2] x y dr[x,y,3] x y ... ... dr[x,y,√n] x y
Oracle 2: data structure Keep three tables of size O(n2.5): dl, dr, dc dc[x,y,0] x y dc[x,y,1] x y dc[x,y,2] x y ... ... dc[x,y,√n] x y <√n <√n <√n √n
<√n dc[x,y,...] 1 u v x y u v x y l r <√n d[x,l]+dl[l,y,...] 2 u v x y l <√n dr[x,r,...]+d[r,y] 3 u v x y r Oracle 2: answering queries
Computing distances avoiding sub-paths x Distances from x to every y excluding a band of edge-disjoint sub-paths can be computed in Õ(m) Band of edge-disjoint sub-paths y
Oracle 2: constructing table dl (and dr) x n bands from first levels y O(mn) per SP tree O(mn1.5) total
<n internal nodes with outdegree >1 remain All but <n leaves disappear Remove subtrees with <n nodes A combinatorial property on trees
<n bands obtained by cutting at nodes with degree >1 may be > n n bands obtained by cutting at regular intervals Red+Blue< 2n bands of edge-disjoint sub-paths and of height < n Oracle 2: constructing table dc O(mn1.5) total
Can we support multiple simultaneous failures? Conclusions We have shown that there exists a data structure of size O(n2 log n) that supports distance sensitivity queries in O(1) time We can deal with node failures within the same bounds Can we improve construction time?