The time complexity of computing the transitive closure of a binary relation on a set of $n$ elements is known to be:
$O(n)$
$O(n \log n)$
$O \left( n^{\frac{3}{2}} \right)$
$O\left(n^3\right)$
This might help....
This problem is similar to finding the reachability matrix of path length 2 for the graph , But In binary relation I think we don't have to multiply matrix n times ,A*A will give us all reachability matrix of length 2.So can we say that we can find Transitive closure of a binary relation in O(n^{2}) time?
The matrix of transitive closure of a relation on a set of n elements
can be found using n^{2}(2n-1)(n-1) + (n-1)n^{2} bit operations, which gives the time complexity of O(n^{4})
But using Warshall's Algorithm: Transitive Closure we can do it in O(n^{3}) bit operations
Hence D is the correct answer...
Transitive closure is computed by Floyd -Warshals algorithm, and the time complexity for this is equal to O(n^3) .
Gatecse
The answer to the first question is $2048 ...