57
Competitive fault Competitive fault tolerant Distance tolerant Distance Oracles and Routing Oracles and Routing Schemes Schemes Weizmann Weizmann Open U Open U Weizmann Weizmann Bar Ilan Bar Ilan Shiri Chechik Shiri Chechik Michael Michael Langberg Langberg David Peleg David Peleg Liam Roditty Liam Roditty

Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

Embed Size (px)

Citation preview

Page 1: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

Competitive fault Competitive fault tolerant Distance tolerant Distance

Oracles and Routing Oracles and Routing SchemesSchemes

WeizmaWeizmannnnOpen UOpen UWeizmaWeizmannnnBar IlanBar Ilan

Shiri Chechik Shiri Chechik Michael Michael Langberg Langberg David Peleg David Peleg Liam Roditty Liam Roditty

Page 2: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

Formal framework

A network GA service S(G) Desired properties represented by

requirement predicate P(S,G)cost(S) of constructing / maintaining S

Optimization problem: Select cheapest service S satisfying P(S,G)

Page 3: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

Example: Connectivity oracleS = database maintained over graph G Requirement predicate Pconn on S:

For every two vertices u,w in G: in response to a query Qconn(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

Page 4: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

Connectivity oracles

The graph G Centralized connectivity oracle for G

u

u 0w

v

w

v 1

S1

.

.

.

.

.

. . . . . .

.

.

Page 5: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

Connectivity oracles

The graph G Distributed connectivity oracle for G

⟨w,3⟩

1

23

⟨u,1⟩

⟨v,3⟩

Assign each vertex v in connected component Gi a label L(v) = v,i⟨ ⟩

On query Qconn(L(u),L(w)): check labels

0

1

Page 6: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

Cost of distributed connectivity oracle

Memory = O(log n) per vertex

Query time = O(1)

Page 7: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

Fault Tolerance

Assumption: vertices / edges may occasionally fail or malfunction

Failure event: set F of failed vertices/edges

Page 8: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

Fault Tolerance

As a result of a failure event: G and S(G) are partially destroyed Surviving network: G' = G \ FSurviving service: S' = S \ FRequirement predicate P might

no longer hold

Page 9: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

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’))

Page 10: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

Rigid vs. competitive fault toleranceRigid fault tolerance: Ensure that S(G) satisfies the requirement predicate w.r.t. the original G, i.e., that P(S’,G) still holds after a failure event.

Competitive fault tolerance: S(G) satisfies the requirement predicate w.r.t. the surviving G’, i.e., P(S’,G’) must hold after a failure event.

⇨ Useful for structures (subgraphs,…)

⇨ Useful for services (oracles, routing,…)

Page 11: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

Back to connectivity example

Goal: Construct a competitive fault-tolerant connectivity oracle S capable of withstanding f edge failures (|F|≤f)(a.k.a. f-sensitivity connectivity oracle)

Connectivity oracle:receives query Qconn(s,t) for vertices s, tanswers whether s and t are connected

Page 12: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

Dynamic connectivity oracle[Patrascu-Thorup-07]

Maintain a dynamic data structureUpdate after each edge deletion / failure

Space O(|E(G)|)Query time O(f log2n loglogn)

(following a batch of f edge deletions)

Page 13: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

F-T connectivity oracles

Note: Unlike dynamic connectivity oracles, in an F-T connectivity oracle, the faulty sets F for two consecutive queries could be very different.

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

Page 14: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

F-T connectivity oracles

Dynamic connectivity oracle: failures come one by one

Page 15: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

F-T connectivity oracles

F-T connectivity oracle: failure events F1 , F2 , … are separate

F1F2F3 Q(s1,t1)?

s3

t3 t1

s1

t2

s2

Q(s2,t2)?Q(s3,t3)?

Page 16: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

F-T connectivity oracles

Claim: The dynamic connectivity oracle of [PT-07] can be modified into F-T connectivity oracle against f edge failures.

Page 17: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

F-T connectivity oracles

Given query Qconn(s,t,F)

(with vertices s,t and failure event F⊆E) :Update the data structure, deleting all the edges of FWhile updating, record the changes madeAnswer the connectivity query Qconn(s,t) Undo all changes to the data structure

Operation of the F-T connectivity oracle:

Page 18: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

F-T connectivity oracles

Claim: The resulting F-T connectivity oracle has:

Space O(|E(G)|)Query time O(f log2n loglogn)

Page 19: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

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] )

Page 20: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

(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

Page 21: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

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) )

Page 22: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

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)

Page 23: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

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)

