Multiple choice

The time complexity of computing the transitive closure of a binary relation on a set of n elements is known to be

  1. O (n)

  2. O (nlog n)

  3. O (n3/2)

  4. O (n3)

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Wordshall's algorithm might be used for calculation transitive closure of a set with a elements. This algorithm has complexity 0(n3) In transitive closure two binary relations are there 4 both ranges are the same set. The require three for loops so 0(n3).