Maths Olympiad Prep

Track / Stage 8 / 147 of 180 #1847 of 1964

Problem 1847

IMO Shortlist mid-range; USAMO P2/P5
Number theory Difficulty 8.6 Prove it 75th NMO Selection Tests · Romania

Let k,nNk, n \in \mathbb{N}^* and let AA be an arbitrary set of 2n2n positive integers. For each aAa \in A, denote by pap_a the number of elements in the set Pa={bAbak(mod2k)}P_a = \{b \in A \mid b - a \equiv k \pmod{2k}\}. Determine the maximum possible value of the sum EA=aApa2E_A = \sum_{a \in A} p_a^2, when AA runs over all subsets of size 2n2n of N\mathbb{N}^*.
Cristi Săvescu

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Official solution

Let us denote by Ai={aAai(mod2k)}A_i = \{a \in A \mid a \equiv i \pmod{2k}\} and by ai=Aia_i = |A_i| for each i=0,,2k1i = 0, \dots, 2k-1. Observe that A=i=02k1AiA = \bigcup_{i=0}^{2k-1} A_i, where AiAj=A_i \cap A_j = \emptyset for iji \neq j, and therefore 2n=i=02k1ai2n = \sum_{i=0}^{2k-1} a_i.

For any aAia \in A_i, we have
Pa={bAbak(mod2k)}={bAbk+i(mod2k)}=Ak+i, P_a = \{b \in A \mid b - a \equiv k \pmod{2k}\} = \{b \in A \mid b \equiv k + i \pmod{2k}\} = A_{k+i},
where the index k+ik + i is considered modulo 2k2k. Hence, pa=ak+ip_a = a_{k+i}, for every aAia \in A_i.

Thus,
EA=aApa2=i=02k1aAipa2=i=02k1aiak+i2=i=0k1aiak+i2+i=k2k1aiak+i2. E_A = \sum_{a \in A} p_a^2 = \sum_{i=0}^{2k-1} \sum_{a \in A_i} p_a^2 = \sum_{i=0}^{2k-1} a_i a_{k+i}^2 = \sum_{i=0}^{k-1} a_i a_{k+i}^2 + \sum_{i=k}^{2k-1} a_i a_{k+i}^2.
Since the indices are modulo 2k2k,
i=k2k1aiak+i2=i=0k1ak+iai2, \sum_{i=k}^{2k-1} a_i a_{k+i}^2 = \sum_{i=0}^{k-1} a_{k+i} a_i^2,
so we get
EA=i=0k1(aiak+i2+ak+iai2)=i=0k1aiak+i(ai+ak+i). E_A = \sum_{i=0}^{k-1} (a_i a_{k+i}^2 + a_{k+i} a_i^2) = \sum_{i=0}^{k-1} a_i a_{k+i} (a_i + a_{k+i}).

We want to maximize EAE_A under the constraint i=02k1ai=2n\sum_{i=0}^{2k-1} a_i = 2n.
Note that replacing any two distinct pairs (ai,ai+k)(a_i, a_{i+k}) and (aj,aj+k)(a_j, a_{j+k}) by (ai+aj,ai+k+aj+k)(a_i + a_j, a_{i+k} + a_{j+k}) and (0,0)(0, 0) does not decrease the value of EAE_A, because
Therefore, the maximum is achieved when only one pair (ai,ai+k)(a_i, a_{i+k}) is nonzero, with ai+ai+k=2na_i + a_{i+k} = 2n.

Using the inequality between arithmetic and geometric means, we have EA=aiai+k(ai+ai+k)(ai+ai+k)34=2n3E_A = a_i a_{i+k} (a_i + a_{i+k}) \le \frac{(a_i+a_{i+k})^3}{4} = 2n^3.
The maximum value 2n32n^3 is attained, for example, by any set AA having exactly nn multiples of 2k2k and nn numbers congruent to k(mod2k)k \pmod{2k}.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.