Page 24: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

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

Page 25: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

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

Page 26: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

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

Page 27: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

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 F of 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)

F-T distance oracles

Page 28: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

Neighborhoods

Bρ(v) = ρ-neighborhood of v = vertices at distance ρ or less from v

B0(v)

B1(v)

B2(v)

Page 29: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

Tree covers

Basic notion:A tree T covering the ρ-neighborhood of v

vB2(v)

covering T

Page 30: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

G = weighted undirected graphA tree cover TC(,k) : collection of trees {T1,…,Tl} such that

1. For every v there exists a tree Ti such that B(v) Ti

2. For every Ti and every vTi, dist(v,ri,Ti) (2k-1)

3. For every v, the number of trees that contain v is O(kn1/k).

Tree Covers

Ti

B(v)

(2k-1)

vO(kn1/k)

Page 31: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

Lemma [Awerbuch-Kutten-P-91, Cohen-93]

A tree cover TC(,k) can be constructed in time Õ(mn1/k)

Tree Covers

Page 32: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

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 f and two vertices s,t, replies in timeO(f log2n loglogn) whether s and t areconnected in G\F

Connectivity Oracle (reminder)

Page 33: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

ConstructionThe algorithm has log(nW) iterationsIteration i handles distances ≤ 2i

Gi = graph obtained by removing from G all edges of weight > 2i

f-Sensitivity Distance Oracles

Page 34: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

Iteration i:Construct a tree cover TCi with ρ=2i and

kGi|T = subgraph of Gi induced by T

vertices For each TTCi , construct connectivity oracle Conn_OrT on Gi|T

For each vertex v store pointer to tree Ti(v) TCi containing Bρ(v)

f-Sensitivity Distance Oracles

Page 35: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

LemmaThe size of the data structure is

O(fkn1+1/klog(nW))

f-Sensitivity Distance Oracles

Page 36: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

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

Answering Queries

Page 37: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

LemmaConsider 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

Page 38: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

LemmaThe f-sensitivity distance query (s,t,F) can be implemented to return a distance estimate in time O(flog2nloglogn loglogd)

f-Sensitivity Distance Oracles

Page 39: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

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).

2-sensitivity routing

Page 40: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

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

⇨ T contains also the destination t

2-sensitivity routing

T

B(s)t

Page 41: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

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…

2-sensitivity routing

T

B(s)t

Page 42: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

Consider this tree T

u

v

2-sensitivity routing

Each edge e=(u,v)T – if failed -

Tu(e)

Tv(e)

disconnects T into two connected components,Tu(e) and Tv(e)

Page 43: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

A recovery edge of e is any edge e’ of G that connects Tu(e) and Tv(e).

Define for each edge eT a recovery edge rec(e).

u

v

rec(e)

2-sensitivity routing

Tu(e)

Tv(e)

Page 44: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

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

2-sensitivity routing

Page 45: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

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)

P(u,u’)

P(v,v’) e

2-sensitivity routing

Page 46: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

Failed edges: e1 = (u1,v1) and e2 = (u2,v2)

Simplest case: e1 and e2 are not in T :

just route on T.

2-sensitivity routing

Page 47: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

Still simple case: e1T , e2T.

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.

Page 48: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

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)

suffice for routing from s to t

Page 49: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

Subcase 2 (hardest): both e1 is on P(e2) and e2 is on P(e1).

2-sensitivity routing

⇨ rec(e1) = rec(e2)

Page 50: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

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.

2-sensitivity routing

Page 51: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

Specifically: Consider the path P’ from u1 to any other

recovery edge e’ ≠ rec(e1)P’ has some common prefix with P(u1,u1‘). recu1(e1) ← recovery edge e’ of e1 that

minimizes the length of the common prefix

recv1(e1) chosen analogously w.r.t P(v1,v1‘)

2-sensitivity routing

Page 52: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

These choices ensure successful routing (requires detailed case analysis)

The routing process

Page 53: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

T1

T2

T3

The routing process

Page 54: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

T1

T2

T3

First subcase:

The routing process

Page 55: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

T1

T2

T3

Second subcase:

The routing process

Page 56: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty

Thm [CLPR-10] There exists a 2-sensitive compact routing scheme that given a message M at a source vertex s and a destination t, in the presence of failed edges e1 and e2, routes M from s to t in a distributed manner over a path of length at most O(k⋅dist(s,t,G\{e1,e2}).

The total amount of information stored in vertices of G is O(kn1+1/klog(nW)logn).

The routing process

Page 57: Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty