improved randomized algorithms for path problems in graphs

Post on 21-Jan-2016

28 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Improved Randomized Algorithms for Path Problems in Graphs. Surender Baswana Postdoctoral Researcher Max Planck Institute for Computer Science. Path Problems in Graph. Given a graph, report a path with certain characteristics. Path Problems in Graph. - PowerPoint PPT Presentation

TRANSCRIPT

Improved Randomized Improved Randomized Algorithms for Path Problems in Algorithms for Path Problems in

GraphsGraphs

Surender Baswana

Postdoctoral Researcher Max Planck Institute for Computer

Science

Path Problems in GraphPath Problems in Graph

Given a graph, report a path with certain characteristics

Path Problems in GraphPath Problems in Graph

Given a graph, report a path with certain characteristics

Transitive closure

Path Problems in GraphPath Problems in Graph

Given a graph, report a path with certain characteristics

Transitive closure

All-pairs shortest paths

Query paradigm of a path Query paradigm of a path problemproblem

Given a graph G=(V,E)

Query paradigm of a path Query paradigm of a path problemproblem

Given a graph G=(V,E)

A sequence of path queries

Query paradigm of a path Query paradigm of a path problemproblem

Given a graph G=(V,E)

A sequence of path queries

Answer each path query online

Path Problems in Path Problems in staticstatic settings settings

Preprocess a given graph G=(V,E) to form a data-structure that can answer a path query in optimal time.

Path Problems in Path Problems in dynamicdynamic settingssettings

A graph G=(V,E) ,

Path Problems in Path Problems in dynamicdynamic settingssettings

A graph G=(V,E) ,

q, q, u , u , q , u , u , u , u , q , q , u , …

Path Problems in Path Problems in dynamicdynamic settingssettings

AIM : Maintain a data-structure

Path Problems in Path Problems in dynamicdynamic settingssettings

AIM : Maintain a data-structure

Answer each query in optimal time

Path Problems in Path Problems in dynamicdynamic settingssettings

AIM : Maintain a data-structure

Answer each query in optimal time

Requires less update time

Organization of the talkOrganization of the talk

Static algorithms All-pairs approximate shortest paths Graph Spanners

Dynamic algorithms Transitive closure All-pairs shortest paths

Open Problems

Organization of the talkOrganization of the talk

Static algorithms All-pairs approximate shortest paths Graph Spanners

Dynamic algorithms Transitive closure All-pairs shortest paths

Open Problems

All-pairs approximate shortest All-pairs approximate shortest pathspaths

All-Pairs Shortest PathsAll-Pairs Shortest Paths

Given a graph G=(V,E), preprocess it to compute shortest-path for every pair of vertices u,v ЄV.

|V|=n, |E|=m δ(u,v) : distance from u to v

One of the most fundamental algorithmic graph problem

Existing algorithms for APSPExisting algorithms for APSP

Floyd and WarshalO(n3)

Pettie [ICALP 2002, TCS 2004]O(mn+n2 log log n)

Zwick [ISAAC 2004]O(n3 (log log n)1/2/log n)

Sub-cubic algorithms for APSPSub-cubic algorithms for APSP

Fast Matrix Multiplication Subroutine

G=(V,E) Distance matrix

Are there simple and efficient algorithms for APSP with

sub-cubic preprocessing time ?

sub-quadratic space data-structure ?

Are there simple and efficient algorithms for APSP with

sub-cubic preprocessing time ?

sub-quadratic space data-structure ?

At the cost of approximation

All-pairs approximate shortest All-pairs approximate shortest PathsPaths

Some error ε in the distance δ*

Additive error ε = kδ(u,v) ≤ δ*(u,v) ≤ δ(u,v) + k

Multiplicative error ε = t δ(u,v) ≤ δ*(u,v) ≤ t δ(u,v)

Existing algorithms for APASP in undirected graph

Algorithms with additive error Aingworth et al. [SODA 1996, SICOMP 1999] Dor et al. [FOCS 1996, SICOMP 1999]

Algorithms with multiplicative error Cohen [SICOMP 1998] Cohen & Zwick [SODA 1997, J. Algo. 2001] Thorup & Zwick [STOC 2001]

Algorithms with additive and multiplicative error Elkin [PODC 2001]

Approximate Distance OracleApproximate Distance Oracle[[Thorup & Zwick, Thorup & Zwick, STOC 2001STOC 2001]]

Given a positive integer k

