Abstract

The paper considers variants of the Floyd – Warshall algorithm, i.e. algorithms for finding shortest paths in a weighted graph with given edge weights; in one execution of the algorithm, the lengths of shortest paths between all pairs of vertices are found. Although the standard versions of the algorithm do not return the paths found, these paths can be reconstructed using simple modifications of the algorithm. Variants of this algorithm can also be used to find the transitive closure of some binary relation, as well as the widest paths between all pairs of vertices of a weighted graph. At the same time, according to the authors, the study of the topic is far from complete; it is confirmed, in particular, by many publications on the Internet on “algorithmic” sites. Despite the fact that the cubic complexity of the algorithm for solving this problem is not improved (at least for standard input data representation options), one can strive to improve the specific running time of the algorithms. Moreover, we deliberately worsen the complexity of the algorithm implementations we are considering (actually multiplying it by the logarithm of the number of vertices); however, due to the possibility of a successful iteration of the edges, conducted in order of increasing their cost, we achieve a reduction in the average running time of the implemented programs.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call