Skip to main content


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

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


Served by Apache on Linux on seL4.