For two nodes x and y of a graph G, the distance δG(x,y) is the smallest integer k such that k edges form a path from x to y; δG(x, x) = 0, and δG(x,y) = ∞ when x ≠ y and there is no path from x to y. The diameter δG
is the maximum of δG
(x, y) as x and y range over the nodes of G. When G is connected, δ(G) is the smallest integer k such that any two nodes of G can be joined by a path formed from at most k edges. When G is not connected, δ(G) = ∞ and there is interest in δc(G), the maximum of δ(G) over the components C of G.
For 2 ≧ n < ∞ and 0 ≧ E ≧ n(n − l)/2, let denote the set of all loopless undirected graphs with the node-set {1, …, n} and exactly E edges.