Maths Olympiad Prep

Track / Stage 9 / 43 of 52 #2563 of 2604

Problem 2563

IMO P2/P5; hard shortlist
Algebra Difficulty 9.2 Prove it IMO Shortlist · IMO

Determine all functions f:Q⟶Zf: \mathbb{Q} \longrightarrow \mathbb{Z} satisfying
f(f(x)+ab)=f(x+ab) f\left(\frac{f(x)+a}{b}\right)=f\left(\frac{x+a}{b}\right)
for all x∈Qx \in \mathbb{Q}, a∈Za \in \mathbb{Z}, and b∈Z>0b \in \mathbb{Z}_{>0}. (Here, Z>0\mathbb{Z}_{>0} denotes the set of positive integers.)

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.

Next problem →

Official solutions — 2

Solution 1

Answer. There are three kinds of such functions, which are: all constant functions, the floor function, and the ceiling function.

Solution 1.
I. We start by verifying that these functions do indeed satisfy (1). This is clear for all constant functions. Now consider any triple (x,a,b)∈Q×Z×Z>0(x, a, b) \in \mathbb{Q} \times \mathbb{Z} \times \mathbb{Z}_{>0} and set
q=⌊x+ab⌋ q=\left\lfloor\frac{x+a}{b}\right\rfloor
This means that qq is an integer and bq⩽x+a<b(q+1)b q \leqslant x+a<b(q+1). It follows that bq⩽⌊x⌋+a<b(q+1)b q \leqslant\lfloor x\rfloor+a<b(q+1) holds as well, and thus we have
⌊⌊x⌋+ab⌋=⌊x+ab⌋ \left\lfloor\frac{\lfloor x\rfloor+a}{b}\right\rfloor=\left\lfloor\frac{x+a}{b}\right\rfloor
meaning that the floor function does indeed satisfy (1). One can check similarly that the ceiling function has the same property.

II. Let us now suppose conversely that the function f:Q⟶Zf: \mathbb{Q} \longrightarrow \mathbb{Z} satisfies (1) for all (x,a,b)∈Q×Z×Z>0(x, a, b) \in \mathbb{Q} \times \mathbb{Z} \times \mathbb{Z}_{>0}. According to the behaviour of the restriction of ff to the integers we distinguish two cases.

Case 1: There is some m∈Zm \in \mathbb{Z} such that f(m)≠mf(m) \neq m.
Write f(m)=Cf(m)=C and let η∈{−1,+1}\eta \in\{-1,+1\} and bb denote the sign and absolute value of f(m)−mf(m)-m, respectively. Given any integer rr, we may plug the triple ( m,rb−C,bm, r b-C, b ) into ( 1 ), thus getting f(r)=f(r−η)f(r)=f(r-\eta). Starting with mm and using induction in both directions, we deduce from this that the equation f(r)=Cf(r)=C holds for all integers rr. Now any rational number yy can be written in the form y=pqy=\frac{p}{q} with (p,q)∈Z×Z>0(p, q) \in \mathbb{Z} \times \mathbb{Z}_{>0}, and substituting (C−p,p−C,q)(C-p, p-C, q) into (1) we get f(y)=f(0)=Cf(y)=f(0)=C. Thus ff is the constant function whose value is always CC.

Case 2: One has f(m)=mf(m)=m for all integers mm.
Note that now the special case b=1b=1 of (1) takes a particularly simple form, namely
f(x)+a=f(x+a) for all (x,a)∈Q×Z \begin{equation*} f(x)+a=f(x+a) \quad \text{ for all }(x, a) \in \mathbb{Q} \times \mathbb{Z} \tag{2} \end{equation*}
Defining f(12)=ωf\left(\frac{1}{2}\right)=\omega we proceed in three steps.

Step A. We show that ω∈{0,1}\omega \in\{0,1\}.
If ω⩽0\omega \leqslant 0, we may plug (12,−ω,1−2ω)\left(\frac{1}{2},-\omega, 1-2 \omega\right) into (1), obtaining 0=f(0)=f(12)=ω0=f(0)=f\left(\frac{1}{2}\right)=\omega. In the contrary case ω⩾1\omega \geqslant 1 we argue similarly using the triple (12,ω−1,2ω−1)\left(\frac{1}{2}, \omega-1,2 \omega-1\right).

Step B. We show that f(x)=ωf(x)=\omega for all rational numbers xx with 0<x<10<x<1.
Assume that this fails and pick some rational number ab∈(0,1)\frac{a}{b} \in(0,1) with minimal bb such that f(ab)≠ωf\left(\frac{a}{b}\right) \neq \omega. Obviously, gcd⁡(a,b)=1\operatorname{gcd}(a, b)=1 and b⩾2b \geqslant 2. If bb is even, then aa has to be odd and we can substitute (12,a−12,b2)\left(\frac{1}{2}, \frac{a-1}{2}, \frac{b}{2}\right) into (1), which yields
f(ω+(a−1)/2b/2)=f(ab)≠ω \begin{equation*} f\left(\frac{\omega+(a-1) / 2}{b / 2}\right)=f\left(\frac{a}{b}\right) \neq \omega \tag{3} \end{equation*}
Recall that 0⩽(a−1)/2<b/20 \leqslant(a-1) / 2<b / 2. Thus, in both cases ω=0\omega=0 and ω=1\omega=1, the left-hand part of (3) equals ω\omega either by the minimality of bb, or by f(ω)=ωf(\omega)=\omega. A contradiction.

