English

Incorrect implementations of the Floyd--Warshall algorithm give correct solutions after three repeats

Data Structures and Algorithms 2019-04-03 v1

Abstract

The Floyd--Warshall algorithm is a well-known algorithm for the all-pairs shortest path problem that is simply implemented by triply nested loops. In this study, we show that the incorrect implementations of the Floyd--Warshall algorithm that misorder the triply nested loops give correct solutions if these are repeated three times.

Cite

@article{arxiv.1904.01210,
  title  = {Incorrect implementations of the Floyd--Warshall algorithm give correct solutions after three repeats},
  author = {Ikumi Hide and Soh Kumabe and Takanori Maehara},
  journal= {arXiv preprint arXiv:1904.01210},
  year   = {2019}
}
R2 v1 2026-06-23T08:26:25.414Z