Abstract
Finding the shortest path between two points in a plane containing polygonal obstacles is a fundamental problem in computational geometry. While time-optimal $O(n \log n)$ algorithms have existed for decades, they typically required $O(n \log n)$ space to maintain the evolving wavefront. This paper presents a refined "continuous Dijkstra" approach that achieves both $O(n \log n)$ time and $O(n)$ space complexity. By employing a phased-reset mechanism and compact snapshots, the algorithm eliminates the need for persistent data structures, settling a 20-year-old open problem.
Introduction
The problem of navigating a 2D plane filled with polygonal obstacles is central to robotics, motion planning, and geographic information systems (GIS). The goal is to find the shortest Euclidean path between a source $s$ and a target $t$ while avoiding $n$ obstacle vertices.
For over twenty years, the benchmark for this problem was the algorithm by Hershberger and Suri (1999). Their approach achieved the optimal $O(n \log n)$ time complexity but suffered from a $O(n \log n)$ space requirement. This memory overhead stems from the use of persistent data structures to track the "wavefront"—the set of points at a given distance from the source—as it propagates through the free space. In large-scale applications, this logarithmic memory factor can become a significant bottleneck. This work addresses the challenge of reducing space complexity to linear $O(n)$ without compromising time optimality.
Methodology: Continuous Dijkstra and Phased Resets
The algorithm builds upon the Hershberger-Suri (HS) algorithm, which simulates a wavefront expanding from a source point, bending around obstacle corners much like physical waves.
To achieve linear space, the author introduces three key innovations:
- Phased Execution and Snapshots: Instead of a continuous simulation that stores all historical data, the algorithm is divided into $O(\log n)$ discrete phases. At the end of each phase, the algorithm saves a "snapshot"—a compact representation of the current wavefront—and clears its intermediate memory.
- Linear-Space Snapshots: A critical geometric proof demonstrates that a wavefront snapshot at any time $t$ can be represented using only $O(n)$ space. This is achieved through the identification of "adjacent-generator-triples."
- Wavefront Restoration: Constructing the final Shortest Path Map (SPM)—which enables $O(\log n)$ time queries for any destination—traditionally requires the full history of the wavefront. The author introduces a "marking" rule for wavelet generators. By marking neighbors of key vertices, the algorithm can reconstruct necessary historical states on-the-fly, avoiding the storage of the entire propagation history.
Key Insights
The primary breakthrough lies in overcoming the persistence bottleneck. Previous methods relied on "fully persistent" binary trees, where every event in the simulation added $O(\log n)$ nodes. This paper demonstrates that "forgetfulness" is a virtue: by identifying the minimal information needed to resume a simulation (the snapshot), the algorithm proves that most historical data is redundant for future expansion. Furthermore, the realization that the SPM's topology is determined by the adjacency of obstacle vertices (generators) in the wavefront allows for the preservation of the map's "DNA" without storing every intermediate geometric state.
Results and Complexity
The proposed algorithm achieves $O(n \log n)$ time and $O(n)$ space, which is theoretically optimal within the algebraic computation tree model.
- Query Efficiency: Once the SPM is constructed, the distance to any query point can be determined in $O(\log n)$ time.
- Path Retrieval: The actual shortest path can be output in time proportional to the number of edges in the path.
- Generalization: The techniques are applicable to multiple sources (Geodesic Voronoi Diagrams) and non-point sources such as line segments or disks.
Conclusion and Future Directions
This work settles the 2D polygonal case, but several frontiers remain. The "snapshot" technique may be adaptable to obstacles with curved boundaries, which currently require $O(n \log n)$ space. Additionally, finding shortest paths on the surfaces of 3D convex polytopes faces similar space hurdles; adapting the phased-reset approach to 3D subdivision structures is a promising avenue for future research.
Summary updated