Oracles for Distances Avoiding a Link-failure

Preview:

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

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)

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

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

Motivating scenario

Network where failures happen quite rarely

Motivating scenario

Network where failures happen quite rarely

Time

Router SP queriesO(n2)

~

Time

Router SP queries

OracleSolution

Oracle

DynamicSolution

Updated routing table

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!

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.

~

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

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

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

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

Querying the oracle…

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

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

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

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

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

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)

Oracle 2: constructing table dl (and dr)

n bands from first

levels

x

y

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

A combinatorial property on trees

Remove subtrees with <n nodes

<n internal nodes with outdegree >1 remain

All but <n leaves disappear

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

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?