Preprocessing time O(kmn1/k) Data-structure of size O(kn1+1/k) Answer any approximate distance query in O(k)

time

δ(u,v) ≤ δ*(u,v) ≤ (2k-1) δ(u,v)

Approximate Distance OracleApproximate Distance Oracle[[Thorup & Zwick, Thorup & Zwick, STOC 2001STOC 2001]]

Given a positive integer k

Preprocessing time O(kmn1/k) Data-structure of size O(kn1+1/k) Answer any approximate distance query in O(k)

time

δ(u,v) ≤ δ*(u,v) ≤ (2k-1) δ(u,v)

(2k-1)-approx. distance oracle

Approximate Distance OracleApproximate Distance Oracle[[Thorup & Zwick, Thorup & Zwick, STOC 2001STOC 2001]]

Given a positive integer k

Preprocessing time O(kmn1/k) Data-structure of size O(kn1+1/k) : Optimal: Optimal Answer any approximate distance query in O(k)

time

δ(u,v) ≤ δ*(u,v) ≤ (2k-1) δ(u,v)

(2k-1)-approx. distance oracle

Approximate distance oracles for Approximate distance oracles for

un-weighted graphsun-weighted graphs

B, Sen

SODA 2004

2k-1 O(kn1+1/k) min(mn1/k, n2 log n)

Stretch

Size Preprocessing time

All-pairs All-pairs tt-approximate shortest -approximate shortest paths, for paths, for t<3t<3

All-pairs All-pairs 22-approx. shortest path-approx. shortest path

A : algorithm for (2-ε)-approximate shortest paths

B,C : two nΧn boolean matrices

All-pairs All-pairs 22-approx. shortest path-approx. shortest path

A : algorithm for (2-ε)-approximate shortest paths

B,C : two nΧn boolean matrices

Linear time

B,CA

GB,CBΧC

All-pairs All-pairs 22-approx. shortest path-approx. shortest path

A : algorithm for (2-ε)-approximate shortest paths

B,C : two nΧn boolean matrices

Linear time

B,CA

GB,CBΧC

All-pairs (2- ε)-approx. paths is as difficult as Boolean matrix multiplication

All-pairs All-pairs 22-approx. shortest path-approx. shortest path [ [Cohen & Zwick, SICOMP 2000]]

G=(V,E) : Undirected weighted graph

Preprocessing time : O(m1/2n3/2)

Space : O(n2)

All-pairs 2-approx. shortest paths

2.0

ω2.376

2.5

Upper bound

Lower bound

All-pairs 2-approx. shortest paths

2.0

ω2.376

2.5

Upper bound

Lower bound

Algorithm 1 Õ(m2/3n + n2)

δ(u,v) ≤ δ*(u,v) ≤ 2δ(u,v) + 1

All-pairs 2-approx. shortest paths

2.0

ω2.376

2.5

Upper bound

Lower bound

Algorithm 1 Õ(m2/3n + n2)

δ(u,v) ≤ δ*(u,v) ≤ 2δ(u,v) + 1

Algorithm 2 Õ(n2)

δ(u,v) ≤ δ*(u,v) ≤ 2δ(u,v) + 3

Graph SpannersGraph Spanners

Graph SpannersGraph Spanners

Definition : Given a graph G=(V,E), a sub-graph G=(V,Es) that is

sparse and yet preserves approximate distances pair-wise.

Graph SpannersGraph Spanners

Definition : Given a graph G=(V,E), a sub-graph G=(V,Es) that is

sparse and yet preserves approximate distances pair-wise.

Multiplicative t-spanner : δ(u,v) ≤ δs(u,v) ≤ t δ(u,v)

Graph SpannersGraph Spanners

Definition : Given a graph G=(V,E), a sub-graph G=(V,Es) that is

sparse and yet preserves approximate distances pair-wise.

Multiplicative t-spanner : δ(u,v) ≤ δs(u,v) ≤ t δ(u,v)

Additive t-spanner :δ(u,v) ≤ δs(u,v) ≤ δ(u,v) + t

Applications of Graph SpannerApplications of Graph Spanner

Distributed Computing Design of Synchronizers Compact routing tables

Computational Biology Reconstruction of Phylogenetic trees

All-pairs Approximate Shortest Paths

Multiplicative SpannersMultiplicative Spanners

Multiplicative SpannerMultiplicative Spannersize versus approximationsize versus approximation

u v

Multiplicative SpannerMultiplicative Spannersize versus approximationsize versus approximation

u v

t

