Let $n$ be a positive integer. Let $S$ be a set of ordered pairs $(x, y)$ such that $1\leq x \leq n$ and $0 \leq y \leq n$ in each pair, and there are no pairs $(a, b)$ and $(c, d)$ of different elements in $S$ such that $a^2+b^2$ divides both $ac+bd$ and $ad - bc$. In terms of $n$, determine the size of the largest possible set $S$.
Problem
Source: RMM 2023 Shortlist N1
Tags: number theory, gaussian, gaussian integer, Divisibility, RMM Shortlist
01.03.2024 13:53
We view the elements of $T \coloneqq \left\{(a,b): 1 \leq a \leq n \, , \, 0 \leq b \leq n\right\}$ as non-zero Gaussian integers $\left(a,b\right) \leftrightarrow a+bi \in \mathbb{Z}{[i]}$. Now observe that for $z_1=a+bi$, $z_2=c+di$ elements of $T$ we have: $$ \frac{z_2}{z_1}=\frac{c+di}{a+bi}=\frac{\left(c+di\right)\left(a-bi\right)}{\left(a+bi\right)\left(a-bi\right)}=\frac{ac+bd}{a^2+b^2}+\frac{ad-bc}{a^2+b^2} i \quad \quad (\ast) $$Thus the condition is equivalent to there being no two elements of $S$ such that $z_1 \vert z_2$ in $\mathbb{Z}{[i]}$. Choose $S=\left\{(a,b) \in T: a+b \geq n+1\right\}$ so $|S|=\frac{n(n+1)}{2}$. For any $z \in S$ we have: $$ \sqrt{2} \, n \geq |z| \geq \sqrt{2\left(\frac{n+1}{2}\right)^2}=\sqrt{2} \, \frac{n+1}{2} $$Assume for contradiction we have distinct $z_1,z_2 \in S$ such that $z_1 \vert z_2$ then, writing $w=\frac{z_1}{z_2}$ we have: $$ 1 \leq |w|=\frac{\left\lvert z_1 \right\rvert}{\left\lvert z_2 \right\rvert} \leq \frac{\sqrt{2} \, n}{\sqrt{2} \, \frac{n+1}{2}}<2 $$So $|w|=1$ meaning $w \in \{-1,-i,i\}$ (as $w \neq 1$). But writing $z_1=a+bi$ we have: $$ z_2 \in \left\{\frac{z_1}{-1},\frac{z_1}{-i},\frac{z_1}{i}\right\}=\left\{-a-bi,-b+ai,b-ai\right\} $$But none of the latter set are in $T$ giving a contradiction. Thus $S$ has the desired properties. For showing this $S$ has maximal size, first let $\omega=1+i$. We define equivalence classes on $T$ with $z_1 \sim z_2$ iff $\frac{z_1}{z_2}$ or $\frac{z_2}{z_1}$ is of the form $i^n \cdot \omega^m$ for $n,m \in \mathbb{Z}_{\geq 0}$. Observe that $S$ can contain at most one element from each equivalence class thus it sufficies to show there are at most $\frac{n(n+1)}{2}$ such equivalence classes. Claim: Each equivalence class contains an element $a+bi \in T$ such that $a+b$ is odd. Proof: Choose an equivalence class $\tilde{T} \subset T$ and let $a+bi \in \tilde{T}$. If $a+b$ is odd then we're done otherwise observe, $a+b$ is even. From $(\ast)$: $$ \frac{a+bi}{1+i}=\frac{a+b}{2}+\frac{b-a}{2}i \quad \quad \frac{a+bi}{i^3 (1+i)}=\frac{a-b}{2}+\frac{a+b}{2}i $$These will both be Gaussian integers as $a,b$ are even and, if $b \geq a$ the former will be in $T$ and if $a>b$ then the latter will be in $T$. There are $\frac{|T|}{2}=\frac{n(n+1)}{2}$ elements of $T$ with $a+b$ odd thus this provides an upper bound on the number of equivalence classes as required.
16.06.2024 04:06
Solved with kingu. The idea is quite interesting. First by $a^2+b^2\mid ac+bd,ad-bc,$ $(a+bi)(a-bi)\mid ad-bc+(ac+bd)i=(a+bi)(c+di).$ (Note that this equivilant to the condition) Therefore $a+bi\mid c+di.$ So if we take all elements in $S:=\{(a,b)\in [n]\times ([n]\cup\{0\}):a+b>n\}.$ If $a+bi,c+di\in S$ are different and $a+bi\mid c+di.$ Consider modulo length we have $\sqrt {n/2}<\frac{a+b}{\sqrt 2}\le\sqrt{a^2+b^2}\le\sqrt{c^2+d^2}\le\sqrt 2n.$ Therefore $c+di=k(a+bi),$ here $k=\pm 1$ or $\pm i$ or $\pm 1\pm i.$ This can obviously never be true. Now we prove $\frac{n(n+1)}2$ is the maximum. The idea is just as integers, we create $\frac{n(n+1)}2$ chains. For $a+bi$ consider $a+bi\mapsto (1+i)(a+bi)\mapsto (1+i)^2(a+bi)\mapsto\cdots.$ At last it ends in elements of $S,$ so here are $\frac{n(n+1)}2$ chains. Now note that there are at most one element in each chain, so we are done$.\Box$