I want to calculate all-pairs shortest paths on a graph with roughly 50,000 nodes representing a city-wide road network. An answer to my previous question led me to Hiroki Yanagisawa's paper "A multi-source label-correcting algorithm for the all-pairs shortest paths problem" [IPDPS 2010] which is performing really well.

But what about updates? I couldn't produce a technique which can update the shortest paths quickly when the weight of an edge changes. On researching, I came across a paper "On Dynamic Shortest Path problems", which states that

Reductions that show that the incremental and decremental single-source shortest-paths problems, for weighted directed or undirected graphs, are, in a strong sense, at least as hard as the static all-pairs shortest-paths problem.

So the question is: Are there useful heuristic approaches to solve this problem?

  • 6
    I think that it is unfair to say “On researching through many papers finally concluded with …” without acknowledging the answer you received in your previous question which gave the reference to exactly the same paper. – Tsuyoshi Ito Jan 30 '12 at 17:14
  • The here link is to this question instead of the other. :-/ – Michel de Ruiter Jan 30 '12 at 22:27
  • 3
    Edited for clarity and grammar; fixed broken link to previous answer. – Jeffε Jan 31 '12 at 2:23
  • 3
    Perhaps this paper can help you: db.csail.mit.edu/pubs/cq_icde_cr.pdf – Marzio De Biasi Feb 1 '12 at 13:16

your question seems quite advanced and it seems unlikely anyone has considered the incremental problem for the particular algorithm you are implementing when the new nonincremental algorithm was published by Yanagisawa as recently as 2010.

the algorithm you cite is apparently designed to be parallelizable therefore that seems like the 1st approach to optimizing it. ie implement it in a highly parallel implementation and just recompute all paths.

I have not seen a paper describing this, but how about this approach which seems to work in theory & in general but details could be tricky (maybe it appears in a paper somewhere-- would be interested if anyone has seen a similar technique). every algorithm to solve the problem must basically reduce to a (2-way?) comparison of edge weights. the resulting paths are built out of the results of these comparisons. the "comparison tree" for every optimal path can be stored during the 1st computation of all pairs.

then when any weights are changed, traverse through all prior stored/built-up comparison trees to recompute the answer. probably, for small changes, one would not have to descend "deeply" into those trees because the results of some or "many" prior comparisons are unchanged. one may have to modify the trees if new "comparison paths" in the trees are triggered but again this might not be expensive. however there would be a threshold where it is simpler to recompute everything from scratch when there are too many weight changes.

the main question of course is the memory cost of storing all the comparison trees.

(fineprint: and if all this actually worked, it would likely be a significant advance & publishable result.)

And in what kinds of updates are you interested? Both weight increase and decrease? Obviously, it should not be hard to solve edge increases since such an update influences only those optimal paths containing the changed edge and it is not hard to recomputed them quickly (actually, it can be done even more efficiently). Weight decrease is harder case but it does not make sense in route planning practice (usually).

Anyway, if you are already using some route planning (all pairs shortest path) approach, you should look for its "dynamization". I would not consider heuristics since I am not aware of any good heuristic route planning algorithm.

So what kind of updates are we talking about?

  • Hello,Thanks for the reply.By updates I mean, both the increase & decrease. Basically every road has a score, depending upon the traffic at that edge,the score can decrease and increase. So the algorithm needs to adapt so that it can provide the shortest path considering the updates in all the shortest paths it has already found rather than re-finding all pair shortest paths.Can you please explain/provide link for the update part, I mean how would it be effective for all pairs? Secondly from the second para, apart from all pairs shortest path approach, can there be any other effective approach – Jatin Feb 1 '12 at 6:21

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.