Presentation is loading. Please wait.

Presentation is loading. Please wait.

Improved Randomized Algorithms for Path Problems in Graphs PhD Thesis Surender Baswana Department of Computer Science & Engineering, I.I.T. Delhi Research.

Similar presentations


Presentation on theme: "Improved Randomized Algorithms for Path Problems in Graphs PhD Thesis Surender Baswana Department of Computer Science & Engineering, I.I.T. Delhi Research."— Presentation transcript:

1 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

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

3 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 2 n operations.  Designing algorithm for solving a problem that requires minimum time (# of operations) and optimal storage.

4 Sorting Algorithms  Selection sort, Bubble sort, Insertion sort n 2 comparisons in worst case  Merge Sort : n log 2 n comparisons in worst case  Quick sort : (A randomized algorithm) n 2 comparisons in worst case n log 2 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.

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

6 A Directed Graph

7 A Directed Weighted Graph 1013 7 18 2517 27 15 21 9 16 27 11 7 19 10 50

8 All Pairs Reachability (Transitive Closure) Given a pair of vertices x,y in V, Is there a path from x to y ?

9 All-Pairs Reachability (Transitive Closure) x y

10 x y Processing time : mn

11 All-Pairs Shortest Paths Given a pair of vertices x,y in V, report the shortest path (or distance) from x to y.

12 All-Pairs Shortest Paths 1013 7 18 2517 59 7 21 9 16 27 11 7 19 10 50 x y a b c d e

13 All-Pairs Shortest Paths 1013 7 18 2517 59 7 21 9 16 27 11 7 19 10 50 x y 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

14 A Network Design Problem

15

16 12 10 30 65 40 69 59 100 120 56 34 59 80 150 24 69 79 150

17 Objective To minimize the number of links to be selected without increasing the route time between any pair of nodes too much.

18 An Example 12 10 30 65 51 69 53 100 120 56 34 59 80 150 24 69 79 150

19 An Example 12 10 30 65 51 69 53 100 120 56 34 59 80 150 69 79 150 X Y A B C F

20 k-Spanner of a Weighted Graph Given a graph G(V,E), a sub-graph G S (V,E’) is said to be k-spanner if for each u,v in V, d s (u,v) ≤ k. d(u,v)

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

22 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 n 1+1/k edges.  Example : There can’t be a 3-spanner with less than n 3/2 edges for every graph.

23 Algorithms for Computing (2k-1)-Spanner PersonsReferenceStretchRunning time Das, et al.Journal : DCG, 93 (2k-1) mn 1+1/k Thorup and Zwick Conf. : ACM STOC, 2001 (2k-1) mn 1/k

24 Algorithms for computing (2k-1)-spanner PersonsReferenceStretchRunning time Das, et al.Journal : DCG, 93 (2k-1) mn 1+1/k Thorup and Zwick Conf. : ACM STOC, 2001 (2k-1) mn 1/k Baswana and Sen Conf. : ICALP, 2003 (2k-1) m

25 Approximate Distance Oracles  Usually all-pairs shortest distances are stored in an nхn matrix.  Is it possible to require less than n 2 storage and still answer a distance query in constant time?  Yes, but at the expense of introducing approximation.  3-Approximate Distance oracle of size n 3/2

26 Advantage of Approximate Distance Oracles  For answering shortest path queries in external-memory

27 Advantage of Approximate Distance Oracles  For answering shortest path queries in external-memory RAM Hard-DiskCPU FastSlow

28 Approximate Distance Oracles  Thorup and Zwick [STOC’01] gave first algorithm for computing approximate distance oracle with Size : n 1+1/k Stretch : 2k-1  Preporcessing time for building a (2k-1)-approximate distance oracle : mn 1/k  Worst case preprocessing time for 3-Approximate Distance Oracle would be n 2.5.  Question : Can 3-approximate distance oracle be computed in n 2 time ?

29 Algorithms for Computing All-Pairs Approximate Distance Oracle PersonReference Stretch Size Preprocessing time DijkstraAll text Books on Algorithms 1n2n2 mn

30 Algorithms for Computing All-Pairs Approximate Distance Oracle PersonReference Stretch Size Preprocessing time DijkstraAll text Books on Algorithms 1n2n2 mn Thorup and Zwick Conf. ACM-STOC 2001 2k-1n 1+1/k mn 1/k

31 Algorithms for Computing All-Pairs Approximate Distance Oracle PersonReference Stretch Size Preprocessing time DijkstraAll text Books on Algorithms 1n2n2 mn Thorup and Zwick Conf. ACM-STOC 2001 2k-1n 1+1/k mn 1/k Baswana and Sen Conf. ACM-SIAM SODA 2004 2k-1n 1+1/k Min (mn 1/k,n 2 )

32 Path Problems in Dynamic Graphs

33 Example of a Dynamic Graph x y b c d e f g

34 x y b c d e f g

35 x y b c d e f g

36 x y b c d e f g

37 x y b c d e f g

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

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

40 Applications of Dynamic Graph Algorithms  Communication networks.  Relational databases augmented with transitive closure.  Incremental parser generator.

41 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 n 3/2 update time per edge deletion  Baswana S., Hariharan R., Sen S. design an algorithm that requires n 4/3 update time per edge deletion

42 Maintaining All-Pairs Shortest Paths under Deletion of Edges  Static algorithm requires mn time.  An algorithm of Demetrescu and Italiano [IEEE FOCS 2001] requires n 3 /m update time per edge deletion  For sparse graphs, the update time of above algorithm : n 2  Baswana S., Hariharan R., Sen S. design an algorithm that requires n 3/2 update time per edge deletion for all graphs  Proceedings of 34 th Annual ACM Symposium on Theory of Computing, Montreal, Quebec, Canada, May 19-21, 2002.

43 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 14 th Annual ACM-SIAM Symposium on Discrete Algorithms, Baltimore, Maryland, USA, January 12-14, 2003.

44 Maintaining All-Pairs Approximate Shortest Paths under Deletion of Edges Stretch factorUpdate time 3n 10/9 5n 14/13 7n 28/27

45 A Linear time Algorithm for computing a 3-spanner  Objective : Select no more than n 3/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

46 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 n v.  The vertex v belongs to the cluster centered at n v

47 The Linear time Algorithm contd. v

48 v

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

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

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


Download ppt "Improved Randomized Algorithms for Path Problems in Graphs PhD Thesis Surender Baswana Department of Computer Science & Engineering, I.I.T. Delhi Research."

Similar presentations


Ads by Google