22
Oracles for Distances Avoiding a Link-failure C. Demetrescu (U. Rome La Sapienza) R.A.Chowdhury (U. Texas Austin) V. Ramachandran (U. Texas Austin) M. Thorup (AT&T Research)

Oracles for Distances Avoiding a Link-failure

  • Upload
    vida

  • View
    32

  • Download
    0

Embed Size (px)

DESCRIPTION

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. - PowerPoint PPT Presentation

Citation preview

Page 1: Oracles for Distances  Avoiding a Link-failure

Oracles for Distances Avoiding a Link-failureC. Demetrescu (U. Rome La Sapienza)

R.A.Chowdhury(U. Texas Austin)

V. Ramachandran(U. Texas Austin)

M. Thorup(AT&T Research)

Page 2: Oracles for Distances  Avoiding a Link-failure

The distance sensitivity problem

Given a weighted directed graph G=(V,E,w),construct a data structure (oracle) that supports queries of the kind:

Query(x,y,u,v): what is the distance xy in G avoiding edge (u,v)?

u vx yu vx y

Page 3: Oracles for Distances  Avoiding a Link-failure

Related work

Minimum Spanning Tree

- E. Nardelli et al., Algorithmica 40(2), 2004

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

Page 4: Oracles for Distances  Avoiding a Link-failure

Motivating scenario

Network where failures happen quite rarely

Page 5: Oracles for Distances  Avoiding a Link-failure

Motivating scenario

Network where failures happen quite rarely

Time

Router SP queriesO(n2)

~

Time

Router SP queries

OracleSolution

Oracle

DynamicSolution

Updated routing table

Page 6: Oracles for Distances  Avoiding a Link-failure

Simple-minded oracle

Keep a table of size O(n3)

vx yd[x,y,0]

u vx yd[x,y,1]

u vx y

u vx y

x yu

d[x,y,2]

d[x,y,3]

d[x,y,n-1]

... ...

Query O(1)

Using cubic space is prohibitive!

Page 7: Oracles for Distances  Avoiding a Link-failure

Our results

Oracle 1 O(n2 log n) O(1)

Space Query

n = num. vertices m = num. edges

Oracle 2 O(n2.5) O(1) O(mn1.5)~

O(mn2)

Preproc.

~

Page 8: Oracles for Distances  Avoiding a Link-failure

Oracle 1: data structure

x ysl[x,y,0]

1

x ysl[x,y,1]

x ysl[x,y,2]

1 2

x ysl[x,y,3]

4x y

sl[x,y,log n]

... ...

Keep four tables of size O(n2 log n): sl, sr, dl, dr

Page 9: Oracles for Distances  Avoiding a Link-failure

Oracle 1: data structure

sr[x,y,0]

sr[x,y,1]

sr[x,y,2]

sr[x,y,3]

sr[x,y,log n]

...

y

1

y

y

12

y

4y

...

x

x

x

x

x

Keep four tables of size O(n2 log n): sl, sr, dl, dr

Page 10: Oracles for Distances  Avoiding a Link-failure

Oracle 1: data structure

x ydl[x,y,0]

1

x ydl[x,y,1]

1

x ydl[x,y,2]

2

x ydl[x,y,3]

4x y

dl[x,y,log n]

... ...8

Keep four tables of size O(n2 log n): sl, sr, dl, dr

Page 11: Oracles for Distances  Avoiding a Link-failure

Oracle 1: data structure

dr[x,y,0]

dr[x,y,1]

dr[x,y,2]

dr[x,y,3]

dr[x,y,log n]

...

y

1

y

1

y

2

y

4yx

...

8

x

x

x

x

Keep four tables of size O(n2 log n): sl, sr, dl, dr

Page 12: Oracles for Distances  Avoiding a Link-failure

Querying the oracle…

Page 13: Oracles for Distances  Avoiding a Link-failure

x yu v yu v

Oracle 1: answering queries

2l yx

d[x,l’]+sl[l’,y,j]

u vl’

2j-1

2k-1

sr[x,r’,k]+d[r’,y]

x y3

u v r’r

1x yu v

dl[x,y,i]

x yru vl

2i-1

min

Page 14: Oracles for Distances  Avoiding a Link-failure

Oracle 2: data structure

Keep three tables of size O(n2.5): dl, dr, dc

x ydl[x,y,1]

x ydl[x,y,2]

x ydl[x,y,3]

x ydl[x,y,√n]

... ...

x ydl[x,y,0]

√n

Page 15: Oracles for Distances  Avoiding a Link-failure

Oracle 2: data structure

Keep three tables of size O(n2.5): dl, dr, dc

dr[x,y,1]

dr[x,y,2]

dr[x,y,3]

dr[x,y,√n]

...

dr[x,y,0]

y

y

y

y

...

y

√n

x

x

x

x

x

Page 16: Oracles for Distances  Avoiding a Link-failure

Oracle 2: data structure

Keep three tables of size O(n2.5): dl, dr, dc

dc[x,y,1]

dc[x,y,2]

dc[x,y,√n]

...

dc[x,y,0]

y

y

y

...y

x

x

x

x

<√n <√n <√n √n

Page 17: Oracles for Distances  Avoiding a Link-failure

x yu v

Oracle 2: answering queries

dc[x,y,...]

rx yu v1

l

<√n

2l yx

d[x,l]+dl[l,y,...]

u v

<√n

dr[x,r,...]+d[r,y]

rx y3

u v

<√n

Page 18: Oracles for Distances  Avoiding a Link-failure

Computing distances avoiding sub-paths

x

y

Band of edge-disjoint sub-paths

Distances from x to every y excluding a band of edge-disjoint sub-paths can be

computed in Õ(m)

Page 19: Oracles for Distances  Avoiding a Link-failure

Oracle 2: constructing table dl (and dr)

n bands from first

levels

x

y

O(mn) per SP tree O(mn1.5) total

Page 20: Oracles for Distances  Avoiding a Link-failure

A combinatorial property on trees

Remove subtrees with <n nodes

<n internal nodes with outdegree >1 remain

All but <n leaves disappear

Page 21: Oracles for Distances  Avoiding a Link-failure

Oracle 2: constructing table dc

<n bands obtained by cutting at nodes

with degree >1

n bands obtained by cutting at regular

intervals

may be> n

Red+Blue < 2n bands of edge-disjoint sub-paths and of height < n O(mn1.5) total

Page 22: Oracles for Distances  Avoiding a Link-failure

Conclusions

Can we improve construction time?

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 support multiple simultaneous failures?