Maths Olympiad Prep

Library / /22 of 26

Combinatorics Difficulty 5.3 AIME, harder Prove it United States

Problem:
Let AA be a set of size 20232023. Find the maximum number of pairs of elements x,yAx, y \in A so that xyx-y is a power of ee.

Solution

Solution:
Let ana_{n} be the maximum possible number of such pairs for a set of size nn. Let s2(n)s_{2}(n) be the number of ones in nn's binary representation. Let S(n)=k=0n1s2(k)S(n)=\sum_{k=0}^{n-1} s_{2}(k). We show that an=S(n)a_{n}=S(n).

For the construction, we can take the binary representations of all numbers from 00 to n1n-1, and interpret them as numbers "base ee". Every xx corresponding to some integer 0k<n0 \leq k < n then has s2(k)s_{2}(k) working values of yy, corresponding to all ways to replace a 11 with a 00 in kk's binary representation.

For optimality, we use strong induction. The base case of n=1n=1 holds as a1=0=s2(0)a_{1}=0=s_{2}(0).

Now assume n>1n>1. If AA has no working pairs x,yx, y, we are done. Otherwise, let tt be an integer so that there is at least one pair x,yAx, y \in A so that xy=etx-y=e^{t}.

Let GG be the graph of such pairs in AA. If GG is not connected, we can increase the number of edges of GG by shifting the vertices of one component of GG to create at least one edge to another component. Thus we can assume that all elements of AA are sums of powers of ee. For an element zAz \in A, let czc_{z} be the coefficient of ete^{t} in the representation of AA as a sum.

Let XX be the set of zz so that czcxc_{z} \geq c_{x} and let YY be the set of zz so that czcyc_{z} \leq c_{y}. Note that XY=AX \sqcup Y = A. By strong induction, there are at most aXa_{|X|} working pairs in XX, and at most aYa_{|Y|} pairs in YY. By definition of XX and YY, any pair between them can only have one possible difference, namely ete^{t}. Thus, there are at most min(X,Y)\min (|X|,|Y|) pairs between them.

Thus, we have the recurrence anmaxX+Y=n(aX+aY)+min(X,Y)a_{n} \leq \max_{X+Y=n}\left(a_{X}+a_{Y}\right)+\min (X, Y). It thus suffices to show that if YXY \geq X, S(X+Y)S(Y)S(X)+XS(X+Y)-S(Y) \geq S(X)+X, which expands to
k=YY+X1s2(k)k=0X1(1+s2(k)). \sum_{k=Y}^{Y+X-1} s_{2}(k) \geq \sum_{k=0}^{X-1}\left(1+s_{2}(k)\right).
An exercise to the interested reader is to show this by strong induction on XX.

Now it remains to evaluate S(2023)S(2023). By linearity of expectation, S(2048)S(2048) is equal to 204811/22048 \cdot 11 / 2. For every number from 2032=2048162032=2048-16 to 20482048, 77 digits must be 11 and the remaining four each have a half chance of being 11, giving S(2048)S(2032)=16(7+4/2)S(2048)-S(2032)=16 \cdot(7+4 / 2). Similarly S(2032)S(2024)=8(7+3/2)S(2032)-S(2024)=8 \cdot(7+3 / 2), S(2024)S(2023)S(2024)-S(2023) is just the number of ones in 2023=1111110011122023=11111100111_{2} is 99. Thus the answer is
204811/216(7+4/2)8(7+3/2)9=11043. 2048 \cdot 11 / 2 - 16 \cdot (7+4/2) - 8 \cdot (7+3/2) - 9 = 11043.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.