The country of Indiapolis has towns. Each pair of towns is connected by a one way road, i.e. given any two towns and , one can either directly travel from to or from to via that road but not both. A triple of towns is called good if one can directly travel from to , then from to , and then from to . Let be the maximum possible number of good triples of towns. Find the last three digits of .
Details and assumptions
- Each pair of cities are connected by exactly road.
- Traveling directly from city
to
means traveling from
to
via the road that connects them. The problem statement says that given two cities
and
, one can either directly travel from
to
or from
to
, but not both.
- You're not allowed to change roads when you're not in a city.
- This problem is not original.
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.
Let's solve this problem for all odd n ∈ N instead of 2 0 1 5 . Let the cities be C 1 , C 2 , ⋯ , C n , and for all 1 ≤ i ≤ n , let D i be the number of cities directly approachable from city C i .
Since the sum of good and non-good triples is always equal to ( 3 n ) , instead of trying to maximize the number of good triples of towns, we try to minimize the number of non-good triples of towns.
Note that in any non-good triple of towns, there must exist one town from which the other two towns can be directly reached. Call that town the pivot of that non-good triple. For example, if cities C 2 , C 3 can be reached from C 1 , { C 1 , C 2 , C 3 } forms a non-good triple with pivot C 1 .
Note that the number of non-good triples with pivot C i is equal to ( 2 D i ) . Hence, the total number of non-good triples is equal to i = 1 ∑ n ( 2 D i ) , and hence, the total number of good triples is equal to ( 3 n ) − i = 1 ∑ n ( 2 D i ) .
Now, note that I = 1 ∑ n D i = ( 2 n ) = 2 n ( n − 1 ) since both sides are equal to the total number of roads. By Cauchy Schwartz, ( 3 n ) − i = 1 ∑ n ( 2 D i ) = ( 3 n ) − 2 1 ( D i 2 − D i ) ≥ ( 3 n ) − 2 n 2 1 ( i = 1 ∑ n D i ) 2 − 2 1 i = 1 ∑ n D i = 2 4 n ( n − 1 ) ( n + 1 ) . Equality holds when exactly 2 n − 1 roads originate from each city.
We shall prove by a trivial induction that this is possible for all odd n .
For the base case n = 3 , just consider three cities which form a good triple.
Suppose such a construction exists for 2 k + 1 , so that each city has exactly k roads originating from it. Add two other cities, C 2 k + 2 and C 2 k + 3 so that cities C 1 , C 2 , ⋯ , C k and C 2 k + 3 can be directly reached from C 2 k + 2 and cities C k + 1 , C k + 2 , ⋯ , C 2 k + 1 can be directly reached from C 2 k + 3 - note that each city can now be reached from exactly k + 1 other cities, so we're done.
Hence, our answer is 2 4 n ( n − 1 ) ( n + 1 ) . For this particular case, our answer is 3 6 0 .
This problem is taken from a problem in a MOP red group homework problem.
Side problem : Suppose that each city is approachable from at least one other city. Prove that there must exist a good triple of cities.