Multiplicative SpannerMultiplicative Spannersize versus approximationsize versus approximation

u v

girth = t stretch ≥ t-1

Multiplicative SpannerMultiplicative Spannersize versus approximationsize versus approximation

u v

girth = t stretch ≥ t-1

Erdös[1960], Bondy & Simonovits [1974], Bollobas [1978] :For all k≥1, there are graphs with Ω(n1+1/k) edges and girth >2k

Multiplicative SpannerMultiplicative Spannersize versus approximationsize versus approximation

For k ≥1, a (2k-1)-spanner may have Ω(n1+1/k) edges

Multiplicative Spanner : ResultsMultiplicative Spanner : Results

Althofer, Das, Dobkin,Joseph, Soares

DCG,1993 2k-1 O(mn1+1/

k)O(n1+1/k)

Thorup, Zwick STOC,2001

2k-1 O(mn1/k) O(kn1+1/k)

Stretch

ConstructionTime

Size

Multiplicative Spanner : ResultsMultiplicative Spanner : Results

Althofer, Das, Dobkin,Joseph, Soares

DCG,1993 2k-1 O(mn1+1/

k)O(n1+1/k)

Thorup, Zwick STOC,2001

2k-1 O(mn1/k) O(kn1+1/k)

Stretch

ConstructionTime

Size

Can we Compute Can we Compute (2k-1)-(2k-1)-spanners in linear time ?spanners in linear time ?

Multiplicative Spanner : ResultsMultiplicative Spanner : Results

Althofer, Das, Dobkin,Joseph, Soares

DCG,1993 2k-1 O(mn1+1/

k)O(n1+1/k)

Thorup, Zwick STOC,2001

2k-1 O(mn1/k) O(kn1+1/k)

B, Sen ICALP,2003

2k-1 O(m) O(kn1+1/k)

Stretch

ConstructionTime

Size

Local approachLocal approach

u v

Edge in Spanner

Edge not in Spanner

Local approachLocal approach

u v

2

1 i-1

≤w

≤w ≤w

≤w

w

Pi : For each edge not in Es , there is a path connecting its endpoints• with at-most i edges• none heavier than the edge

NewNew Algorithms for ( Algorithms for (2k-12k-1)-)-spannerspanner

External-memory : Integer sorting

Parallel algorithm O(t) for t > log*n

Distributed Algorithm O(1) rounds, linear communication

complexity

Algorithm for 3-spannerAlgorithm for 3-spanner

Algorithm for 3-spannerAlgorithm for 3-spannerEasy caseEasy case : fewer than : fewer than n½ edges edges

Algorithm for 3-spannerAlgorithm for 3-spannerDifficult caseDifficult case : much more than : much more than n½ edges edges

Algorithm for 3-spannerAlgorithm for 3-spannerDifficult caseDifficult case : much more than : much more than n½ edges edges

Which n½ edges to select ?

Algorithm for 3-spannerAlgorithm for 3-spanner

Phase 1 : Clustering

Phase 2 : Adding edges between vertices and clusters

Algorithm for 3-spannerAlgorithm for 3-spanner

Phase 1 : Clustering

Phase 2 : Adding edges between vertices and clusters

center

Algorithm for 3-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

1. Select each vertex r.i. with probability p to be a cluster center

Algorithm for 3-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

1. Select each vertex r.i. with probability p to be a cluster center

2. Process each v Є V \S as follows

Algorithm for 3-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

1. Select each vertex r.i. with probability p to be a cluster center

2. Process each v Є V \S as follows1. If v is not adjacent to any sampled vertex

Algorithm for 3-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

1. Select each vertex r.i. with probability p to be a cluster center

2. Process each v Є V \S as follows1. If v is not adjacent to any sampled vertex.

v

Algorithm for 3-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

1. Select each vertex r.i. with probability p to be a cluster center

2. Process each v Є V \S as follows1. If v is not adjacent to any sampled vertex.

v

Algorithm for 3-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

1. Select each vertex r.i. with probability p to be a cluster center

2. Process each v Є V \S as follows1. If v is adjacent to some sampled vertex

Algorithm for 3-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

1. Select each vertex r.i. with probability p to be a cluster center

2. Process each v Є V \S as follows1. If v is adjacent to some sampled vertex.

weights

v

x

Algorithm for 3-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

1. Select each vertex r.i. with probability p to be a cluster center

2. Process each v Є V \S as follows1. If v is adjacent to some sampled vertex.

