TITLE: existence of $99$ lines in $\mathbb{R}^2$ passing through $100^2$ boxes
QUESTION [6 upvotes]: Problem 5 from "Bernoulli Trials Problems for 2017" link

Prove or disprove the following: there exist $99$ lines in $\mathbb{R}^2$ so that for all $k,l \in \{1,2,\cdots, 100\}$, one of the lines passes through the interior of the square with vertices at $(k,l), (k-1, l), (k-1, l-1),$ and $(k, l-1)$.

I'm not sure which lines to choose; the statement may be true. It seems that the lines given by the equations $2x+4y = 3+6k$ for $1\leq k\leq 98$ skip a bunch of squares (they have slope $-1/2$ and intercepts at $y = \frac{3+6k}4$ for each $k$), so I might have to choose the lines differently. There are $10^4$ squares that the $99$ lines need to pass through, so on average each line should pass through over $100$ squares. So if the statement is false, perhaps the Pigeonhole argument might be useful?

Of course, one could just sketch out the lines in desmos, but that doesn't really demonstrate why the lines satisfy the given property.


Note: Ideally I'd want a formal proof of why the answer is correct (if you change $n$ to $100$ and the last equation to $2(n-1) x - 2(n-2) = y$). I think there should be one that isn't too tedious and likely uses induction.

REPLY [2 votes]: I said I'd leave this to someone else, but here we are...this formalizes my other answer in a way that mimics how I understood the pictures.

The lines $2x +4y=3+6k$ ($k=1,2,\dots,n-2$) can be written in the geometric form
$$ \binom {1/\sqrt5}{2/\sqrt5}\cdot \binom x y = \frac{3/2}{\sqrt5}+\frac{3k}{\sqrt5}, $$
showing that the perpendicular distance between consecutive lines is $3/\sqrt5$.

The projection in the direction $\binom {1/\sqrt5}{2/\sqrt5}$  of any unit length square parallel to the axes has length
$$ \binom {1/\sqrt5}{2/\sqrt5}\cdot \binom 11 = \frac3{\sqrt 5}.$$
Corollary 1: No square can fit strictly between two consecutive lines.

For all $k$, $2x+4y=3+6k$ has no integer solutions in $x,y$. Proof: $3$ is odd, but $2x+4y-6k$ is even.


Corollary 2: All these $n-2$ lines pass through the interiors of the squares they touch.
Corollary 3: All the squares with points between the first and last line are covered.
Now we just check which squares do not have points between the first and last lines. Note that the region below the first line is given by
$$ 2x+4y < 9.$$
We need to find integer solutions; this will give us the upper right corners of squares we left out.
Clearly (as $x,y\ge1$) if $x>4$ or $y>3$, then they're too large. So we just need to check $x=1,2,3; \ y=1,2$.
| x | y | 2x+4y | <9? |
|---|---|-------|-----|
| 1 | 1 | 6     | yes |
| 1 | 2 | 10    |     |
| 2 | 1 | 8     | yes |
| 2 | 2 | 12    |     |
| 3 | 1 | 10    |     |
| 3 | 2 | 14    |     |

Similarly the upper-right corners of squares above the last line satisfy
$$2(x-1)+4(y-1)>3+6(n-2)=6n-9.$$
The minus ones are because the closest integer coordinates are from the square that contains the last line; see Corollary 3.
Recall we are looking for $x,y\in\{1,2,\dots,n\}$. Make the transformation $X=n-(x-1)$ and $Y=n-(y-1)$. The inequality transforms to
$$ 6n - 2X - 4Y > 6n -9,$$
which is the same inequality as before: $2X+4Y<9$. We are still looking for $X,Y\in \{1,2,\dots,n\}$. Hence, there are four boxes not included:
$$ (x,y)= (1,1),\ (2,1), \ (n,n), \ (n-1,n).$$
Observe that these four boxes are 2 pairs of boxes that are adjacent. So we can choose as our final line a line that passes through the midpoints of each pair. Since $n\ge3$, this $(n-1)$th line is neither horizontal nor vertical, so it passes through all remaining four boxes. QED