2000 character limit reached
Anarchy in the APSP: Algorithm and Hardness for Incorrect Implementation of Floyd-Warshall (2404.08173v1)
Published 12 Apr 2024 in cs.DS
Abstract: The celebrated Floyd-Warshall algorithm efficiently computes the all-pairs shortest path, and its simplicity made it a staple in computer science classes. Frequently, students discover a variant of this Floyd-Warshall algorithm by mixing up the loop order, ending up with the incorrect APSP matrix. This paper considers a computational problem of computing this incorrect APSP matrix. We will propose efficient algorithms for this problem and prove that this incorrect variant is APSP-complete.
- Negative-weight single-source shortest paths in near-linear time: Now faster! In 2023 IEEE 64th Annual Symposium on Foundations of Computer Science (FOCS), pages 515–538, Los Alamitos, CA, USA, nov 2023. IEEE Computer Society.
- Introduction to algorithms. MIT press, 2022.
- Edsger W Dijkstra. A note on two problems in connexion with graphs. In Edsger Wybe Dijkstra: His Life, Work, and Legacy, pages 287–290. 2022.
- Robert W Floyd. Algorithm 97: shortest path. Communications of the ACM, 5(6):345, 1962.
- Fibonacci heaps and their uses in improved network optimization algorithms. J. ACM, 34(3):596–615, jul 1987.
- Stanley P. Y. Fung. Is this the simplest (and most surprising) sorting algorithm ever?, 2021.
- Incorrect implementations of the floyd–warshall algorithm give correct solutions after three repeats, 2019.
- Eric S Raymond. The new hacker’s dictionary. Mit Press, 1996.
- Stephen Warshall. A theorem on boolean matrices. J. ACM, 9(1):11–12, jan 1962.
- Subcubic equivalences between path, matrix, and triangle problems. J. ACM, 65(5), aug 2018.