Introduction
Finding the shortest path between two points is a foundational problem in computer science, powering applications from global navigation systems to robotic motion planning. Traditionally, this is addressed via search-based methods like Dijkstra or database-driven methods like Compressed Path Databases (CPDs). While search-based methods can be slow on large graphs, CPDs suffer from prohibitive construction costs and linear query scaling for path extraction. This paper introduces CH-CPD, a hybrid approach that combines the graph-thinning power of Contraction Hierarchies (CH) with the "first-move" efficiency of CPDs to overcome these limitations.
The Bottlenecks of Pathfinding
CPDs precompute the "first move" for every possible start-target pair. However, for a graph with millions of nodes, the all-pairs shortest path computation required for construction is often computationally infeasible ($O(V^2)$). Furthermore, extracting a full path requires one database lookup per edge; for long routes, this overhead accumulates, significantly slowing down query times compared to simple distance lookups.
Methodology: The CH-CPD Framework
CH-CPD integrates these two worlds through three key innovations designed to reduce both construction time and query latency:
- CH-Paths in Dijkstra: Preprocessing is modified to follow "Up-Then-Down" paths, ensuring the CPD is built specifically to work with the hierarchical structure of a contracted graph.
- Distance Table Caching: By precomputing distance tables for a small fraction (e.g., 0.5%) of the most important nodes in the hierarchy, the algorithm can prune thousands of redundant searches during database construction, reducing preprocessing time to about one-third on large maps.
- Partial CPDs & Bi-directional Search: Instead of storing first-move data for every node, data is only stored for a subset of high-level nodes. A new bi-directional A* search, guided by landmarks, searches "up" the hierarchy until it reaches a node covered by the CPD, which then bridges the remaining gap instantly.
Experimental Evaluation
The researchers evaluated CH-CPD using six road networks from the 9th DIMACS Implementation Challenge, including large-scale maps like the Northeast US (NE) and Florida (FLA).
Key Results
- Query Speed: CH-CPD consistently outperformed standard CPDs and CH. In large-scale maps like the Northeast US, it surpassed state-of-the-art hub labeling methods (PHL and SHP) for path retrieval.
- Storage Flexibility: By using a "Partial CH-CPD" (storing only the top 20% of nodes), the authors achieved a "sweet spot" where query times remained nearly as fast as a full CPD, but the storage footprint was significantly smaller than competing techniques.
Conclusion
CH-CPD represents a significant advancement in shortest-path algorithms by effectively leveraging graph hierarchy to compress path databases. While the performance gains are most pronounced in hierarchical graphs like road networks, the dramatic reduction in preprocessing time and query latency makes it a compelling solution for large-scale routing applications. Future work may explore different node ordering strategies to further optimize the preprocessing phase.
Summary updated