Let $f:\mathbb{Z}\rightarrow\{ 1,2,\ldots ,n\}$ be a function such that $f(x)\not= f(y)$, for all $x,y\in\mathbb{Z}$ such that $|x-y|\in\{2,3,5\}$. Prove that $n\ge 4$. Ioan Tomescu
Problem
Source: Romanian TST 2002
Tags: function, modular arithmetic, combinatorics proposed, combinatorics
05.02.2011 19:05
WakeUp wrote: Let $f:\mathbb{Z}\rightarrow\{ 1,2,\ldots ,n\}$ be a function such that $f(x)\not= f(y)$, for all $x,y\in\mathbb{Z}$ such that $|x-y|\in\{2,3,5\}$. Prove that $n\ge 4$. Ioan Tomescu Suppose $n\le 3$. Let $f(0)=a,f(2)=b,f(5)=c$. Then $a,b,c$ must be different and $f(3)=b,f(8)=f(7)=a,f(4)=c$. This leaves no place for $f(6)$.
05.02.2011 19:32
Suppose on the contrary that $n<4$, so that $n\in\{1,2,3\}$. If $n=1$ then $f(x)=f(y)=1$ for all $x,y$, a contradiction. If $n=2$ then $f:\mathbb{Z}\rightarrow\{1,2\}$ and let $x$ be a number such that $f(x)=1$. Then $f(x+2),f(x+3),f(x+5)$ cannot equal $f(x)=1$ so they are all equal to $2$, which means $f(x+3)=f(x+5)$, a contradiction. If $n=3$ then $f:\mathbb{Z}\rightarrow\{1,2,3\}$ without loss of generality, let us suppose $f(1)=1$. So $f(3),f(4)$ and $f(6)$ are distinct from $1$, so they must each equal $2$ or $3$. But $f(3)\not= f(3+3)=f(6)$ so we will take $f(3)$ as $2$ and $f(6)$ as $3$. Working on $f(3)=2$, we note $f(5),f(8)\in\{1,3\}$ and since $f(5)\not= f(5+3)=f(8)$ we have in fact $\{f(5),f(8)\}=\{1,3\}$. Note that $3=f(6)\not= f(6+2)=f(8)$ so $f(8)=1$ and $f(5)=3$. Next, $1=f(1)\not=f(1+3)=f(4)=f(6-2)\not=f(6)=3$ and hence $f(4)=2$. Now $2=f(4)\not= f(4+5)=f(9)\not=f(9-3)=f(6)=3$. So $f(9)=1$. However, $f(7)\not =f(7-2)=f(5)=3,f(7)\not= f(7+2)=f(9)=1$ and $f(7)\not=f(7-3)=f(4)=2$. So $f(4)\not\in\{1,2,3\}$, which is a contradiction. For $n=4$, not that it is needed, but $f(2n)=f(2n+1)=n\pmod{4}$ works.
28.04.2017 14:44
This problem looks very easy. Am I wrong? For every integer $x$, $f(x)\not=f (x+2)\not=f (x+5)\not=f (x)$ and $f (x)\not=f (x+3)\not=f (x+5)\not=f (x) $, so there are at least 3 different values f can take.Thus$ n\ge 3$. Suppose $n=3$. From the above assumptions we deduce that $f (x+2)=f (x+3)$ for all integers $x $. So $f$ is constant, contradiction!