In terms of runtime, what is the best known transitive closure algorithm for directed graphs?
I am currently using Warshall's algorithm but its O(n^3). Although, due to the graph representation my implementation does slightly better (instead of checking all edges, it only checks all out going edges). Is there any transitive closure algorithm which is better than this? In particular, is there anything specifically for shared memory multi-threaded architectures?
This paper discusses the performance of various transitive closure algorithms:
http://www.vldb.org/conf/1988/P382.PDF
One interesting idea from the paper is to avoid recomputing the entire closure as the graph changes.
There is also this page by Esko Nuutila, which lists a couple of more recent algorithms:
http://www.cs.hut.fi/~enu/tc.html
His PhD thesis listed on that page may be the best place to start:
http://www.cs.hut.fi/~enu/thesis.html
From that page:
The experiments also indicate that with the interval representation and the new algorithms, the transitive closure can be computed typically in time linear to the size of the input graph.
The Algorithm Design manual has some useful information. Key points:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With