Presentation is loading. Please wait.

Presentation is loading. Please wait.

Data Structures for Emergency Planning Cyril Gavoille (LaBRI, University of Bordeaux) 8 th FoIKS Bordeaux – March 3, 2014.

Similar presentations


Presentation on theme: "Data Structures for Emergency Planning Cyril Gavoille (LaBRI, University of Bordeaux) 8 th FoIKS Bordeaux – March 3, 2014."— Presentation transcript:

1 Data Structures for Emergency Planning Cyril Gavoille (LaBRI, University of Bordeaux) 8 th FoIKS Bordeaux – March 3, 2014

2 1. Context 2. Distance in Graphs 3. Routing and Distributed Setting 4. Focus on Connectivity 5. Focus on Distance Labelling 6. Conclusion Agenda

3 Context Connectivity, distance computation or navigation in road networks (=graphs)

4 Connectivity Query: Is there a path connecting u to v? It takes linear time to answer the query. It takes O(1) time if linear time pre-processing of the graph is done with a labelling of the components of G.

5 Assume there is a failure x (node or edge) due to: flooding, earthquake, damage, attack … How to find efficiently the connected component of any node u in G\{x}? ➟ Update all the component labels with a linear time traversal of G\{x}, and then answer in O(1) for each query node u.

6 Main issue: G is extremely large, and even linear time is too much in case of emergency! We would like the answer immediately. If we pre-process G accordingly, can we then quickly answer queries “is there a path from u to v in G\{x}”?

7 Yes we can! Pre-process G in a more clever way. Identify cut- vertices, the component-tree and design an efficient NCA data structure (all take linear time). u,v are not connected in G\{x} iff x is a cut-vertex on the path from c(u) to c(v) in the component-tree.

8 Rem: in case of flooding, this looks like … What about if we ask, say, for two failures x 1,x 2 ? ➟ Still feasible in constant time with a more complex data structure based on cactus graphs.

9 And for any failure set X? Can we prevent emergency in order to answer connectivity query in G\X in time O(|X|) or Õ(|X|)? ➟ No efficient solution is known if more than TWO nodes can fail. Best solution requires query time O(|X|. √n) using fully-dynamic data structures [Eppstein et al. - J. ACM’98] ➟ Solution if X contains only edges with query time O(|X|. log 2 n. loglogn) [Patrascu,Thorup - FOCS’07]

10 General Setting (for emergency planning) Pre-process a graph G st., for any failure set X, one can pre-process X in time Õ(f(|X|)) st. queries on nodes u,v,… of G\X can be answered as fast as possible. ➟ This differs from a dynamic data structure by the fact that during the query pre-processing of X, the initial data structure for G is NOT updated.

11 General Setting (for emergency planning) We can convert these “semi-dynamic” into fully- dynamic data structures with sub-linear amortized update time in a lazy manner: - If |X| is small, solve (u,v,X) (history of events) - If |X| is large, reset X and the data structure for G\X ➟ Adding edges (or nodes then edges) is much more easy...

12 1. Context 2. Distance in Graphs 3. Routing and the Distributed Setting 4. Focus on Connectivity 5. Focus on Distance Labelling 6. Conclusion Agenda

13 Distance in Graphs Goal: Answer d G\X (u,v) given (u,v,X) for G (a weighted undirected graph) (a weighted undirected graph) Matrix distance requires space O(n 2 ) and constant query time (|X|=0). ➟ Space Õ(n 2 ) for |X|≤2 (nodes or edges) and O(logn) query time. [Demetrescu et al. - SIAM J. Computing’08] [Duan,Pettie - SODA’09]

14 Space Lower Bound? Õ(n max{|X|,2} ) or Õ(n f(|X|) )? Intuition is that to solve efficiently queries of length Intuition is that to solve efficiently queries of length |X|+2, at least f(|X|) more space is required compared to the failure-free solution (|X|=0). d G (u) ➟ n d G (u,v) ➟ n 2 d G (u,v,w) ➟ n 3 (?) Õ(n 2 ) for every |X|? Associate with failure x some information of size O(n) telling to all other nodes short-cuts to avoid x in G. This is Õ(n 2 ) overall all (indep. of |X|). Construct a route from u to v by combining the |X| short-cuts. Associate with failure x some information of size O(n) telling to all other nodes short-cuts to avoid x in G. This is Õ(n 2 ) overall all (indep. of |X|). Construct a route from u to v by combining the |X| short-cuts. ➟ Theoretical Information argument cannot prove any lower bound larger than (n 2 ). Space Õ(n 2 ) for |X|≤2 (nodes or edges) and O(logn) query time. [Demetrescu et al., SIAM J. Comp.’08][Duan-Pettie, SODA’09] ¬

