Trustworthy Systems

Dijkstra, Floyd and Warshall meet Kleene


Peter Hoefner and Bernhard Möller


Universitaet Augsburg


Around 1960, Dijkstra, Floyd and Warshall published papers on algorithms for solving single-source and all-sources shortest path problems, respectively. These algorithms, nowadays named after their inventors, are well known and well established. This paper sheds an algebraic light on these algorithms. We combine the shortest path problems with Kleene algebra, also known as Conway's regular algebra. This view yields a purely algebraic version of Dijkstra's shortest path algorithm and the one by Floyd/Warshall. Moreover, the algebraic abstraction yields applications of these algorithms to structures different from graphs and pinpoints the mathematical requirements on the underlying cost algebra that ensure their correctness.

BibTeX Entry

    author           = {H\"ofner, Peter and M\"oller, Bernhard},
    doi              = {10.1007/s00165-012-0245-4},
    journal          = {Formal Aspects of Computing (FAOC)},
    month            = jul,
    number           = {4-6},
    pages            = {459--476},
    paperurl         = {},
    title            = {{Dijkstra}, {Floyd} and {Warshall} Meet {Kleene}},
    volume           = {24},
    year             = {2012}