Let $l$ some line, that is not parallel to the coordinate axes. Find minimal $d$ that always exists point $A$ with integer coordinates, and distance from $A$ to $l$ is $\leq d$
Problem
Source: St Petersburg Olympiad 2018, , Grade 11, P1
Tags: analytic geometry, geometry, number theory
21.06.2018 16:18
I claim that it is $\frac{1}{2\sqrt{2}}$. To see that this bound is sharp, take the line $y=-x+\frac{1}{2}$. Now to show that the inequality always holds, pick an arbitrary line, $y=ax+b$, and wlog assume that it does not pass through any lattice point, and that it has a positive slope, suppose that $am+b<1$ and $a(m+1)+b\ge 1$, where $m\in \mathbb{Z}$. Let $A=(m,1)$ , $ B=(m+1,1)$ , $ D=(m,0)$ and $S=\left(\frac{1-b}{a},1\right)$, clearly $\min\{\angle{(AD,l)},\angle{(AB,l)}\} \le 45^{\circ}$, wlog assume $\angle{(AB,l)} \le 45^{\circ}$, then $d(A,l)+d(B,l)=AS\sin{\angle{(AB,l)}}+BS\sin{\angle{(AB,l)}} \le \frac{1}{\sqrt{2}}$, and hence the conclusion.
26.08.2021 03:57
We claim that the answer is $\frac{1}{2\sqrt{2}}$. Firstly, $d\geq \frac{1}{2\sqrt{2}}$ by considering $x+y=\frac12$, which has distance formula $\frac{|x_0+y_0-\frac12|}{\sqrt{2}} \geq \frac{1}{2\sqrt{2}}$. Generally, consider the line $Ax+By-C=0$. then, the distance is \[\frac{|Ax_0+By_0 - C|}{\sqrt{A^2+B^2}}\]Note that if $\frac{A}{B}\notin \mathbb{Q}$ along with $A,B\neq 0$, then the numerator can clearly take any value, so the distance will be 0. Otherwise, $\frac{A}{B}\in \mathbb{Q}$, and we may scale by some constant $\lambda\in \mathbb{R}$ such that $A,B$ are integers. Thus, WLOG $A,B$ are integers with $\gcd(A,B)=d$. Then, $\{Ax_0+By_0 \mid x_0,y_0\in \mathbb{Z}\}= d\mathbb{Z}$. Thus, by pigeonhole \begin{align} \min \frac{|Ax_0+By_0 - C|}{\sqrt{A^2+B^2}}\leq \frac12 \cdot(\frac{|d\cdot \lfloor \frac{C}{d}\rfloor - C|}{\sqrt{A^2+B^2}}+\frac{|d\cdot \lceil \frac{C}{d} \rceil- C|}{\sqrt{A^2+B^2}})\\ =\frac{d}{2\sqrt{A^2+B^2}} \leq \frac{d}{2\sqrt{d^2+d^2}} = \frac{1}{2\sqrt{2}} \end{align} so we are done. $\blacksquare$.