Determine if there is a path between any two vertices