Thus bb has to be odd, so b=2k+1b=2 k+1 for some k⩾1k \geqslant 1. Applying (1) to (12,k,b)\left(\frac{1}{2}, k, b\right) we get
f(ω+kb)=f(12)=ω \begin{equation*} f\left(\frac{\omega+k}{b}\right)=f\left(\frac{1}{2}\right)=\omega \tag{4} \end{equation*}
Since aa and bb are coprime, there exist integers r∈{1,2,…,b}r \in\{1,2, \ldots, b\} and mm such that ra−mb=k+ωr a-m b=k+\omega. Note that we actually have 1⩽r<b1 \leqslant r<b, since the right hand side is not a multiple of bb. If mm is negative, then we have ra−mb>b⩾k+ωr a-m b>b \geqslant k+\omega, which is absurd. Similarly, m⩾rm \geqslant r leads to ra−mb<br−br=0r a-m b<b r-b r=0, which is likewise impossible; so we must have 0⩽m⩽r−10 \leqslant m \leqslant r-1.

We finally substitute (k+ωb,m,r)\left(\frac{k+\omega}{b}, m, r\right) into (1) and use (4) to learn
f(ω+mr)=f(ab)≠ω f\left(\frac{\omega+m}{r}\right)=f\left(\frac{a}{b}\right) \neq \omega
But as above one may see that the left hand side has to equal ω\omega due to the minimality of bb. This contradiction concludes our step B.

Step CC. Now notice that if ω=0\omega=0, then f(x)=⌊x⌋f(x)=\lfloor x\rfloor holds for all rational xx with 0⩽x<10 \leqslant x<1 and hence by (2) this even holds for all rational numbers xx. Similarly, if ω=1\omega=1, then f(x)=⌈x⌉f(x)=\lceil x\rceil holds for all x∈Qx \in \mathbb{Q}. Thereby the problem is solved.

Comment 1. An alternative treatment of Steps B and C from the second case, due to the proposer, proceeds as follows. Let square brackets indicate the floor function in case ω=0\omega=0 and the ceiling function if ω=1\omega=1. We are to prove that f(x)=[x]f(x)=[x] holds for all x∈Qx \in \mathbb{Q}, and because of Step A and (2) we already know this in case 2x∈Z2 x \in \mathbb{Z}. Applying (1) to ( 2x,0,22 x, 0,2 ) we get
f(x)=f(f(2x)2) f(x)=f\left(\frac{f(2 x)}{2}\right)
and by the previous observation this yields
f(x)=[f(2x)2] for all x∈Q \begin{equation*} f(x)=\left[\frac{f(2 x)}{2}\right] \quad \text{ for all } x \in \mathbb{Q} \tag{5} \end{equation*}
An easy induction now shows
f(x)=[f(2nx)2n] for all (x,n)∈Q×Z>0 \begin{equation*} f(x)=\left[\frac{f\left(2^{n} x\right)}{2^{n}}\right] \quad \text{ for all }(x, n) \in \mathbb{Q} \times \mathbb{Z}_{>0} \tag{6} \end{equation*}
Now suppose first that xx is not an integer but can be written in the form pq\frac{p}{q} with p∈Zp \in \mathbb{Z} and q∈Z>0q \in \mathbb{Z}_{>0} both being odd. Let dd denote the multiplicative order of 2 modulo qq and let mm be any large integer. Plugging n=dmn=d m into (6) and using (2) we get
f(x)=[f(2dmx)2dm]=[f(x)+(2dm−1)x2dm]=[x+f(x)−x2dm] f(x)=\left[\frac{f\left(2^{d m} x\right)}{2^{d m}}\right]=\left[\frac{f(x)+\left(2^{d m}-1\right) x}{2^{d m}}\right]=\left[x+\frac{f(x)-x}{2^{d m}}\right]
Since xx is not an integer, the square bracket function is continuous at xx; hence as mm tends to infinity the above fomula gives f(x)=[x]f(x)=[x]. To complete the argument we just need to observe that if some y∈Qy \in \mathbb{Q} satisfies f(y)=[y]f(y)=[y], then (5) yields f(y2)=f([y]2)=[[y]2]=[y2]f\left(\frac{y}{2}\right)=f\left(\frac{[y]}{2}\right)=\left[\frac{[y]}{2}\right]=\left[\frac{y}{2}\right].

Solution 2

