阅读背景:

Bellman-Ford最短路径算法的性能

来源:互联网 

I implemented the solution of Bellman - Ford algorithm with a queue and I compared its performance with the Dijkstra algorithm. They were pretty close and that was a surprise for me because the complexity of Bellman - Ford is O(NM). I know that the complexity is for the worst case, but still the result was surprising. I searched for some information about Bellman - Ford and I found only this statement in Sedgewick, Algorithms in Java "on real networks the Bellman–Ford algorithm typically runs in linear time". Could you give me an explanation of the Bellman - Ford algorithm performance behaviour?I implemented the solution of Bellman - Ford al




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: