dynamic graph algorithms
play

Dynamic Graph Algorithms Giuseppe F. Italiano University of Rome - PowerPoint PPT Presentation

Dynamic Graph Algorithms Giuseppe F. Italiano University of Rome Tor Vergata giuseppe.italiano@uniroma2.it http://people.uniroma2.it/giuseppe.italiano/ Outline Dynamic Graph Problems Quick Intro Topic 1. (Undirected Graphs) Dynamic


  1. Dynamic Graph � Algorithms Giuseppe F. Italiano University of Rome Tor Vergata giuseppe.italiano@uniroma2.it http://people.uniroma2.it/giuseppe.italiano/

  2. Outline Dynamic Graph Problems – Quick Intro Topic 1. (Undirected Graphs) Dynamic Connectivity & MST Topic 2. (Undirected/Directed Graphs) Dynamic Shortest Paths Topic 3. (Non-dynamic?) 2-Connectivity in Directed Graphs

  3. Frederickson (Topology trees & clustering) Query O(1) Update O(m 1/2 ) 3

  4. Frederickson Algorithm is quite complicated • Maintain graphs of degree ≤ 3 • Compute and maintain clusters: m/z clusters with z vertices/edges, clusters can be split and merged. This gives O(z + (m/z) 2 ) = O(m 2/3 ) • Take clusters of clusters (multilevel decomposition) • Describe multilevel decomposition via a tree (topology tree) • Define a 2D version of the topology tree • Show how insertions/deletions affect multilevel decomposition and 2D topology tree… Total time per update is O( z + m/z ) = O(m 1/2 ) Will show my simpler version (unpublished) 4

  5. Simpler Frederickson Tree edges solid Non-tree edges dashed 5

  6. Simpler Frederickson Fix an Euler tour 6

  7. Simpler Frederickson Fix an Euler tour For each vertex: Sort adjacency list (non-tree edges) by Euler tour Adjacency list of vertex 1 7

  8. Simpler Frederickson Fix an Euler tour For each vertex: Sort adjacency list (non-tree edges) by Euler tour Adjacency list of vertex 6 8

  9. Simpler Frederickson Fix an Euler tour For each vertex: Sort adjacency list (non-tree edges) by Euler tour Adjacency list of vertex 1 9

  10. Simpler Frederickson Fix an Euler tour For each vertex: Sort adjacency list (non-tree edges) by Euler tour delete(2,4) Adjacency list of vertex 1 10

  11. Simpler Frederickson Fix an Euler tour For each vertex: Sort adjacency list (non-tree edges) by Euler tour Adjacency list of vertex 6 11

  12. Simpler Frederickson Fix an Euler tour For each vertex: Sort adjacency list (non-tree edges) by Euler tour delete(2,4) Adjacency list of vertex 6 12

  13. Simpler Frederickson Each vertex v maintains its “view” of the Euler tour (non-tree edges adjacent to v sorted according to Euler tour) When a tree edge gets deleted from (inserted into) the graph: • Euler tour subject to constant # cut / link operations • Adjacency list of vertex v subject to constant # split / merge operations (corresponding to cut / link operations) This gives O(log n) work per vertex After a tree edge gets deleted, the best replacement edge incident to v can be found in time O(log n) Do this for all vertices. Total time is O(n log n) per update 13

  14. Simpler Frederickson Total time is O(n log n) per update Space? Trivial: Keep the full Euler tour at each vertex. Need O(n) space per vertex. Total space is O(n 2 ) 14

  15. EXERCISE 1 Can you improve the space? Say, O(nlog n) time per update and O(m) space 15

  16. Better bounds? “Local” (i.e., per vertex) views have lot of similarities To improve time per update need to combine “local” views into a more “global” view Rather than maintaining n independent Euler tours, maintain something like a global (2D) Euler tour… 16

  17. Simpler Frederickson (2D) 17

  18. Simpler Frederickson (2D) 18

  19. Simpler Frederickson (2D) 19

  20. Recap To maintain dynamic MST Maintain points in a 2D space under split / concatenate operations along coordinates, and orthogonal range queries Each operation can be implemented in O(m 1/2 ) in the worst case with cross tree, which is a (2D) cross product of two balanced trees (ET trees in our case) [Grossi & I. 1999] If you can do better than cross trees, then you can improve Frederickson’s bound… 20

  21. Frederickson (Topology trees & clustering) Query O(1) Update O(m 1/2 ) 21

  22. Eppstein et al. (Sparsification) Query O(1) Update O(n 1/2 ) 22

  23. Sparsification Arbitrarily partition edges: m/n clusters with ≤ n edges each

  24. Sparsification Compute spanning tree (sparse certificate) for each cluster

  25. Sparsification Compute spanning tree (sparse certificate) for each cluster

  26. Sparsification Form union of sparse certificates

  27. Sparsification Form union of sparse certificates

  28. Sparsification Compute again sparse certificate

  29. Sparsification Compute again sparse certificate

  30. EXERCISE 2 30

  31. Sparsification Tree Parent contains union of sparse certificates of children log 2 m/n m/n Each sparsification tree node contains: • graph of size O(n); • certificate of union of graphs at leaf nodes

  32. Sparsification Update

  33. Sparsification Update (involves only one child)

  34. Sparsification Update (involves only one child)

  35. Sparsification Update (involves only one child)

  36. Sparsification Update (involves only one child)

  37. Sparsification Update (involves only one child)

  38. Sparsification Update (involves only one child)

  39. Sparsification Update (involves only one child)

  40. Sparsification Update (involves only one child)

  41. Sparsification Update (involves only one child)

  42. Sparsification Update (involves only one child)

  43. Sparsification Update (involves only one child)

  44. Sparsification Update (involves only one child)

  45. Sparsification Propagate change up log 2 m/n Update time = (log m/n )*(cost for m < 2n ) With some extra care, the log can be chopped: update time = (cost for m < 2n )

  46. Certificates Property you need for certificates Given property P , a strong certificate for P in G = (V,E) is a graph C such that: (i) V(C) = V(G) and (ii) For any H, G ∪ H has property P iff C ∪ H has P

  47. Sparsification Provided that one can find sparse certificates with the right property, by using sparsification: Static algorithm with running time f(m,n) yields dynamic algorithm with update time f(n) Dynamic algorithm with update time f(m,n) yields dynamic algorithm with update time f(n)

  48. Holm et al. (Dynamic decomposition) Query O(log n) Update O(log 2 n) 48

  49. How do we find out whether there is a “replacement” edge for the forest or it really got disconnected ? For dynamic MSF it is not enough to find a repacement edge, we need to find the best replacement edge 49

  50. To find a replacement, need to traverse one of the trees, which can be quite expensive. Randomization [Henzinger, King]: sample non-tree edges in smaller tree If sampling fails, push “sparse cut” to upper level Can we do this deterministically? 50

  51. Look in the smaller tree: ‘ tree edge ‘ no replacement - replacement Wish to gain something (in amortized sense) by accumulating information as we do that 51

  52. Each edge has a level 52

  53. 1 Each edge has a level 1 1 1 Increase the 1 1 level of the edges in the 1 smaller tree… 53

  54. 1 Each edge has 1 a level 1 1 1 1 Increase the 1 1 level of the edges in the 1 smaller tree… … and of any edge discovered not to be a “replacement” 54

  55. 1 Each edge has 1 a level 1 1 1 1 Increase the 1 1 level of the edges in the 1 smaller tree… … and of any edge discovered not to be a “replacement” until you find a “replacement” 55

  56. 1 1 1 1 1 1 1 1 1 56

  57. 1 1 1 1 1 Intuition: 1 Next time you 1 1 have to look again for a 1 replacement… 57

  58. 1 1 1 1 1 Intuition: 1 Next time you 1 1 have to look 1 again for a 1 replacement… … no need to look at non-tree edges with label 1! 58

  59. 1 1 1 1 1 Intuition: 1 Next time you 1 1 have to look 1 again for a 1 replacement… … no need to look at non-tree edges with label 1! 59

  60. 1 1 1 1 1 1 1 1 1 1 60

  61. Keep on doing 1 that upon edge 1 deletions 1 1 1 1 1 1 1 1 61

  62. Keep on doing 1 that upon edge 1 deletions 1 1 1 1 1 1 1 62

  63. Keep on doing 2 that upon edge 1 deletions 2 1 1 Again, 1 increase the 1 level of the 1 1 edges in the smaller tree… 63

  64. Keep on doing 2 that upon edge 2 deletions 2 1 1 Again, 1 increase the 1 level of the 1 1 edges in the smaller tree… … and of any edge discovered not to be a “replacement” 64

  65. Keep on doing 2 that upon edge 2 deletions 2 1 1 Again, 1 increase the 1 level of the 1 1 edges in the smaller tree… … and of any edge discovered not to be a “replacement” until you find a “replacement” 65

  66. Keep on doing 2 that upon edge 2 deletions 2 1 1 Again, 1 increase the 1 level of the 1 1 edges in the smaller tree… … and of any edge discovered not to be a “replacement” until you find a “replacement” 66

  67. Terminology G is the dynamic graph. F is a spanning forest of G. An edge is either a tree edge or a non-tree edge. Each edge has a level ℓ . G ℓ is subgraph of G induced by edges of level ≥ ℓ . G max ⊆ … ⊆ G ℓ ⊆ … ⊆ G 2 ⊆ G 1 ⊆ G 0 = G F ℓ is subforest of F induced by edges of level ≥ ℓ . F max ⊆ … ⊆ F ℓ ⊆ … ⊆ F 2 ⊆ F 1 ⊆ F 0 = F 67

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend