IMO 2024 · Problem 6

Let \(\mathbb{Q}\) be the set of rational numbers. A function \(f:\mathbb{Q}\to\mathbb{Q}\) is called aquaesulian if the following property holds: for every \(x,y\in\mathbb{Q}\), \[ f(x+f(y))=f(x)+y \qquad\text{or}\qquad f(f(x)+y)=x+f(y). \] Show that there exists an integer \(c\) such that for any aquaesulian function \(f\) there are at most \(c\) different rational numbers of the form \(f(r)+f(-r)\) for some rational number \(r\), and find the smallest possible value of \(c\).

Official text of the problem. Official problem paper (PDF)

Answer

\[ \boxed{c=2}. \]

Solution

Let \(f\) be aquaesulian. Taking \(x=y\) in the given condition yields \[ f(x+f(x))=x+f(x) \qquad(x\in\mathbb{Q}). \tag{1} \]

First, \(f\) is injective. Indeed, suppose \(f(a)=f(b)=t\). By (1), \[ f(a+t)=a+t,\qquad f(b+t)=b+t. \] The original condition applied to \((a,b)\) gives either \[ f(a+t)=t+b \quad\text{or}\quad f(b+t)=a+t. \] In either case, \(a=b\). Moreover, (1) with \(x=0\) gives \[ f(f(0))=f(0), \] so injectivity implies \(f(0)=0\).

Let \[ S=\{s\in\mathbb{Q}:f(s)=s\}. \] We show that \(S\) is an additive subgroup of \(\mathbb{Q}\). We already have \(0\in S\). If \(s,t\in S\), both alternatives in the original condition give \[ f(s+t)=s+t, \] so \(s+t\in S\). If \(s\in S\), applying the condition to \((s,-s)\) gives either \[ f(s+f(-s))=0 \quad\text{or}\quad 0=s+f(-s). \] In the first case, injectivity and \(f(0)=0\) also imply \(s+f(-s)=0\). Thus \(-s\in S\).

We next prove that \[ f(x+s)=f(x)+s \qquad(x\in\mathbb{Q},\ s\in S). \tag{2} \] By (1) and the subgroup property, both \[ x+f(x+s)=\bigl(x+s+f(x+s)\bigr)-s \] and \[ x+s+f(x)=\bigl(x+f(x)\bigr)+s \] belong to \(S\). Applying the original condition to \((x,x+s)\), and using that \(f\) fixes both these arguments, gives in either alternative \[ x+f(x+s)=x+s+f(x). \] This proves (2).

Since \(y+f(y)\in S\), equation (2) gives \[ f(x+f(y))=f(x-y)+y+f(y). \] Similarly, \[ f(y+f(x))=f(y-x)+x+f(x). \] Consequently, the original condition implies that, for all \(x,y\in\mathbb{Q}\), \[ f(x-y)=f(x)-f(y) \quad\text{or}\quad f(y-x)=f(y)-f(x). \tag{3} \]

Define \[ e(x)=f(x)+f(-x). \] Applying (3) to the pair \((u+v,u)\) shows that \[ f(u+v)-f(u)-f(v)\in\{0,-e(v)\}. \] Interchanging \(u\) and \(v\) shows that the same expression belongs to \(\{0,-e(u)\}\). Therefore \[ e(u)\ne e(v) \quad\Longrightarrow\quad f(u+v)=f(u)+f(v). \tag{4} \]

Suppose now that \(e\) takes two distinct nonzero values: \[ e(u)=a,\qquad e(v)=b,\qquad a\ne b,\quad ab\ne0. \] By (4), and then by (4) applied to \(-u,-v\), \[ f(u+v)=f(u)+f(v),\qquad f(-u-v)=f(-u)+f(-v). \] Adding gives \[ e(u+v)=a+b. \] Since \(b\ne0\), we have \(e(u+v)\ne a=e(-u)\). Applying (4) to \(u+v,-u\) therefore yields \[ f(v)=f(u+v)+f(-u) =f(u)+f(v)+f(-u) =f(v)+a, \] contradicting \(a\ne0\).

Thus \(e\) takes at most one nonzero value. Since \(e(0)=0\), it takes at most two values, proving \(c\le2\).

To prove sharpness, define \[ f(x)=2\lfloor x\rfloor-x \qquad(x\in\mathbb{Q}). \] Write \[ x=m+u,\qquad y=n+v, \] where \(m,n\in\mathbb{Z}\) and \(0\le u,v<1\). Then \[ f(x)=m-u,\qquad f(y)=n-v. \] If \(u\ge v\), we have \(0\le u-v<1\), so \[ \begin{aligned} f(x+f(y)) &=f(m+n+u-v)\\ &=m+n-u+v\\ &=f(x)+y. \end{aligned} \] If \(u\le v\), the same calculation with \(x,y\) interchanged gives \[ f(f(x)+y)=x+f(y). \] These cases cover all pairs, including \(u=v\), so \(f\) is aquaesulian.

Finally, \[ f(r)+f(-r) =2\bigl(\lfloor r\rfloor+\lfloor-r\rfloor\bigr) = \begin{cases} 0,&r\in\mathbb{Z},\\ -2,&r\notin\mathbb{Z}. \end{cases} \] Both values occur for rational \(r\), for example at \(r=0\) and \(r=\tfrac12\). Hence \(c\ge2\), completing the proof that \(\boxed{c=2}\).

The solution was checked against the official IMO shortlist solutions.