In Sheldor's empire, the cities form a tree with cities as vertices and roads as edges. He wishes to choose a capital among his cities and to do that, his ministers come up with the following definition:
Sheldor wishes to choose a city which is the least eccentric. What is the maximum number of such cities that could exist?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The answer is 2 .
First, we will show that 2 is attainable.
This should be obvious, just imagine a symmetric case, or even more obvious, there are only two cities.
Next, we will show that if there are (at least) 2 such cities, they must be adjacent to each other.
With the assumption of being a tree, this proves that there are at most 2 such cities.
Let a , b has the least eccentricity e .
Notice that a , b cannot be leaves. If it were, that city it links to has less eccentricity.
Assume u , v are the most far away city for a , b respectively.
So e = distance ( a , u ) = distance ( b , v )
Further assume the contrary that a , b are not adjacent, so ∃ c between a and b .
By the definition of eccentricity, the path from u to v is like this:
u , ⋯ , b , ⋯ , c , ⋯ , a , ⋯ , v
It is now obvious that c has less eccentricity than a , b .
If u = v , Consider the linkage between a , b , u = v .
It must be one of the three cases: a ⋯ b ⋯ u , a ⋯ u ⋯ b , u ⋯ a ⋯ b .
For the middle one, u has less eccentricity than a , b .
For the other two, a and b has different eccentricity.
Contradiction.
The answer is 2 .