Find all functions $f : Z \to Z$ satisfying the following two conditions: (i) for all integers $x$ we have $f(f(x)) = x$, (ii) for all integers $x$ and y such that $x + y$ is odd, we have $f(x) + f(y) \ge x + y$.
Problem
Source: Dutch IMO TST3 2019 p3
Tags: Functional inequality, Find all functions, algebra
11.01.2020 13:03
We have $f(f(x)) = x$ and $f(f(y)) = y$, and in the $f(x) + f(y) \ge x + y$ we chose $x\to f(x),y\to f(y)$, and we get $x+y\ge f(x)+f(y)$, so we have $f(x)+f(y)=x+y$, and putting $x=y=0$, we get $f(0)=0$, so if $y=0$, we get $f(x)=x$, and this is indeed solution. (We not need Z, it can be R)
11.01.2020 13:16
I believe the above poster misread the question, as they never use the $x+y$ odd condition. Functions of the form $$f(x)=\begin{cases} x+1337, &x\equiv 0\pmod 2 \\ x-1337, &x\equiv 1\pmod 2\end{cases}$$work (with $1337$ as an arbitrary integral constant).
11.01.2020 13:57
08.07.2021 06:59
We claim that the two functions $f(n) = n$ for all $n \in \mathbb{Z}$ and $f(n)=\begin{cases} n+k, &x\equiv 0\pmod 2 \\ n-k, &x\equiv 1\pmod 2\end{cases}$ for all $n \in \mathbb{Z}$ and $k \in 2\mathbb{Z}+1$ work. It can be easily checked that these indeed work. The fun part of this problem is using the involution property. Claim 1: If there simultaneously exists some even number that maps to another even number, and some odd number that maps to another odd number, then the function is indeed $f(n) = n$. Proof: Denote $f(a) = b$ and $f(c)=d$ where $a,b$ are even and $c,d$ are odd. We first claim that $a=b$ and $c=d$. Suppose contrawise, that at least of of these is false. Then WLOG we have $a > b$ and $c \geq d$ (as this function is bijective if this was not the other case then we can switch the pairs). Now, by the condition we have that $b+d=f(a)+f(c) \geq a+c > b+d$, contradiction. Hence we obtain that $a=b$ and $c=d$ as required. Now, assume that $f$ is not the identity function. Then there exists some $t$ satisfying $t > f(t)$. Now, we know that there exists some $k$ such that $t+k \equiv 1 \pmod 2$ and $f(k) = k$. Hence we obtain that $f(t) + f(k) \geq k + t = f(k) + t > f(k) + f(t)$, contradiction. Thus in this case $f$ is indeed the identity function as required. Now, we may assume that either: 1) no even integer maps to another even integer 2) no odd integer maps to another odd integer. If 1) is true, then define $f(t) = t-k$ for some $t \equiv 1 \pmod 2$ and some $k \in 2\mathbb{Z}+1$ Now substituting $n$ to be any even number, we have that $t+n = f(f(t)) + f(f(n)) \geq f(t)+f(n) \geq t+n$ as both $f(t)+f(n)$ and $t+n$ are odd by assumption. Thus $f(t)+f(n) = t+n$. But since $f(t) = t-k, f(n) = n+k$. Thus indeed we have $f(n) = n + k $ for all $ n \equiv 0 \pmod 2$, and because of the involution this implies that $f(n) = n-k$ for all $n \equiv 1 \pmod 2$. Now, if 2) is true the proof is indentical to the one given above, hence we conclude that these are the only two functions.