weights

v

x

Algorithm for 3-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

1. Select each vertex r.i. with probability p to be a cluster center

2. Process each v Є V \S as follows1. If v is adjacent to some sampled vertex.

weights

v

x

Algorithm for 3-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

1. Select each vertex r.i. with probability p to be a cluster center

2. Process each v Є V \S as follows1. If v is adjacent to some sampled vertex.

weights

x

v

Algorithm for 3-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

G=(V,E) G=(V1,E1)Phase 1

Algorithm for 3-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

G=(V,E) G=(V1,E1)

Every v Є V1 is clustered

Phase 1

v o

Algorithm for 3-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

G=(V,E) G=(V1,E1)

Every v Є V1 is clustered For each w-v Є E1

Phase 1

v ow

Algorithm for 3-spannerAlgorithm for 3-spannerDifficult caseDifficult case : much more than : much more than n½ edges edges

Which n½ edges to select ?

Algorithm for 3-spannerAlgorithm for 3-spannerDifficult caseDifficult case : much more than : much more than n½ edges edges

v

Algorithm for 3-spannerAlgorithm for 3-spannerPhase 2 : Phase 2 : adding edges between vertices and adding edges between vertices and

clustersclusters

v

Analysis of the algorithmAnalysis of the algorithm Correctness ??

Size of the spanner

Running time

Analysis of the algorithmAnalysis of the algorithm Correctness ??

Size of the spanner Edges added during Phase 1 + Edges added during

Phase 2

Running time

Analysis of the algorithmAnalysis of the algorithm Correctness ??

Size of the spanner n/p + Edges added during

Phase 2

Running time

Analysis of the algorithmAnalysis of the algorithm Correctness ??

Size of the spanner n/p + n2p

Running time

Analysis of the algorithmAnalysis of the algorithm Correctness ??

Size of the spanner n3/2

Running time

Analysis of the algorithmAnalysis of the algorithm Correctness ??

Size of the spanner n3/2

Running time Modified Radix sort on the label of the edgesModified Radix sort on the label of the edges

Spanner has stretch 3Spanner has stretch 3

x y

Spanner has stretch 3Spanner has stretch 3

x y

Both x and y are clustered

Spanner has stretch 3Spanner has stretch 3

x y

yx

Spanner has stretch 3Spanner has stretch 3

x y

yx

Spanner has stretch 3Spanner has stretch 3

x y

yx yxo

Spanner has stretch 3Spanner has stretch 3

x y

yx yxo

ß

α

z

Spanner has stretch 3Spanner has stretch 3

x y

yx yxo

ß

α

z

Algorithm for (Algorithm for (2k-12k-1)-spanner)-spanner

Reviewing 3-spanner algorithmReviewing 3-spanner algorithm[[To build 5-spannerTo build 5-spanner]]

V0 n

Reviewing 3-spanner algorithmReviewing 3-spanner algorithm[[To build 5-spannerTo build 5-spanner]]

nV0

#Vertices #Clusters

Reviewing 3-spanner algorithmReviewing 3-spanner algorithm[[To build 5-spannerTo build 5-spanner]]

n

n1/2

V0

V1

#Vertices #Clusters

Reviewing 3-spanner algorithmReviewing 3-spanner algorithm[[To build 5-spannerTo build 5-spanner]]

n

n1/2

Must increase the sampling

probability

V0

V1

#Vertices #Clusters

Reviewing 3-spanner algorithmReviewing 3-spanner algorithm[[To build 5-spannerTo build 5-spanner]]

n

n2/3

V0

V1

#Vertices #Clusters

Computing 5-SpannerComputing 5-Spanner

n

n2/3

n1/3

V0

V1

V2

#Vertices #Clusters

Computing 5-SpannerComputing 5-Spanner

n

n2/3

n1/3

V0

V1

V2

#Vertices #Clusters

Algorithm for (Algorithm for (2k-12k-1)-spanner)-spanner

n

n1-1/k

n1/k

V0

V1

Vk-1

Additive SpannersAdditive Spanners(un-weighted graphs)(un-weighted graphs)

Algorithms for Additive SpannersAlgorithms for Additive Spanners

Aingworth et al. [SODA 1996], Elkin & Peleg [STOC 2001]

Additive 2-spanner of size O(n3/2)

Algorithms for Additive SpannersAlgorithms for Additive Spanners

Aingworth et al. [SODA 1996], Elkin & Peleg [STOC 2001]

Additive 2-spanner of size O(n3/2)

