Graph Algorithms

Answer & solution
Answer: D (no official key was published)
Warshall’s algorithm considers each possible intermediate vertex k and updates reachability R[i, j]←R[i, j]∨(R[i, k]∧R[k, j]) for every i, j. Its three nested loops take O(n³), D. Faster algebraic algorithms exist; the question asks a known upper bound, not a tight lower bound. The other listed bounds are subquadratic and cannot explicitly output every entry of an arbitrary n×n closure matrix.
Warshall’s algorithm loops over intermediate vertex k and every ordered pair(i, j), updating reachability using i→k→j. There are n choices in each loop, giving O(n³). This is a known upper bound, not a proof that faster algebraic methods are impossible. An explicitly written arbitrary n×n closure has quadratic output size, so the three listed subquadratic alternatives cannot generally output the full matrix.