Which is the diameter of $G$?

40 Views Asked by At

All the citizens of a country,of which the alphabet has $10$ letters have as a name a word of length exactly $6$. The number of the citizens is $10^6$ and all of them have different names.If $G$ is the graph with vertices the citizens and $2$ citizens are connected with an edge if and only if their names differ exactly at one position,which is the diameter of $G$ ?

1

There are 1 best solutions below

1
On BEST ANSWER

Suppose that the alphabet is $\{0,1,2,\ldots,9\}$. Distance between $111 111$ and $222 222$ is clearly six. Moreover, the distance between any two names is the number of letters that they have different, so can't be more than six. Hence, the diameter of the graph is $6$.