Upload
kimberly-elliott
View
215
Download
0
Tags:
Embed Size (px)
Citation preview
Improved Randomized Algorithms for Path Problems in Graphs
PhD Thesis
Surender Baswana
Department of Computer Science & Engineering,
I.I.T. Delhi
Research supported in parts by a PhD fellowship from Infosys Technologies Ltd. Bangalore
Organization of the talk
Practical importance of algorithms/theoretical computer science.
Description of the problems addressed during PhD.
Application of the problems, and new results.
What I gained from my PhD.
My experiences, esp. invaluable support from Infosys.
Theoretical Computer Science Is it feasible to solve a problem ?
Is a problem practically tractable ?
Traveling Salesman Problem : Given a set of cities, find the tour of least distance.
No algorithm that performs better than 2n operations.
Designing algorithm for solving a problem that requires
minimum time (# of operations) and optimal storage.
Sorting Algorithms
Selection sort, Bubble sort, Insertion sort
n2 comparisons in worst case Merge Sort : n log2 n comparisons in worst case
Quick sort : (A randomized algorithm)
n2 comparisons in worst case
n log2 n comparisons on an average
Quick sort performs better than all the sorting algorithms
Practically. Probability that quick sort deviates from its expected running
time asymptotically is less than 2–cn .
Path Problems in Graphs
Process a given graph G(V,E) so that we can retrieve a path with certain characteristics between each pair of vertices.
n = number of vertices in a given graph.
m = number of edges in a given graph.
A Directed Graph
A Directed Weighted Graph
10 13
7
1825 17
27
15
21
916
27
11 7
1910
10
50
All Pairs Reachability (Transitive Closure)
Given a pair of vertices x,y in V,
Is there a path from x to y ?
All-Pairs Reachability (Transitive Closure)
x
y
All-Pairs Reachability (Transitive Closure)
x
y
Processing time : mn
All-Pairs Shortest Paths
Given a pair of vertices x,y in V,
report the shortest path (or distance) from x to y.
All-Pairs Shortest Paths
10 13
7
1825 17
59
7
21
916
27
11 7
1910
10
50
xy
a
b
c d
e
All-Pairs Shortest Paths
10 13
7
1825 17
59
7
21
916
27
11 7
1910
10
50
xy
a
b
c d
e
x-b-e-y
x-b-c-d-e-y
x-a-y 67
58
78
Processing time : mn log n
A Network Design Problem
A Network Design Problem
A Network Design Problem
1210
30
65
40
69
59
100
120
56
34
59
80150
24
6979
150
Objective
To minimize the number of links to be
selected without increasing the route time
between any pair of nodes too much.
An Example
1210
30
65
51
69
53
100
120
56
34
59
80150
24
6979
150
An Example
1210
30
65
51
69
53
100
120
56
34
59
80150
6979
150
X
Y
A
B
C
F
k-Spanner of a Weighted Graph
Given a graph G(V,E) , a sub-graph GS(V,E’) is said to be k-spanner if for each u,v in V,
ds(u,v) ≤ k . d(u,v)
Application of Sparse Spanner
Network design, especially for making succinct routing tables.
Computational biology : in the reconstruction of phylogeny trees from matrices whose entries represent distances among contemporary living species.
Design of network synchronizers, and computation of all-pairs approximate shortest paths.
Computing a Sparse k-Spanner
Objective : a Sparse spanner with minimum stretch
A trade off between stretch and the size A k-spanner in the worst case may need at-least n1+1/k
edges.
Example : There can’t be a 3-spanner with less than n3/2 edges for every graph.
Algorithms for Computing (2k-1)-Spanner
Persons Reference Stretch Running time
Das, et al. Journal : DCG, 93
(2k-1) mn 1+1/k
Thorup and Zwick
Conf. :ACM STOC, 2001
(2k-1) mn1/k
Algorithms for computing (2k-1)-spanner
Persons Reference Stretch Running time
Das, et al. Journal : DCG, 93
(2k-1) mn 1+1/k
Thorup and Zwick
Conf. :ACM STOC, 2001
(2k-1) mn1/k
Baswana and
SenConf. :ICALP, 2003
(2k-1) m
Approximate Distance Oracles
Usually all-pairs shortest distances are stored in an nхn matrix.
Is it possible to require less than n2 storage and still answer a distance query in constant time?
Yes, but at the expense of introducing approximation.
3-Approximate Distance oracle of size n3/2
Advantage of Approximate Distance Oracles
For answering shortest path queries in external-memory
Advantage of Approximate Distance Oracles
For answering shortest path queries in external-memory
RAM Hard-DiskCPU
Fast Slow
Approximate Distance Oracles
Thorup and Zwick [STOC’01] gave first algorithm for computing approximate distance oracle with
Size : n1+1/k Stretch : 2k-1 Preporcessing time for building a (2k-1)-approximate
distance oracle :
mn1/k
Worst case preprocessing time for
3-Approximate Distance Oracle would be n2.5.
Question : Can 3-approximate distance oracle be computed in n2 time ?
Algorithms for ComputingAll-Pairs Approximate Distance Oracle
Person Reference Stretch Size Preprocessing time
Dijkstra All text Books on Algorithms
1 n2 mn
Algorithms for ComputingAll-Pairs Approximate Distance Oracle
Person Reference Stretch Size Preprocessing time
Dijkstra All text Books on Algorithms
1 n2 mn
Thorup and Zwick
Conf.ACM-STOC
2001
2k-1 n1+1/k mn1/k
Algorithms for ComputingAll-Pairs Approximate Distance Oracle
Person Reference Stretch Size Preprocessing time
Dijkstra All text Books on Algorithms
1 n2 mn
Thorup and Zwick
Conf.ACM-STOC
2001
2k-1 n1+1/k mn1/k
Baswana
and SenConf.ACM-SIAM SODA 2004
2k-1 n1+1/k Min
(mn1/k ,n2)
Path Problems in Dynamic Graphs
Example of a Dynamic Graph
x
y
b
c d
e
f
g
Example of a Dynamic Graph
x
y
b
c d
e
f
g
Example of a Dynamic Graph
x
y
b
c d
e
f
g
Example of a Dynamic Graph
x
y
b
c d
e
f
g
Example of a Dynamic Graph
x
y
b
c d
e
f
g
A Dynamic Graph Problem
Given a graph G=(V,E) Online sequence of queries interspersed with updates.
Objective :
1. To Answer each query efficiently in online fashion.
2. Perform updates in the solution efficiently.
Naive Solution :
After every update, re-compute the solution right from scratch.
A Dynamic Graph Algorithm
Maintain some data-structure that can answer each query efficiently.
The time required to maintain the data-structure after each update is much less than the static graph algorithm.
For each static graph algorithm/problem, there is a dynamic graph algorithm/problem as its counterpart.
Applications of Dynamic Graph Algorithms
Communication networks.
Relational databases augmented with transitive closure.
Incremental parser generator.
Maintaining All-Pairs Reachability under Deletion of edges
Static algorithm requires mn time. A combination of algorithms of Demetrescu et al. [IEEE
FOCS 2000] and Leeuwen et al. [TCS 1991] requires
n3/2 update time per edge deletion
Baswana S., Hariharan R., Sen S. design an algorithm that requires
n4/3 update time per edge deletion
Maintaining All-Pairs Shortest Paths under Deletion of Edges
Static algorithm requires mn time. An algorithm of Demetrescu and Italiano [IEEE FOCS
2001] requires
n3/m update time per edge deletion For sparse graphs, the update time of above algorithm : n2
Baswana S., Hariharan R., Sen S. design an algorithm that requires
n3/2 update time per edge deletion for all graphs Proceedings of 34th Annual ACM Symposium on Theory of Computing,
Montreal, Quebec, Canada, May 19-21, 2002.
Maintaining All-Pairs Approximate Shortest Paths under Deletion of Edges Improved static algorithms for shortest paths at the
expense of approximation.
Can we achieve better update time for maintaining approximate shortest paths?
Baswana S., Hariharan R., Sen S. design an algorithm that requires
Close to n update time per edge deletion
Proceedings of 14th Annual ACM-SIAM Symposium on Discrete Algorithms, Baltimore, Maryland, USA, January 12-14, 2003.
Maintaining All-Pairs Approximate Shortest Paths under Deletion of Edges
Stretch factor Update time
3 n10/9
5 n14/13
7 n28/27
A Linear time Algorithm for computing a 3-spanner
Objective : Select no more than n3/2 edges and ensure a stretch of 3 at-most.
Vertices of degree more than n½ are difficult to handle.
Solution :
* Clustering of vertices
* Random sampling to form clusters
A Linear time Algorithm for computing
a 3-spanner. Sample n½ vertices uniformly randomly
If a vertex v is not adjacent to any sample vertex, select all its edges for spanner.
Otherwise, add all the edges having weight less than that of the edge between the vertex and its nearest sampled vertex nv.
The vertex v belongs to the cluster centered at nv
The Linear time Algorithm contd.
v
The Linear time Algorithm contd.
v
Analyzing the correctness of algorithm
Consider an edge u-v not present in the spanner.
Both u and v must belong to clusters.
Case1 : both u and v belong to same cluster
Case2 : both u and v belong to different clusters
u v
w
v u w
u’
Gains from my PhD
Fulfilled the desire of working in theoretical computer science.
A beginning of research. The joy of exploring a research area of my
interest independently. Analytical skills that may be applied in
diverse areas.
Invaluable support from Infosys
Every research need fulfilled. Used the generous contingency grant for
buying a few of my dream books. Used the support for traveling to
conferences abroad. PhD won’t have been completed so
peacefully without Infosys Fellowship.