reachability function

Find the Reachability Matrix of a Graph