Skip to main content
QUICK REVIEW

[Paper Review] A O(E) Time Shortest Path Algorithm For Non Negative Weighted Undirected Graphs

Muhammad Aasim Qureshi, Fadzil B. Hassan|ArXiv.org|Nov 2, 2009
Complexity and Algorithms in GraphsComputer Science11 references5 citations
TL;DR

This paper presents a linear-time O(E) shortest path algorithm for non-negative weighted and unweighted undirected graphs, focusing on computing the shortest path between a source and destination only. It uses a modified BFS-like approach with a queue and degree-based prioritization, achieving optimal efficiency without complex data structures, particularly excelling in sparse graphs where longer paths in edge count may yield shorter distances.

ABSTRACT

In most of the shortest path problems like vehicle routing problems and network routing problems, we only need an efficient path between two points source and destination, and it is not necessary to calculate the shortest path from source to all other nodes. This paper concentrates on this very idea and presents an algorithm for calculating shortest path for (i) nonnegative weighted undirected graphs (ii) unweighted undirected graphs. The algorithm completes its execution in O(E) for all graphs except few in which longer path (in terms of number of edges) from source to some node makes it best selection for that node. The main advantage of the algorithms is its simplicity and it does not need complex data structures for implementations.

Motivation & Objective

  • To develop a highly efficient shortest path algorithm tailored for source-destination pathfinding in non-negative weighted undirected graphs.
  • To eliminate the need for computing all-pairs shortest paths, focusing only on the path from source to destination.
  • To achieve linear time complexity O(E) without relying on advanced data structures like Fibonacci heaps.
  • To simplify implementation by using basic queue operations and degree-based node selection.
  • To handle both weighted and unweighted graphs with a unified, lightweight approach.

Proposed method

  • The algorithm uses a queue-based traversal similar to BFS, but with a priority heuristic based on node degree to guide exploration.
  • Nodes are processed in order of increasing degree, favoring nodes with lower degree to reduce path length in terms of edges.
  • For each node, the algorithm maintains the shortest known distance from the source and updates neighbors if a shorter path is found.
  • The algorithm terminates as soon as the destination node is dequeued, ensuring minimal computation.
  • It handles both unweighted and non-negative weighted graphs using a single framework with edge weight consideration during relaxation.
  • The use of a simple queue and degree-based ordering avoids the overhead of priority queues, enabling O(E) time complexity.

Experimental results

Research questions

  • RQ1Can a shortest path algorithm achieve O(E) time complexity for non-negative weighted undirected graphs by focusing only on source-destination paths?
  • RQ2Is it possible to eliminate the need for complex priority queues while maintaining linear time performance?
  • RQ3How does degree-based node ordering affect path quality and runtime in sparse graphs?
  • RQ4Can a single algorithm efficiently handle both weighted and unweighted undirected graphs with linear time complexity?
  • RQ5What is the impact of longer paths (in edge count) on the algorithm’s correctness and efficiency?

Key findings

  • The algorithm achieves O(E) time complexity for all graphs except a rare class where longer paths in edge count yield shorter distances.
  • The algorithm outperforms Dijkstra’s algorithm in practice for sparse graphs due to the absence of priority queue operations.
  • The method is simpler than traditional approaches, requiring only a basic queue and degree tracking, making it easier to implement.
  • The algorithm correctly computes the shortest path from source to destination in non-negative weighted undirected graphs.
  • The approach is effective for both weighted and unweighted graphs, with a unified implementation.
  • The algorithm's performance is optimal in terms of time complexity, matching the theoretical lower bound for linear-time graph traversal.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.