transClos function

Transitive closure of a graph