Here we just give another argument for the second case of the above solution. Again we use equation (2). It follows that the set SS of all zeros of ff contains for each x∈Qx \in \mathbb{Q} exactly one term from the infinite sequence …,x−2,x−1,x,x+1,x+2,…\ldots, x-2, x-1, x, x+1, x+2, \ldots.

Next we claim that
 if (p,q)∈Z×Z>0 and pq∈S, then pq+1∈S holds as well.  \begin{equation*} \text{ if }(p, q) \in \mathbb{Z} \times \mathbb{Z}_{>0} \text{ and } \frac{p}{q} \in S, \text{ then } \frac{p}{q+1} \in S \text{ holds as well. } \tag{7} \end{equation*}
To see this we just plug (pq,p,q+1)\left(\frac{p}{q}, p, q+1\right) into (1), thus getting f(pq+1)=f(pq)=0f\left(\frac{p}{q+1}\right)=f\left(\frac{p}{q}\right)=0.

From this we get that
 if x,y∈Q,x>y>0, and x∈S, then y∈S. \begin{equation*} \text{ if } x, y \in \mathbb{Q}, x>y>0, \text{ and } x \in S, \text{ then } y \in S . \tag{8} \end{equation*}
Indeed, if we write x=pqx=\frac{p}{q} and y=rsy=\frac{r}{s} with p,q,r,s∈Z>0p, q, r, s \in \mathbb{Z}_{>0}, then ps>qrp s>q r and (7) tells us
0=f(pq)=f(prqr)=f(prqr+1)=…=f(prps)=f(rs). 0=f\left(\frac{p}{q}\right)=f\left(\frac{p r}{q r}\right)=f\left(\frac{p r}{q r+1}\right)=\ldots=f\left(\frac{p r}{p s}\right)=f\left(\frac{r}{s}\right) .
Essentially the same argument also establishes that
 if x,y∈Q,x<y<0, and x∈S, then y∈S. \begin{equation*} \text{ if } x, y \in \mathbb{Q}, x<y<0, \text{ and } x \in S, \text{ then } y \in S . \tag{9} \end{equation*}
From (8) and (9) we get 0∈S⊆(−1,+1)0 \in S \subseteq(-1,+1) and hence the real number α=sup⁡(S)\alpha=\sup (S) exists and satisfies 0⩽α⩽10 \leqslant \alpha \leqslant 1.

Let us assume that we actually had 0<α<10<\alpha<1. Note that f(x)=0f(x)=0 if x∈(0,α)∩Qx \in(0, \alpha) \cap \mathbb{Q} by (8), and f(x)=1f(x)=1 if x∈(α,1)∩Qx \in(\alpha, 1) \cap \mathbb{Q} by (9) and (2). Let KK denote the unique positive integer satisfying Kα<1⩽(K+1)αK \alpha<1 \leqslant(K+1) \alpha. The first of these two inequalities entails α<1+αK+1\alpha<\frac{1+\alpha}{K+1}, and thus there is a rational number x∈(α,1+αK+1)x \in\left(\alpha, \frac{1+\alpha}{K+1}\right). Setting y=(K+1)x−1y=(K+1) x-1 and substituting (y,1,K+1)(y, 1, K+1) into ( 1 ) we learn
f(f(y)+1K+1)=f(y+1K+1)=f(x). f\left(\frac{f(y)+1}{K+1}\right)=f\left(\frac{y+1}{K+1}\right)=f(x) .
Since α<x<1\alpha<x<1 and 0<y<α0<y<\alpha, this simplifies to
f(1K+1)=1 f\left(\frac{1}{K+1}\right)=1
But, as 0<1K+1⩽α0<\frac{1}{K+1} \leqslant \alpha, this is only possible if α=1K+1\alpha=\frac{1}{K+1} and f(α)=1f(\alpha)=1. From this, however, we get the contradiction
0=f(1(K+1)2)=f(α+0K+1)=f(f(α)+0K+1)=f(α)=1. 0=f\left(\frac{1}{(K+1)^{2}}\right)=f\left(\frac{\alpha+0}{K+1}\right)=f\left(\frac{f(\alpha)+0}{K+1}\right)=f(\alpha)=1 .
Thus our assumption 0<α<10<\alpha<1 has turned out to be wrong and it follows that α∈{0,1}\alpha \in\{0,1\}. If α=0\alpha=0, then we have S⊆(−1,0]S \subseteq(-1,0], whence S=(−1,0]∩QS=(-1,0] \cap \mathbb{Q}, which in turn yields f(x)=⌈x⌉f(x)=\lceil x\rceil for all x∈Qx \in \mathbb{Q} due to (2). Similarly, α=1\alpha=1 entails S=[0,1)∩QS=[0,1) \cap \mathbb{Q} and f(x)=⌊x⌋f(x)=\lfloor x\rfloor for all x∈Qx \in \mathbb{Q}. Thereby the solution is complete.

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