Parent was suggesting a hash table lookup though, in which case the topology of the graph would be irrelevant. The number of entries in the table would be constant regardless of whether the original graph was connected with the fewest number of edges or with the greatest number of edges (a complete graph, which is what the table would be encoding).