15 1. Context 2. Distance in Graphs 3. Routing and Distributed Setting 4. Focus on Connectivity 5. Focus on Distance Labelling 6. Conclusion Agenda

16 Routing query: next-hop to go from u to v? u v Routing and Distributed Setting - pre-processing to compute routing information - a node stores only routing information involving itself  distributed data-structure

17 Forbidden-Set Routing Design a routing scheme for G st. for every subset X of “ forbidden ” nodes (crashes, malicious faults, routing policies, …) st. routing tables can forward messages in G\X efficiently provided X. @(v) router: u L(x 1 ) … L(x k ) next-hop to v in G\{x 1 …x k }

18 A Distributed Data Structure Get the labels of nodes involved in the query Get the labels of nodes involved in the query Compute/decode the answer from the labels Compute/decode the answer from the labels No other source of information is required No other source of information is required

19 Some Results for F.-S. Routing [Courcelle,Twigg – STACS’07] Clique-width cw: O(cw 2 log 2 n) bit labels and routing tables for shortest path routing. Extended to every predicate expressed in MSO-logic. [Abraham,Chechik,G.,Peleg – PODC’10] Doubling dimension-: O(1+   2 log 2 n bit labels and routing tables for stretch 1+ routing. [Abraham,Chechik,G. – STOC’12] Planar: O(  log 3 n) bit routing tables and O(  log 5 n) bit labels for stretch 1+routing. Every radius-2r ball can be covered by Every radius-2r ball can be covered by  2  radius-r balls  2  radius-r balls Include bounded growing graphs Include bounded growing graphs Euclidean graphs have  =O(1) Euclidean graphs have  =O(1)

20 1. Context 2. Distance in Graphs 3. Routing and Distributed Setting 4. Focus on Connectivity 5. Focus on Distance Labelling 6. Conclusion Agenda

21 (1) [Courcelle,G.,Kanté,Twigg – TGGT’08] (2) [Borradaile,Pettie,Wulff-Nilsen – SWAT’12] Pre-processing time: O(n) Query pre-processing time: O(|X|log|X|) (2) Space: O(n) & Q. Time: O(loglogn) (1) Space: O(logn) bit labels & Q. time: O(√logn) (2) can be generalized to H-minor free graphs Focus on Connectivity (in planar graphs)

22 [Here X subset of edges only... much more tricky otherwise] Main Idea (1) Query = P LANAR P OINT L OCATION in O(√logn) time (polynomial coordinates) Note: space does NOT depend on |X|.

23 Find G\X (u)? (find some identifier of the component of u in G\X) 1. Find the closest failure x ancestor of u 2. Next-hop when routing from x to u in the tree A Simple Solution for Trees u

24 Label(z):=<[a(z),b(z)],@(z)> [a(z),b(z)]=first/last visit time in Euler tour @(z)=routing label for routing to/from z x 0 :[1,72] x 1 :[3,46] x 2 :[29,43] x 3 :[60,66]

25 Find G\X (u):=(x,route(@(x),@(u))) x=A[p] (closest ancestor failure) x=A[p] (closest ancestor failure) p=P RED S (a(u))=max{s ∈ S:s≤a(u)} (predecessor) p=P RED S (a(u))=max{s ∈ S:s≤a(u)} (predecessor) S=[1 [3 [29 43] 46] [60 66] 72] A= x 0 x 1 x 2 x 1 x 0 x 3 x 2 - x 0 :[1,72] x 1 :[3,46] x 2 :[29,43] x 3 :[60,66] ➟ Space: O(logn) bit labels Query pre-processing: O(S ORT (|X|,n)) Query pre-processing: O(S ORT (|X|,n)) Query time: O(loglogn) Query time: O(loglogn) a(u)=23

26 Query Time Lower Bound Why  (loglogn) is required? [Patrascu,Thorup – STOC’06] Any data structure with space Õ(|X|) and supporting P RED X queries requires query time (loglogn) provided |X| ∈ [n ,n 1- ]. Given X and Find Path\X we construct an associative table Tab[Find Path\X (x i +1)]=x i in time O(|X|log|X|). Path ➟ P RED X (u)=Tab[Find Path\X (u)] ➟ Query-time(P RED X ) ≤ Query-time(Find Path\X )+O(1) 1 2 … x 1 x 2 … x k n

27 1. Context 2. Distance in Graphs 3. Routing and Distributed Setting 4. Focus on Connectivity 5. Focus on Distance Labelling 6. Conclusion Agenda

28 Focus on Distance Labelling Query: (1+approximate distance (u,v) in G\{x 1 …x k } given the labels of L(u),L(v),L(x 1 ),…,L(x k ) given the labels of L(u),L(v),L(x 1 ),…,L(x k ) [Abraham,Chechik,G. – STOC’12] For Planar graphs: 1. Pre-processing: Õ(n) 2. Space: O(  log 5 n) bit labels 3. Query time: O(|X|  log 5 n) query time Note: same bounds as for |X|=0 (up to Õ(1) factors)

29 How does it work? Query: (u,v) in G\{x 1 …x k } given L(u),L(v),L(x 1 ),…,L(x k ) 1. From the labels of the query, construct a sketch graph H 2. Run Dijkstra from u to v in H that has size Õ (k) u

30 How does it work? Query: (u,v) in G\{x 1 …x k } given L(u),L(v),L(x 1 ),…,L(x k ) 1. From the labels of the query, construct a sketch graph H 2. Run Dijkstra from u to v in H that has size Õ (k) u v

31 How does it work? Query: (u,v) in G\{x 1 …x k } given L(u),L(v),L(x 1 ),…,L(x k ) 1. From the labels of the query, construct a sketch graph H 2. Run Dijkstra from u to v in H that has size Õ (k) u

32 How does it work? Query: (u,v) in G\{x 1 …x k } given L(u),L(v),L(x 1 ),…,L(x k ) 1. From the labels of the query, construct a sketch graph H 2. Run Dijkstra from u to v in H that has size Õ (k) u v

33 How does it work? Query: (u,v) in G\{x 1 …x k } given L(u),L(v),L(x 1 ),…,L(x k ) 1. From the labels of the query, construct a sketch graph H 2. Run Dijkstra from u to v in H that has size Õ (k) u v

34 How does it work? Query: (u,v) in G\{x 1 …x k } given L(u),L(v),L(x 1 ),…,L(x k ) 1. From the labels of the query, construct a sketch graph H 2. Run Dijkstra from u to v in H that has size Õ (k) u v

35 How does it work? Query: (u,v) in G\{x 1 …x k } given L(u),L(v),L(x 1 ),…,L(x k ) 1. From the labels of the query, construct a sketch graph H 2. Run Dijkstra from u to v in H that has size Õ (k) u v

36 How does it work? Query: (u,v) in G\{x 1 …x k } given L(u),L(v),L(x 1 ),…,L(x k ) 1. From the labels of the query, construct a sketch graph H 2. Run Dijkstra from u to v in H that has size Õ (k) u v

37 How does it work? Query: (u,v) in G\{x 1 …x k } given L(u),L(v),L(x 1 ),…,L(x k ) 1. From the labels of the query, construct a sketch graph H 2. Run Dijkstra from u to v in H that has size Õ (k) u v

38 How does it work? Query: (u,v) in G\{x 1 …x k } given L(u),L(v),L(x 1 ),…,L(x k ) 1. From the labels of the query, construct a sketch graph H 2. Run Dijkstra from u to v in H that has size Õ (k) u v

39 How does it work? Query: (u,v) in G\{x 1 …x k } given L(u),L(v),L(x 1 ),…,L(x k ) 1. From the labels of the query, construct a sketch graph H 2. Run Dijkstra from u to v in H that has size Õ (k) u v

40 1. Context 2. Distance in Graphs 3. Routing and Distributed Setting 4. Focus on Connectivity 5. Focus on Distance Labelling 6. Conclusion Agenda

41 Conclusion Two fundamental questions: 1. Improve the O(√n) update time bound for worst- case dynamic connectivity in general graphs. Note: Amortized randomized polylog(n) time solutions do exist but work only if we start from the empty network! Useless for emergency planning setting for which worst-case garantee on large network is the goal. 2. Prove or disprove that we can design in the emergency planning setting a distance oracle for general graphs of space Õ(n 2 ) and query time Õ(logn), for every failure set.


Download ppt "Data Structures for Emergency Planning Cyril Gavoille (LaBRI, University of Bordeaux) 8 th FoIKS Bordeaux – March 3, 2014."

Similar presentations


Ads by Google