Transitive closure asks: can you reach vertex from vertex ?
You can adapt Floyd-Warshall: instead of minimizing distance, use boolean OR. Set reach[i][j] = true if there is a path from to . Update: reach[i][j] = reach[i][j] || (reach[i][k] && reach[k][j]). This computes reachability in time. It answers questions like "is there any path from to ?" without caring about distance.
Space complexity is for the data structures used.