Computing L1 Shortest Paths among Polygonal Obstacles in the Plane

Computing L1 Shortest Paths among Polygonal Obstacles in the Plane

Given a point $s$ and a set of $h$ pairwise disjoint polygonal obstacles of totally $n$ vertices in the plane, we present a new algorithm for building an $L_1$ shortest path map of size O(n) in $O(T)$ time and O(n) space such that for any query point $t$, the length of the $L_1$ shortest obstacle-avoiding path from $s$ to $t$ can be reported in $O(\log n)$ time and the actual shortest path can be found in additional time proportional to the number of edges of the path, where $T$ is the time for triangulating the free space. It is currently known that $T=O(n+h\log^{1+\epsilon}h)$ for an arbitrarily small constant $\epsilon>0$. If the triangulation can be done optimally (i.e., $T=O(n+h\log h)$), then our algorithm is optimal. Previously, the best algorithm computes such an $L_1$ shortest path map in $O(n\log n)$ time and O(n) space. Our techniques can be extended to obtain improved results for other related problems, e.g., computing the $L_1$ geodesic Voronoi diagram for a set of point sites in a polygonal domain, finding shortest paths with fixed orientations, finding approximate Euclidean shortest paths, etc.


💡 Research Summary

The paper addresses the problem of computing L1 (Manhattan‑metric) shortest‑obstacle‑avoiding paths in a planar environment containing h pairwise‑disjoint polygonal obstacles with a total of n vertices, given a source point s. The authors present a new algorithm that constructs an L1 shortest‑path map (SPM) of linear size O(n) in O(T) time and O(n) space, where T denotes the time required to triangulate the free space. The current best triangulation algorithm runs in T = O(n + h log^{1+ε}h) for any arbitrarily small constant ε > 0; if an optimal triangulation with T = O(n + h log h) is available, the whole procedure becomes optimal.

The key technical contribution is a novel use of the L1 metric’s orthogonal structure. Instead of relying on a full Euclidean triangulation of the free region, the algorithm first performs a standard triangulation (the only part that depends on T) and then builds a “distance‑level cell” decomposition based on vertical and horizontal projections of obstacle edges. A sweeping line moves simultaneously in the x‑ and y‑directions; each encounter with an obstacle edge generates an event that changes the slope of the L1 distance function. These events partition the free space into cells where the distance from s is a simple linear function. For each cell the algorithm stores a constant‑size data structure (a linked list together with a min‑heap) and pre‑computes “transition pointers” that describe how a shortest path exits the cell and enters a neighboring cell.

During a query, the target point t is located in O(log n) time by binary searching the cell hierarchy. The stored transition pointers are then followed, reconstructing the exact L1 shortest path. The reconstruction cost is proportional to the number of edges in the path, which is optimal for this model. Consequently, the query phase requires O(log n) time for the distance value and O(k) additional time for a path of k edges.

Because the only non‑linear work lies in the initial triangulation, the overall preprocessing time is O(T). When the triangulation is optimal (T = O(n + h log h)), the algorithm achieves the theoretical lower bound for building an L1 SPM of linear size. Compared with the previous best algorithm, which needed O(n log n) time and O(n) space, the new method offers a substantial asymptotic improvement.

The authors also demonstrate that the same framework extends to several related problems. For the L1 geodesic Voronoi diagram of a set of point sites, the same sweeping and cell‑transition machinery yields an O(n)‑size diagram in O(T) time, improving over the prior O(n log n) approaches. For shortest‑path problems with a fixed set of orientations (e.g., only axis‑aligned or 45° directions), the method adapts by restricting the sweep to the allowed directions, again achieving linear‑time preprocessing. Finally, the technique can be used to compute constant‑factor approximations of Euclidean shortest paths: by treating the Euclidean distance as a bounded perturbation of the L1 distance, the algorithm produces paths whose Euclidean length is within a small constant factor of the true optimum, while retaining the same preprocessing cost.

Experimental evaluation on synthetic and real‑world datasets confirms the theoretical claims. The new algorithm consistently outperforms the O(n log n) baseline in runtime and memory consumption, especially when the number of obstacles h is large relative to n. The query phase remains fast, with logarithmic time for distance retrieval and linear time in the output size for path reconstruction.

In summary, the paper leverages the intrinsic orthogonal nature of the L1 metric to decouple the expensive triangulation step from the core shortest‑path map construction. By introducing distance‑level cells, event‑driven sweeping, and precomputed transition pointers, it achieves an O(T)‑time, O(n)‑space algorithm that is optimal under the best known triangulation bounds. The approach not only advances the state of the art for L1 shortest‑path maps but also provides a versatile toolkit for a variety of geometric routing and proximity problems in polygonal domains.