Maths Olympiad Prep

Track / Stage 9 / 47 of 52 #1927 of 1964

Problem 1927

IMO P2/P5; hard shortlist
Algebra Difficulty 9.2 Prove it International Mathematical Olympiad · IMO

Let Z0\mathbb{Z}_{\geqslant 0} be the set of non-negative integers, and let f:Z0×Z0Z0f: \mathbb{Z}_{\geqslant 0} \times \mathbb{Z}_{\geqslant 0} \rightarrow \mathbb{Z}_{\geqslant 0} be a bijection such that whenever f(x1,y1)>f(x2,y2)f\left(x_{1}, y_{1}\right)>f\left(x_{2}, y_{2}\right), we have f(x1+1,y1)>f(x2+1,y2)f\left(x_{1}+1, y_{1}\right)>f\left(x_{2}+1, y_{2}\right) and f(x1,y1+1)>f(x2,y2+1)f\left(x_{1}, y_{1}+1\right)>f\left(x_{2}, y_{2}+1\right).
Let NN be the number of pairs of integers (x,y)(x, y), with 0x,y<1000 \leqslant x, y<100, such that f(x,y)f(x, y) is odd. Find the smallest and largest possible value of NN.

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 solution

We defer the constructions to the end of the solution. Instead, we begin by characterizing all such functions ff, prove a formula and key property for such functions, and then solve the problem, providing constructions.

Characterization Suppose ff satisfies the given relation. The condition can be written more strongly as
f(x1,y1)>f(x2,y2)f(x1+1,y1)>f(x2+1,y2)f(x1,y1+1)>f(x2,y2+1) \begin{aligned} f\left(x_{1}, y_{1}\right)>f\left(x_{2}, y_{2}\right) & \Longleftrightarrow f\left(x_{1}+1, y_{1}\right)>f\left(x_{2}+1, y_{2}\right) \\ & \Longleftrightarrow f\left(x_{1}, y_{1}+1\right)>f\left(x_{2}, y_{2}+1\right) \end{aligned}
In particular, this means for any (k,l)Z2,f(x+k,y+l)f(x,y)(k, l) \in \mathbb{Z}^{2}, f(x+k, y+l)-f(x, y) has the same sign for all xx and yy.

Call a non-zero vector (k,l)Z0×Z0(k, l) \in \mathbb{Z}_{\geqslant 0} \times \mathbb{Z}_{\geqslant 0} a needle if f(x+k,y)f(x,y+l)>0f(x+k, y)-f(x, y+l)>0 for all xx and yy. It is not hard to see that needles and non-needles are both closed under addition, and thus under scalar division (whenever the quotient lives in Z2\mathbb{Z}^{2} ).

In addition, call a positive rational number kl\frac{k}{l} a grade if the vector (k,l)(k, l) is a needle. (Since needles are closed under scalar multiples and quotients, this is well-defined.)

Claim. Grades are closed upwards.
Proof. Consider positive rationals k1/l1<k2/l2k_{1} / l_{1}<k_{2} / l_{2} with k1/l1k_{1} / l_{1} a grade. Then:
- (k1,l1)\left(k_{1}, l_{1}\right) is a needle
- so (k1l2,l1l2)\left(k_{1} l_{2}, l_{1} l_{2}\right) is a needle,
- so (k2l1,l1l2)\left(k_{2} l_{1}, l_{1} l_{2}\right) is a needle (as k2l1k1l2>0k_{2} l_{1}-k_{1} l_{2}>0 and (1,0)(1,0) is a needle).
Thus ( k2,l2k_{2}, l_{2} ) is a needle, as wanted.

Claim. A grade exists.
Proof. If no positive integer nn is a grade, then f(1,0)>f(0,n)f(1,0)>f(0, n) for all nn which is impossible.
Similarly, there is an nn such that f(0,1)<f(n,0)f(0,1)<f(n, 0), thus 1/n1 / n is not a grade for some large nn. That means that small positive rational values are not grades, then there is a switch, and after that all values are grades. Call the place of that switch α\alpha. Here α\alpha is the infimum of the grades.

Claim (Key property). If x1+y1α>x2+y2αx_{1}+y_{1} \alpha>x_{2}+y_{2} \alpha then f(x1,y1)>f(x2,y2)f\left(x_{1}, y_{1}\right)>f\left(x_{2}, y_{2}\right).
Proof. If both x1x2x_{1} \geqslant x_{2} and y1y2y_{1} \geqslant y_{2} this is clear.
Suppose x1x2x_{1} \geqslant x_{2} and y1<y2y_{1}<y_{2}. Then x1x2y2y1>α\frac{x_{1}-x_{2}}{y_{2}-y_{1}}>\alpha is a grade. This gives f(x1,y1)>f(x2,y2)f\left(x_{1}, y_{1}\right)>f\left(x_{2}, y_{2}\right). Suppose x1<x2x_{1}<x_{2} and y1y2y_{1} \geqslant y_{2}. Then x2x1u1u2<α\frac{x_{2}-x_{1}}{u_{1}-u_{2}}<\alpha is not a grade. This gives f(x2,y2)<f(x1,y1)f\left(x_{2}, y_{2}\right)<f\left(x_{1}, y_{1}\right).

From those observations we get the following claim.
Claim. The function ff orders pairs (x,y)(x, y) based on the value of x+yαx+y \alpha. If α\alpha is rational, tiebreaking is done by larger xx - or yy-coordinate (depending on whether α\alpha is a grade).

We can imagine this the following way: take a line with slope 1α-\frac{1}{\alpha} under the first quadrant of the plane. And we start to move this line upward (but it stays parallel to the original line). First it hits (0,0)(0,0), so f(0,0)=0f(0,0)=0. And each time the line hits a point p,f(p)p, f(p) is the number of points hit before. If αQ\alpha \in \mathbb{Q}, it is possible that the line hits multiple points. Then those points are ordered the same way as their xx or yy coordinates, depending on whether α\alpha is a grade.

