Abstract

Dijkstra's algorithm solves the single-source shortest path problem on any directed graph in O(m + n log n) time when a Fibonacci heap is used as the frontier set data structure. Here n is the number of vertices and m is the number of edges in the graph. If the graph is nearly acyclic, other algorithms can achieve a time complexity lower than that of Dijkstra's algorithm. Abuaiadh and Kingston gave an single source shortest path algorithm for nearly acyclic graphs with O(m + n log t) time complexity, where the new parameter, t, is the number of delete-min operations performed in priority queue manipulation. If the graph is nearly acyclic, then t is expected to be small, and the algorithm out-performs Dijkstra's algorithm. Takaoka, using a different definition for acyclicity, gave an algorithm with O(m + n log k) time complexity. In this algorithm, the new parameter, k, is the maximum cardinality of the strongly connected components in the graph.This paper presents two new shortest path algorithms for nearly acyclic graphs. The first is a generalised single source (GSS) algorithm for nearly acyclic graphs, which has a time complexity of O(m + n log r), where r is the number of trigger vertices, with trigger vertices defined as roots of trees that result when the graph is decomposed into trees. The second is a new all-pairs algorithm for nearly acyclic graphs, with O(mn + nr2) worst case time complexity, where r is the number of vertices in a pre-calculated feedback vertex set for the nearly acyclic graph. For certain graphs, these new algorithms offer an improvement on the time complexity of the previous algorithms. The new GSS algorithm can be used in Takaoka's algorithm, giving an improved hybrid algorithm.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call