A Very Fast, Practical Algorithm for Finding a Negative Cycle in a Digraph

Published: 1986, Last Modified: 09 May 2025ICALP 1986EveryoneRevisionsBibTeXCC BY-SA 4.0
Abstract: We present an algorithm which can find a negative cycle in a directed graph in worst case time O(n·e), where n is the number of nodes and e the number of edges, using only space O(n + e). Our algorithm is implemented on a pointer machine. Assuming that the input to our algorithm is a weighted random digraph, we prove that its average time complexity for dense graphs lies between O(n·logn) and O(min{n 2/log 2 n,e}), the exact value depending on the probability with which an edge is present in the random graph, and for sparse random graphs is Θ(n 2).
Loading