English

Anarchy in the APSP: Algorithm and Hardness for Incorrect Implementation of Floyd-Warshall

Data Structures and Algorithms 2024-06-06 v1

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.

Keywords

Cite

@article{arxiv.2404.08173,
  title  = {Anarchy in the APSP: Algorithm and Hardness for Incorrect Implementation of Floyd-Warshall},
  author = {Jaehyun Koo},
  journal= {arXiv preprint arXiv:2404.08173},
  year   = {2024}
}

Comments

To appear in FUN 2024

R2 v1 2026-06-28T15:52:01.284Z