Does there exist $n$, and $r<2n-2$, such that the $n\times n$ square grid can be connected with an unbroken path of $r$ straight lines?
Note: This has essentially already been asked - see this MSE thread. I am posting this question because I wanted to explicitly focus on one of the unanswered parts.
Notice that $2n-1$ is the trivial solution. This is obtained by either spiralling towards the center, or by zig-zagging up and down. On the other MSE thread, I posted an answer showing $2n-2$ was possible for $n\geq 3$. (this is obtained by reducing to the $3\times 3$ case) I felt $2n-2$ should be optimal, but I couldn't think of a proof. (Also, it is not necessarily clear that for a 100 billion by 100 billion grid you can't use some kind of cleverness to eliminate one single line)
This has been bothering me since I saw it, and I would like to know if anyone has any ideas.
Edit: This is regarding an question/answer I received: Not only are 45 degree lines allowed, but lines in any direction. Naturally 0,45,90 seem like the best since those angles will intersect the most lattice points, and we ask ourselves "Will any optimal solution consist only of lines at these angles?". The answer is a definite no. Consider the following solution to the $10\times 10$ grid which uses 18 lines (so $2n-2$, i.e. currently optimal). Also there is this solution to the $8\times 8 $ grid using 14 lines.
Interestingly, this solution to the $10\times 10 $ generalizes to give another $2n-2$ line solution to the $n\times n$ grid when $n$ is even.