There are cities in a country and between any two cities and , there is either a one way road from to , or a one way road from to (but never both). Assume the roads are built such that it is possible to get from any city to any other city through these roads, and define to be the minimum number of roads you must go through to go from city to . Consider all possible ways to build the roads. Find the minimum possible average value of over all possible ordered pairs of distinct cities in the country.
Problem 1664
Official solution
The answer is for and for .
Note that for any distinct cities and , exactly one of and is , while the other is at least . Thus it follows that . The average for this pair is at least . Therefore, by considering all pairs of distinct cities, the average must be at least . Equality holds if and only if for all pairs of cities and .
Now we show that this average is attainable for by induction.
First of all, when , the average is attainable if there is a road from to , to , to .
For , consider the map given by the following table:
| | A | B | C | D | E | F |
|---|---|---|---|---|---|---|
| A | 0 | 1 | 1 | 1 | 0 | 0 |
| B | 0 | 0 | 1 | 0 | 1 | 1 |
| C | 0 | 0 | 0 | 1 | 1 | 1 |
| D | 0 | 1 | 0 | 0 | 0 | 1 |
| E | 1 | 0 | 0 | 1 | 0 | 0 |
| F | 1 | 0 | 0 | 0 | 1 | 0 |
(Here a ‘1’ in the -entry indicates a road from to , etc., while a ‘0’ in the -entry indicates no direct road from to , etc.). Using the table, we get the distance table:
| | A | B | C | D | E | F |
|---|---|---|---|---|---|---|
| A | 0 | 1 | 1 | 1 | 2 | 2 |
| B | 2 | 0 | 1 | 2 | 1 | 1 |
| C | 2 | 2 | 0 | 1 | 1 | 1 |
| D | 2 | 1 | 2 | 0 | 2 | 1 |
| E | 1 | 2 | 2 | 1 | 0 | 2 |
| F | 1 | 2 | 2 | 2 | 1 | 0 |
So for each pair of distinct cities and .
Assume when , the average is attainable. Now, consider the case . Label the cities by . By our assumption, there exists a way to build roads between such that for all . We build a road from to for all , a road from to for all , and a road from to . Thus,
Therefore, we see this road map produces an average distance of between any two cities.
By induction, the minimum average is attainable for all except .
We first show that the average of is unattainable. Suppose on the contrary that this average is attainable. Let the four cities be . Without loss of generality, assume there is a road from to and a road from to . Since the distance from to is , there must be a road from to , and a road from to . Similarly, there must be a road from to . We may assume there is a road from to . But then the distance from to is . This is a contradiction.
The next smallest possible average is . The above construction actually attains an average of . Thus the minimum average of is for . This completes the proof.