B, Kavitha, Mehlhorn, Pettie [SODA 2005]

Additive 6-spanner of size O(n4/3)

((αα,,ββ)-Spanner)-Spanner(un-weighted graphs)(un-weighted graphs)

Algorithms for (α,β)-spanner

(α,β)-spannerδ(u,v) ≤ δs(u,v) ≤ α δ(u,v) + β

Elkin & Peleg [STOC 2001]

(1+ε, β)-spanner of size O(n1+γ)

Algorithms for (α,β)-spanner

(α,β)-spannerδ(u,v) ≤ δs(u,v) ≤ α δ(u,v) + β

Elkin & Peleg [STOC 2001]

(1+ε, β)-spanner of size O(n1+γ)

β depends inverse exponentially on γ super polynomially on ε-1

Algorithms for (α,β)-spanner

(α,β)-spannerδ(u,v) ≤ δs(u,v) ≤ α δ(u,v) + β

Elkin & Peleg [STOC 2001]

(1+ε, β)-spanner of size O(n1+γ)

B, Kavitha, Mehlhorn, Pettie [SODA 2005]

Linear time algorithm for (k,k-1)-spanner of size O(n1+1/k)

Dynamic AlgorithmsDynamic Algorithms

Dynamic AlgorithmsDynamic AlgorithmsTransitive ClosureTransitive Closure

Leeuwen & Poutre

TCS 1991 O(1) O(m)

Demetrescu & Italiano

FOCS 2000 O(1) O(n3/m)

Query time Update time per edge-del.

Dynamic AlgorithmsDynamic AlgorithmsTransitive ClosureTransitive Closure

Leeuwen & Poutre

TCS 1991 O(1) O(m)

Demetrescu & Italiano

FOCS 2000 O(1) O(n3/m)

B. & Sen STOC 2002 O(1) O(n2/√m)

Query time Update time per edge-del.

Dynamic AlgorithmsDynamic AlgorithmsTransitive ClosureTransitive Closure

Leeuwen & Poutre

TCS 1991 O(1) O(m)

Demetrescu & Italiano

FOCS 2000 O(1) O(n3/m)

B. & Sen STOC 2002 O(1) O(n2/√m)

Roditty & Zwick

FOCS 2002 O(1) O(n)

Query time Update time per edge-del.

Dynamic AlgorithmsDynamic AlgorithmsAll-pairs approximate shortest pathsAll-pairs approximate shortest paths

Stretch Query time

Update time per edge-

del.B. & Sen SODA

20033 O(1) O(n3/2)

Dynamic AlgorithmsDynamic AlgorithmsAll-pairs approximate shortest pathsAll-pairs approximate shortest paths

Stretch Query time

Update time per edge-

del.B. & Sen SODA

20033 O(1) O(n3/2)

Roditty & Zwick

FOCS 2004

1+ε O(1) O(n)

Open ProblemsOpen Problems

Open ProblemsOpen ProblemsGraph spannersGraph spanners

Additive spanners of size o(n4/3) ?

Open ProblemsOpen ProblemsGraph spannersGraph spanners

Additive spanners of size o(n4/3) ?

O(n1+1/k) size (2k-1)-spanner for weighted graph inO(m) time?

Open ProblemsOpen ProblemsAll-pairs approximate shortest pathsAll-pairs approximate shortest paths

All-pairs 2-approximate shortest paths O(n2+ε) lower bound

O(n2 polylog n) time algorithm without additive error

Open ProblemsOpen ProblemsAll-pairs approximate shortest pathsAll-pairs approximate shortest paths

All-pairs 2-approximate shortest paths O(n2+ε) lower bound

O(n2 polylog n) time algorithm without additive error

Approximate Distance Oracles for weighted graphs in (n2) time

Open ProblemsOpen ProblemsDynamic algorithmsDynamic algorithms

Demetrescu,

Italiano STOC 2003 Õ(n2) O(1)

Update time Query time

Fully dynamic all-pairs shortest paths

Open ProblemsOpen ProblemsDynamic algorithmsDynamic algorithms

Demetrescu,

Italiano STOC 2003 Õ(n2) O(1)

Update time Query time

Fully dynamic all-pairs shortest paths

Sub-quadratic update time & O(1) query time at the cost of approximation

OpenOpen ProblemsProblemsDynamic algorithmsDynamic algorithms

Fully Dynamic algorithm for (2k-1)-spanner ?

Thank you Thank you

top related