# A practical Single Source Shortest Path algorithm for random directed graphs with arbitrary weight in expecting linear time

In this paper we present a new algorithm called Raffica algorithm for Single Source Shortest Path. In random graph, this algorithm has Θ(M) time complexity. And for random grid graphs with Θ(N) hop-diameter, it is also linear. This algorithm can solve SSSP with arbitrary weights; when a negative cycle exists, this algorithm can find it out costing O(M). It means we can use it to solve random System of Difference Constraints fast as Θ(M) in expect. Using the idea, we can prove the expecting time complexity of queue optimized Bellman-Ford Algorithm, which is usually called SPFA, is Θ(MD) time complexity in expect, where D = O( N M/N) is the expecting hop-diameter, unlike the claim O(M) of Duan's.

READ FULL TEXT