Let be a natural number. In the country there are cities and every two of them are connected by a direct road. We enumerate roads with numbers (we can assign the same number to several roads, even if they are going from the same city), where is a natural number. The ID of a city is a sum of numbers assigned to roads which are going from it. Find the smallest such that it is possible to enumerate the roads in such way that ID's of the cities are all distinct.
Solution
We will show that for every .
Firstly we show that . It is clear that , so suppose that . We have cities, and the possible numbers for the sum of numbers assigned to roads going out from the given city are (the smallest possible sum is and the largest is ). Since there are exactly of them, every number is ID for some city. But it means that there is a city with every road having a number and a city with every road having a number . But this is a contradiction since these cities are connected.
Now we will show that we can enumerate the roads with numbers such that the condition will be satisfied. Suppose that . We will construct our enumeration in steps. To all roads from the first city assign the number . Do the same with the second but assign the number to the road going to the -th city. For the third city assign to , -th cities. Continue this operation to the -th city. Then the situation is: cities have the ID respectively (and we have finished assigning the number to their roads) and the cities have the ID's respectively. So now it suffices to assign number to every road between cities and it is easy to see that all ID's are different. For the odd we use a very similar argument.