Connectedness and reachability, adjacency matrix