Number of lattice points inside a right triangle

54 Views Asked by At

Let $O(0,0)$, $A(0,6)$ and $B(6,0)$ three lattice points in $\mathbb{Z} \times \mathbb{Z}$. How many points could you choose inside or on the borders the triangle so that no line formed by two of these points is parallel with one of the triangle's sides?

Attempt:

My answer is: $4$. Let's prove that $5$ is too much. Let's observe that, if we choose $M(x, a)$ and $N(x, b)$, $MN || OA$. Similarly, if we choose $P(c, y)$ and $Q(d, y)$, $PQ || OB$. It's also easy to observe that, if $u + v = w + t$, and we choose $R(u, v)$ and $S(w, t)$, $RS || AB$.

Then, $5$ out of $7$ ($0, 1, \dots, 6$) $x$-coordinates and $5$ out of $7$ ($0, 1, \dots, 6$) $y$ -coordinates are present, and, also, $5$ out of $7$ possible sums of coordinates are present. Let $a, b, c, d$ the $x/y$ coordinates not chosen and $e, f$ the sums not chosen. Therefore, the following relation is true: $$42 - (a + b + c + d) = 21 - (e + f)$$

Which means: $$(a + b + c + d) - (e + f) = 21$$

So, if we choose $a = b = 6$ and $c = d = 5$ (the maximum possible sum), one of $e$ and $f$ is mandatory $6$ since the coordinate sum could not be formed otherwise. So, the maximum possible sum would be: $$6 + 5 + 5 + 4 - 0 - 1 = 19 < 21$$

Contradiction. So, $4$ would be the maximum number (consider the triangle's median).

Is my solution attempt correct?