570 likes | 681 Views
Competitive fault tolerant Distance Oracles and Routing Schemes. Shiri Chechik Michael Langberg David Peleg Liam Roditty. Weizmann Open U Weizmann Bar Ilan. Formal framework. A network G A service S(G) Desired properties represented by requirement predicate P(S,G)
E N D
Competitive fault tolerant Distance Oracles and Routing Schemes Shiri Chechik Michael Langberg David Peleg Liam Roditty Weizmann Open U Weizmann Bar Ilan
Formal framework A network G A serviceS(G) Desired properties represented by requirement predicateP(S,G) cost(S) of constructing / maintaining S Optimization problem: Select cheapest service S satisfying P(S,G)
Example: Connectivity oracle • S = database maintained over graph G • Requirement predicate Pconn on S: • For every two vertices u,w in G: in response to a queryQconn(u,w), answer whether u and w are connected in G. • Costs: • cost1(S) = total / max memory for S • cost2(S) = query time of S
Connectivity oracles S1 . . . . . . w . . w . v . . v . . Centralized connectivity oracle for G The graph G u u 0 1
Connectivity oracles 1 3 2 Distributed connectivity oracle for G The graph G Assign each vertex v in connected component Gi a label L(v) = 〈v,i〉 〈u,1〉 0 〈w,3〉 〈v,3〉 On query Qconn(L(u),L(w)): check labels 1
Cost of distributed connectivity oracle Memory = O(log n) per vertex Query time = O(1)
Fault Tolerance Failure event: set F of failed vertices/edges Assumption: vertices / edges may occasionally fail or malfunction
Fault Tolerance As a result of a failure event: • G and S(G) are partially destroyed • Surviving network:G' = G \ F • Surviving service:S' = S \ F • Requirement predicatePmight no longer hold
Coping with failures in services Goal:Make S(G)competitive fault tolerant, i.e., ensure that the requirement predicate P(S’,G’) still holds subsequent to a failure event. Relaxed variant of problem:Construct service S(G) that can guarantee a weakened form of desired properties (i.e., some relaxed predicate P‘(S’,G’))
Rigid vs. competitive fault tolerance Rigid fault tolerance: Ensure that S(G) satisfies the requirement predicate w.r.t. theoriginal G, i.e., that P(S’,G) still holds after a failure event. ⇨ Useful for structures (subgraphs,…) Competitive fault tolerance: S(G) satisfies the requirement predicate w.r.t. thesurviving G’, i.e., P(S’,G’) must hold after a failure event. ⇨ Useful for services (oracles, routing,…)
Back to connectivity example Connectivity oracle: • receives query Qconn(s,t) for vertices s, t • answers whether s and t are connected Goal: Construct a competitivefault-tolerantconnectivity oracleS capable of withstanding f edge failures (|F|≤f) (a.k.a. f-sensitivity connectivity oracle)
Dynamic connectivity oracle[Patrascu-Thorup-07] Maintain a dynamic data structure Update after each edge deletion / failure Space O(|E(G)|) Query time O(f log2n loglogn) (following a batch of f edge deletions)
F-T connectivity oracles • receive a query Qconn(s,t,F) for vertices s,t, and failure event F⊆E (for |F|≤f) • answer whether s and t are connected in G’ = G \ F Note: Unlike dynamic connectivity oracles, in an F-T connectivity oracle, the faulty sets F for two consecutive queries could be very different.
F-T connectivity oracles Dynamic connectivity oracle: failures come one by one
F-T connectivity oracles t3 t1 t2 s1 s3 s2 F1 F2 F3 Q(s1,t1)? Q(s2,t2)? Q(s3,t3)? F-T connectivity oracle: failure events F1 , F2 , … are separate
F-T connectivity oracles Claim: The dynamic connectivity oracle of [PT-07] can be modified into F-T connectivity oracle against f edge failures.
F-T connectivity oracles Operation of the F-T connectivity oracle: Given query Qconn(s,t,F) (with vertices s,t and failure event F⊆E) : • Update the data structure, deleting all the edges of F • While updating, record the changes made • Answer the connectivity query Qconn(s,t) • Undo all changes to the data structure
F-T connectivity oracles Claim: The resulting F-T connectivity oracle has: • Space O(|E(G)|) • Query time O(f log2n loglogn)
F-T connectivity oracles The connectivity oracle of [CLPR-10] : Space O(fkn1+1/klog(nW)) Query time O(f log2n loglogn) (using the sparse spanner construction of [Chechik-Langberg-P-Roditty-10] )
Distance oracles (Approximate) Distance Oracle: Data-structure that can answer (approximate) distance queries Qdist(s,t) for any two vertices s, t (with a stretch of at most k)
Distance Oracles Thm[Thorup-Zwick-05]: For every weighted undirected graph G it is possible to construct a data structure of size O(n1+1/k) that is capable of answering distance queries Qdist(s,t) in O(k) time, with multiplicative approximation factor ≤2k-1 (returns a distance estimate đ such that dist(s,t,G) đ (2k-1)•dist(s,t,G) )
Distributed distance oracles – Distance labeling schemes[P-99] • Data structure stored in pieces at the graph vertices (as vertex labels) • To answer distance query Qdist(s,t), it suffices to consult the labels L(s), L(T)
Distributed distance oracles – Distance labeling schemes[P-99] Thm[P-99]: For every weighted undirected graph G it is possible to construct an approximate distance labeling scheme of size Õ(n1/k) capable of answering distance queries Qdist(s,t) with multiplicative approximation factor O(k)
F-T distance oracles F-T distance oracle: Data structure capable of answering distance queries Qdist(s,t,F) between vertex pairs s,t, on the surviving graph G\F, subsequent to a failure event F
F-T distance oracles Related work [Demetrescu et al-08]: It is possible to preprocess a weighted graph in time Õ(mn2)to produce a data structure of size O(n2logn) for answering 1-failure distance queries Qdist in O(1) time
F-T distance oracles Related work [Karger-Bernstein-09] improved preprocessing time for 1-failure queries, to O(n2 √m), then to Õ(mn), with same size and query time. [Duan-Pettie-09] oracle for 2-failure queries, of size O(n2log3n) and query time in O(log n)
F-T distance oracles Thm [CLPR-10] There exists a polynomial-time constructible data structure of size O(kn1+8(f+1)/(k+2(f+1))log(nW)), that given a set of edges Fof size |F|≤f and two vertices s,t, returns in time O(flog2nloglognloglogd) a distance estimate đ such that dist(s,t,G\F) đ (2k-1)•dist(s,t,G\F)
Bρ(v)= ρ-neighborhood of v = vertices at distance ρ or less from v Neighborhoods B0(v) B1(v) B2(v)
Tree covers Basic notion: A tree T covering theρ-neighborhoodof v v B2(v) coveringT
Tree Covers (2k-1) Ti O(kn1/k) v B(v) G = weighted undirected graph A tree coverTC(,k) : collection of trees {T1,…,Tl} such that For every v there exists a tree Tisuch that B(v) Ti For every Tiand every vTi, dist(v,ri,Ti) (2k-1) For every v, the number of trees that contain vis O(kn1/k).
Tree Covers Lemma [Awerbuch-Kutten-P-91, Cohen-93] A tree cover TC(,k)can be constructed in time Õ(mn1/k)
Connectivity Oracle (reminder) Lemma (F-T connectivity oracle [CLPR-10]) There exists a poly time constructible data structure of size O(fkn1+1/klog(nW)), that given a set of failed edges F of size fand two vertices s,t, replies in time O(f log2n loglogn) whether s and t are connected in G\F
f-Sensitivity Distance Oracles Construction The algorithm has log(nW) iterations Iteration ihandles distances ≤ 2i Gi = graph obtained by removing from Gall edges of weight > 2i
f-Sensitivity Distance Oracles Iterationi: Construct a tree cover TCiwith ρ=2i and k Gi|T = subgraph of Gi induced by T vertices For each TTCi, construct connectivity oracle Conn_OrTon Gi|T For each vertex v store pointer to tree Ti(v) TCicontaining Bρ(v)
f-Sensitivity Distance Oracles Lemma The size of the data structure is O(fkn1+1/klog(nW))
Answering Queries Qdist(s,t,F) • For i 1 to log(nW) if Conn_OrTi(s)(s,t,F) = true, then return đ=(8k-2)(f+1)2i-1 • Return
f-Sensitivity Distance Oracles Lemma Consider vertices s,t and failure set F. Let d=dist(s,t,G\F). The estimated distance đreturned by Qdist(s,t,F) satisfies d đ (8k-2)(f+1)d
f-Sensitivity Distance Oracles Lemma The f-sensitivity distance query (s,t,F) can be implemented to return a distance estimate in time O(flog2nloglogn loglogd)
2-sensitivity routing Main result [CLPR-10] 2-sensitive compact routing scheme: Given a message M at a source vertex s and a destination t, in the presence of failed edges F={e1,e2}, routes M from s to t over a path of length O(k⋅dist(s,t,G\{e1,e2}). Total information stored in vertices: O(kn1+1/klog(nW)logn).
T B(s) t 2-sensitivity routing Use hierarchy of tree covers as in distance oracle. To route from s to t, try increasingly higher levels Suppose dist(s,t,G) ≤ 2i There is a tree T TCi that contains B(s) for =2i ⇨Tcontains also the destination t
T B(s) t 2-sensitivity routing T is of depth ≤ (2k-1)⋅2i The route from s to t is at most k⋅2i+2 = O(k⋅ dist(s,t,G)) Only remaining problem: handle edge disconnections…
Tv(e) Tu(e) 2-sensitivity routing Each edge e=(u,v)T – if failed - disconnects T into two connected components, Tu(e) and Tv(e) v u Consider this tree T
rec(e) 2-sensitivity routing Tv(e) v u Tu(e) A recovery edge of e is any edge e’ of Gthat connects Tu(e) and Tv(e). Define for each edge eT a recovery edge rec(e).
2-sensitivity routing Slight simplification for analysis: Assume the graph edges are sorted - e1,…,em, and choose rec(e) for every e to be the first recovery edge ei of e
P(v,v’) P(u,u’) 2-sensitivity routing e Consider the recovery edge rec(e) = (u',v‘) of the edge e. Denote by P(u,u‘) (resp., P(v,v‘)) the path connecting u and u’ (resp., v and v’) in the tree Tu(e) (resp., Tv(e)) Denote the entire alternative path for e=(u,v) by P(e) = P(u,u‘) ∙ (u',v') ∙ P(v',v). rec(e)
2-sensitivity routing Failed edges:e1 = (u1,v1) and e2 = (u2,v2) Simplest case:e1 and e2are not in T : just route on T.
2-sensitivity routing ⇨ T ⋃ rec(e1) \ {e1,e2} is broken into two connected components only when rec(e1)=e2 To overcome this, it suffices to store, for each edge eT, one additional recovery edge. Still simple case:e1T , e2T.
2-sensitivity routing ⇨ rec(e1),rec(e2) suffice for routing from s to t • Hard case: both e1, e2T. • Subcase 1 (not too hard): e2 does not appear on the alternative path P(e1) via rec(e1) (and s,t are connected in Gi|T\{e1,e2}):
2-sensitivity routing ⇨rec(e1) = rec(e2) • Subcase 2 (hardest): both e1is on P(e2) and e2 is on P(e1).
2-sensitivity routing Store for e1 (similarly, for each edge eT) two additional recovery edges recu1(e1) and recv1(e1). Choose recu1(e1) to be the edge that “bypasses” as many edges on P(u1,u1‘) as possible.