For which pairs of positive integers $(m,n)$ there exists a set $A$ such that for all positive integers $x,y$, if $|x-y|=m$, then at least one of the numbers $x,y$ belongs to the set $A$, and if $|x-y|=n$, then at least one of the numbers $x,y$ does not belong to the set $A$? Adapted by Dan Schwarz from A.M.M.
Problem
Source: Romanian IMO TST 2006, day 2, problem 3
Tags: modular arithmetic, induction, number theory proposed, number theory
22.04.2006 15:15
If $m=n$, it is obvious it exists $A$. Suppose for a pair $(m,n)$ with $m\neq n$ it exists $A$.For $u\in A$, we have $u\pm n\notin A\Rightarrow u\pm n\pm m\in A$. So for $k,l\in\mathbb{Z}$ we have that if $u\in A\Rightarrow u+k(m+n)+l(m-n)=u+(k+l)m+(k-l)n\in A$. The same for $u\notin A$. Let $d=gcd(m,n)\Rightarrow$ it exists $u,v\in\mathbb{Z}$ such that $um+vn=d$. Chosing $k=u+v$ and $l=u-v$ we have that if $u\in A\Rightarrow u+2d\in A\Rightarrow u+2kd\in A$ and if $u\notin A\Rightarrow u+2d\notin A\Rightarrow u+2kd\notin A$. If $2d|n\Rightarrow n=2kd\Rightarrow$ if $u\in A\Rightarrow u+n\in A$(false) If $2d|m\Rightarrow m=2kd\Rightarrow$ if $u\notin A\Rightarrow u+m\notin A$(false) So, $exp_2(m)=exp_2(n)$. I couldn't find an example of $A$ in this case, but I managed to prove somehow that it exists.
23.04.2006 04:26
IMHO, this is a very nice problem I found something similar, although I'm pretty late: if $k \in A$, then: $k+an+bm \in A$ for $a+b \equiv 0 \pmod 2$; else $k+an+bm \not\in A$. (to get a certain pair $(a,b)$, we first let $b$ oscillate between $0$ and $1$ until $a$ gets the right value, then we do the same thing with $b$) Thus, the only way to get a contradiction is to have $pn=qm$, where $p \not\equiv q \pmod 2$, which leads to the same answer as the one in the previous. Now, if $2^t \| m,n$, then we put $1,2,\ldots,2^t$ in $A$, the others will follow by the above observation applied to each of $1,2,\ldots,2^t$. (when applying it to $1$, we will decide whether some number $\equiv 1 \pmod{2^t}$ gets chosen or not). Note that they can't get into any conflict, because $|x-y|=n$, for example, implies $x \equiv y \pmod{2^t}$. And please tell me if there's something with the previous paragraph.
26.09.2006 14:53
Just to flesh out the previous two solutions: I claim it is possible iff $m$ and $n$ have the same maximum powers of $2$ dividing them. First, if $x$ is in $A$, $x+n$ is not in $A$, $x+n+m$ is in $A$, $x+m$ is not in $A$. Similarly if $x$ is not in $A$, $x+m$ is in $A$, $x+m+n$ is not in $A$, and $x+n$ is in $A$. So basically, if $|x-y|=m$ or $|x-y|=n$, then precisely one of $x,y$ is in $A$. By induction, if $x$ is in $A$ then $x+(2k+1)m$ is not in $A$, while $x+2ln$ is in $A$, so thus the equation $(2k+1)m = 2ln$ has no solutions, ie the fraction $\frac{m}{n}$ cannot be expressed as an even number divided by an odd number, and by switching variables $m,n$ since it doesn't make a difference, $\frac{m}{n}$ cannot be expressed as an odd number divided by an even number either, ie in lowest terms the fraction $\frac{m}{n}$ is an odd number divided by an odd numbers, so for such a set to possibly exist $m$ and $n$ must have the same maximum powers of $2$ dividing them. To see this works: if $m$,$n$ are both odd, then consider the set $A$ of odd numbers, which works obviously. Now proceed by induction on the highest power of 2 dividing $m$ and $n$. if $2^{s+1}$ is the highest power dividing $m$ and $n$, consider numbers mod $2^{s+1}$ and for a fixed $t$ $0 \leq t < 2^{s+1}$, $a= r 2^{s+1}+t$, biject that number to $r$. Now let $A$, in this bijected set, consist of all odd numbers, and now biject it back to get a suitable set $A$ for the real thing, and do this for every value of $t$ to get a working construction.