We present an implementation and experimental analysis of the deterministic algorithm proposed by Duan et al. (2025) for the Single-Source Shortest Path (SSSP) problem, which achieves the best-known asymptotic upper bound of $O(m \log^{2/3} n)$. We provide a worst-case C++ implementation of this algorithm utilizing $O(n \log^{1/3} n)$ space, as well as a variant that reduces memory usage to $O(n)$ while maintaining the same time complexity in expectation. We compare these implementations against Dijkstra's algorithm on sparse random graphs, grids, and U.S. road networks with up to 10 million vertices. Our results show that while the implementations adhere to their theoretical complexity bounds, large constant factors hinder their practical utility; Dijkstra's algorithm remains 3 to 4 times faster in all tested scenarios. Furthermore, we estimate that the number of vertices would need to vastly exceed $10^{67}$ for the worst-case implementation to outperform Dijkstra's. These findings suggest that a substantial reduction in constant factors is required before this theoretical breakthrough can displace established methods in practical applications.
翻译:本文介绍了Duan等人(2025)针对单源最短路径(SSSP)问题提出的确定性算法的实现与实验分析,该算法达到了已知最佳渐近上界$O(m \log^{2/3} n)$。我们提供了该算法的最坏情况C++实现,其空间复杂度为$O(n \log^{1/3} n)$,以及一个内存使用降低至$O(n)$的变体,该变体在期望意义上保持相同的时间复杂度。我们将这些实现与Dijkstra算法在稀疏随机图、网格图以及包含多达1000万个顶点的美国道路网络上进行了对比。实验结果表明,尽管这些实现符合其理论复杂度界限,但较大的常数因子限制了其实用性;在所有测试场景中,Dijkstra算法的运行速度仍快3至4倍。此外,我们估计需要顶点数量远超$10^{67}$,最坏情况实现才可能超越Dijkstra算法。这些发现表明,在这一理论突破能够取代实际应用中的现有方法之前,必须大幅降低其常数因子。