1 / 21

Maintaining Shortest Paths in Digraphs with Arbitrary Arc Weights

Maintaining Shortest Paths in Digraphs with Arbitrary Arc Weights. C. Demetrescu D. Frigioni A. Marchetti-Spaccamela U. Nanni. University of Rome “La Sapienza”. Let:. G = (V,E,w). weighted directed graph. weight of edge (u,v). w(u,v)  . source node. s  V.

vangie
Download Presentation

Maintaining Shortest Paths in Digraphs with Arbitrary Arc Weights

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Maintaining Shortest Paths in Digraphs with Arbitrary Arc Weights C. Demetrescu D. Frigioni A. Marchetti-Spaccamela U. Nanni University of Rome “La Sapienza”

  2. Let: G = (V,E,w) weighted directed graph weight of edge (u,v) w(u,v)   source node s  V Perform intermixed sequence of operations: Increase weight w(u,v) by  Increase(u,v,): Decrease weight w(u,v) by  Decrease(u,v,): Return shortest path from s to v in G Query(v): Fully Dynamic Single-source Shortest Paths

  3. A Simple-minded Method After each Increase or Decrease: use best static algorithm [Bellman-Ford] to recompute from scratch shortest paths in G  O(m·n) worst-case time ( n=|V|, m=|E| ) Can we do any better?

  4. Use a reweighting technique to obtain from G a new graph G* with nonnegative weights 1. O(m) Perform Dijkstra’salgorithm to compute from scratch shortest paths in G* 2. O(m+n·log n) Retrieve shortest paths in G from shortest paths in G* 3. O(n) O(m·n) O(m+n·log n) Thus: An Asymptotically Faster Method After each Increase or Decrease:

  5. G = (V,E,w) w : E   Reweighting h : V   (arbitrary) G*= (V,E,w*) w*(u,v) = w(u,v) + h(u) - h(v) Lemma 1: p is a shortest path in G p is a shortest path in G* A Reweighting Technique [Edmonds, Karp]

  6. If we choose: h(v) := d(v) = distance from s to v Lemma 2: w*(u,v) = w(u,v) + d(u) - d(v) ≥ 0 Proof: d(v) ≤ w(u,v) + d(u) [Bellman] 0 ≤ w(u,v) + d(u) - d(v) A Reweighting Technique [Ramalingam and Reps]

  7. Weight decrease [Ramalingam and Reps] Decreasing the weight of an edge might allow to find better paths out of T(v) Ramalingam and Reps: apply Dijkstra’s alg. to the graph G* (with modified weights) u -e v T(v)

  8. Weight decrease (cont.) There exists a negat. cycle if and only if v is labelled again u Ideas of ownership and k-bounded account. fct. can be applied reducing w.c.running time v T(v)

  9. Heuristic: Dijkstra only on nodes in T(v) Output bounded: Dijkstra only on nodes which change distance Weight increase: Output Bounded Analysis Increase(u,v,+e) +e

  10. BF Simple-minded method [Bellman-Ford] O(m·n) DF Reweighting method + Heuristic O(m+n·log n) Reweighting method + Output Bounded RR (Does not deal with zero length cycles) O(m+n·log n) [Ramalingam, Reps] Reweighting method + Output Bounded DFMN O(m+n·log n) [Frigioni, Marchetti, Nanni] Algorithms Under Evaluation Updatetime Name Technique

  11. DF vs RR/DFMN Increase: L  nodes in T(v) Heuristic RR/DFMN Remove from L nodes which don’t change distance DF Output- Bounded Compute G* induced by nodes in L Reweighting Run Dijkstra on G*

  12. We know that O(m+n·log n) isbetterthan O(m·n) ... 1 DFMN and RR are efficient in output-bounded complexity ... 2 Goals of Experimentation Look for hints about questions like: … but what about constant factors? …but is it useful in practice?

  13. Increase: L  nodes in T(v) Heuristic RR/DFMN Is it useful? Remove from L nodes which don’t change distance DF Output- Bounded Compute G* induced by nodes in L Reweighting Run Dijkstra on G* DF vs RR/DFMN Increase: L  nodes in T(v) Heuristic RR/DFMN Remove from L nodes which don’t change distance DF Output- Bounded Compute G* induced by nodes in L Reweighting Run Dijkstra on G*

  14. Experimental platform: - C++ using LEDA, g++ compiler - UNIX Solaris on SPARC Ultra 10 at 300 Mhz Test sets: - Random graphs & random update sequences (Use potentials technique to avoid negative and zero-length cycles) Performance indicators: - Running time (msec) - # nodes processed by Dijkstra’s algorithm Experimental Setup

  15. Constant Factors Are Small

  16. # Nodes Processed by Dijkstra’s Algo

  17. k The Range of Arc Weights Is Important

  18. Small Arc Weights Range

  19. Large Arc Weights Range

  20. Extreme Case: All Zero-length Cycles...

  21. Conclusions Dynamic algorithms based on the reweighting technique are very useful In general, the simpler, the faster Output bounded is useful for small ranges of arc weights What happens on real test sets? What happens on larger test sets?

More Related