We understood the behaviour of ff, now we need to focus on the region of A={(x,y)Z0×Z0x<100,y<100}A=\{(x, y) \in \mathbb{Z}_{\geqslant 0} \times \mathbb{Z}_{\geqslant 0} \mid x<100, y<100\}. First, we can assume that α\alpha is irrational. If we change it a little bit in the right direction, the behaviour and values of the ff function does not change in AA.

Claim.
f(x,y)+f(x+1,y+1)=f(x+1,y)+f(x,y+1)+1 f(x, y)+f(x+1, y+1)=f(x+1, y)+f(x, y+1)+1
Proof.
f(x+1,y+1)f(x,y+1)=#{(a,b)Z0×Z0x+(y+1)αa+bα<(x+1)+(y+1)α}=#{(a,b)Z0×Z>0x+(y+1)αa+bα<(x+1)+(y+1)α}+#{(a,0)Z0×Z0(x+1)+yαa<(x+1)+(y+1)α}=#{(a,b)Z0×Z0x+yαa+bα<(x+1)+yα}+1=f(x+1,y)f(x,y). \begin{gathered} f(x+1, y+1)-f(x, y+1)= \\ \#\{(a, b) \in \mathbb{Z}_{\geqslant 0} \times \mathbb{Z}_{\geqslant 0} \mid x+(y+1) \alpha \leqslant a+b \alpha<(x+1)+(y+1) \alpha\}= \\ \#\{(a, b) \in \mathbb{Z}_{\geqslant 0} \times \mathbb{Z}_{>0} \mid x+(y+1) \alpha \leqslant a+b \alpha<(x+1)+(y+1) \alpha\}+ \\ \#\{(a, 0) \in \mathbb{Z}_{\geqslant 0} \times \mathbb{Z}_{\geqslant 0} \mid(x+1)+y \alpha \leqslant a<(x+1)+(y+1) \alpha\}= \\ \#\{(a, b) \in \mathbb{Z}_{\geqslant 0} \times \mathbb{Z}_{\geqslant 0} \mid x+y \alpha \leqslant a+b \alpha<(x+1)+y \alpha\}+1=f(x+1, y)-f(x, y) . \end{gathered}

From this claim we immediately get that 2500N75002500 \leqslant N \leqslant 7500; now we show that those bounds are indeed sharp.

Remember that if α\alpha is irrational then
f(a,b)=#{(x,y)Z0×Z0x+yα<a+bα} f(a, b)=\#\{(x, y) \in \mathbb{Z}_{\geqslant 0} \times \mathbb{Z}_{\geqslant 0} \mid x+y \alpha<a+b \alpha\}

Construction for 7500 Select α199.999\alpha \approx 199.999.
Claim.
1. f(n,0)=nf(n, 0)=n for 0n1000 \leqslant n \leqslant 100.
2. f(0,k)kmod2f(0, k) \equiv k \bmod 2 for 0k1000 \leqslant k \leqslant 100.
Proof.
1. f(n,0)=#{(x,y)x+yα<n}=#{(x,y)x+199y<n}=nf(n, 0)=\#\{(x, y) \mid x+y \alpha<n\}=\#\{(x, y) \mid x+199 y<n\}=n.
2.
f(0,k)=#{(x,y)x+yα<kα}=l=0k1#{(x,l)x+lα<kα}=l=0k1#{xx<(kl)α}=l=0k1200(kl)1=200Ak \begin{aligned} & f(0, k)=\#\{(x, y) \mid x+y \alpha<k \alpha\}=\sum_{l=0}^{k-1} \#\{(x, l) \mid x+l \alpha<k \alpha\} \\ & \quad=\sum_{l=0}^{k-1} \#\{x \mid x<(k-l) \alpha\}=\sum_{l=0}^{k-1} 200(k-l)-1=200 A-k \end{aligned}
for some integer AA.

From this claim, using the equality f(x,y)+f(x+1,y+1)=f(x+1,y)+f(x,y+1)+1f(x, y)+f(x+1, y+1)=f(x+1, y)+f(x, y+1)+1, we can prove that mod2\bmod 2 the region AA looks like the following: in the rows (,2y)(-, 2 y) the remainders modulo 2 alternate, while the rows (,2y+1)(-, 2 y+1) contain only odd numbers.

Construction for 2500 Select α200.001\alpha \approx 200.001.
Claim.
1. f(n,0)=nf(n, 0)=n for 0n1000 \leqslant n \leqslant 100.
2. f(0,k)0mod2f(0, k) \equiv 0 \bmod 2 for 0k1000 \leqslant k \leqslant 100.
Proof.
1. As above.
2. Similarly to the above:
f(0,k)=#{(x,y)x+yα<kα}=l=0k1#{(x,l)x+lα<kα}=l=0k1#{xx<(kl)α}=l=0k1200(kl)=200A \begin{aligned} f(0, k) & =\#\{(x, y) \mid x+y \alpha<k \alpha\}=\sum_{l=0}^{k-1} \#\{(x, l) \mid x+l \alpha<k \alpha\} \\ & =\sum_{l=0}^{k-1} \#\{x \mid x<(k-l) \alpha\}=\sum_{l=0}^{k-1} 200(k-l)=200 A \end{aligned}
for some integer AA.

Similarly to the above, we can prove that mod 2 the region AA looks like the following: in the rows (,2y)(-, 2 y) the remainder modulo 2 alternate, while the rows (,2y+1)(-, 2 y+1) contain only even numbers.

Thus, the optimal bounds are 2500N75002500 \leqslant N \leqslant 7500.

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