A Shortest Path Algorithm for Large Sparse Network and Its Implement
Chunmei Yuan · 2011
Shortest path algorithm has many important applications in transportation,communications,etc.Many problems arising from such networks may come down to a shortest path problems.On a network with nonnegative-length edges,Dijkstra's shortest path algorithm computes single-source shortest path in O(m+nlogn) time.The time bound assumes that a Fibonacci heap is used during the implementation of Dijkstra's algorithm.As the process of building heaps needs a little complex work,it makes the algorithm uneasy to be used.In this paper,we make use of the features of the large sparse network,make some very simple,but useful,changes in the original Dijkstra algorithm and obtain a new modified Dijkstra's shortest path algorithm for large sparse network.The new algorithm avoids the process of building heap and runs in O(m+nlog(n!)) time.Here m,n and D are the number of edges,vertices and the maximal number of edges incident with vertex,respectively.Thus,the new algorithm is very competitive for those sparse networks especially in road traffic networks in which D is often a small number.