, Volume 19, Issue 2, pp 161-166
Date: 25 Sep 2012

Parallel transitive closure algorithm

Rent the article at a discount

Rent now

* Final gross prices may vary according to local VAT.

Get Access


Using the BSP/CGM model, with \(p\) processors, where \(p \ll n\) , we present a parallel algorithm to compute the transitive closure of a digraph \(D\) with \(n\) vertices and \(m\) edges. Our algorithm uses \(\log p + 1\) communication rounds if the input is an acyclic directed graph labeled using a linear extension. For general digraphs, the algorithm requires \(p\) communication rounds in the worst case. In both cases, \(O(M/p)\) local computation is performed per round, where \(M\) is the amount of computation needed to compute a sequential transitive closure of a digraph. The presented algorithm can be implemented using any sequential algorithm that computes the transitive closure of a digraph \(D\) . We have implemented the algorithm using the Warshall transitive closure algorithm on two Beowulf clusters using MPI. The implementation results show its efficiency and scalability. It also compares favorably with other parallel implementations. The worst case (communication rounds) for a digraph was derived through an artificially elaborated example. However, in all our test cases, the algorithm never requires more than \(\log p + 1\) communication rounds and presents very promising implementation results. The algorithm also can be applied to any \(n \times n\) matrix that represents a binary relation.

This work was partially supported by CNPq Proc. Nos. 30.1652/09-0, and CNPq, FUNDECT-MS and CAPES.