Solution:
The condition of the problem gives us 0⩽(di−1)(2010−di) for all i, i.e. di2⩽2011di−2010. Using the condition ∑i=1ndi=2m, by summing these inequalities we obtain
i=1∑ndi2⩽2011⋅i=1∑ndi−2010n=4022m−2010n
and equality holds if and only if di∈{1,2010} for every i∈{1,2,…,n}.
1∘ Let n=2k,k∈N. If we establish an airline route between cities i and j if and only if ∣j−i∣=k, we have di=1 for all i.
2∘ Let n=2k−1,k∈N. It cannot be that di=1 for all i, because otherwise we would have 2m=n=2k−1. Therefore it must be that dj=2010 for some j; hence n⩾2011. On the other hand, establishing an airline route between cities 1 and i (1≤i≤2010) and between cities 2i and 2i+1 (i=1006,…,k) gives a network in which d1=2010 and di=1 for 2⩽i⩽n.
Therefore, equality can be attained if 2∣n, or 2∤n and n≥2011.