0
$\begingroup$

Where did i go wrong in calculation of lattice points:

Let there be a rectangle ABCD with vertices A($x_1$,$y_1$), B($x_2$,$y_1$), C($x_2$,$y_2$), D($x_1$,$y_2$); where all vertices are lattice points.

Take $x_2 > x_1$, $y_2 > y_1$. Then for AB line segment, y is constant so number of lattice points will depend on x. Such points will be just $x_1$, $x_1 +1$,......,$x_2$. Thus their number would be ($x_2$-$x_1$+1).
Using same arguments for other edges i got:

Number of boundary lattice points, b = 2($x_2$-$x_1$+1) + 2($y_2$-$y_1$+1) - 4(2).
[Subtracting by 4(2) as we have counted every vertex twice.]

Now when $y=y_1$, number of such points is ($x_2$-$x_1$+1).
We get another set of lattice points if we take $y=y_1 +1$, while their number still depending on $x$ remains same. So from $y=y_1$ to $y=y_2$, we get all possible sets of lattice points. Thus ($x_2$-$x_1$+1) will occur ($y_2$-$y_1$+1) times, which is total lattice points of the rectangle. Then, Number of these points in the interior = ($x_2$-$x_1$+1)($y_2$-$y_1$+1) - b.
[Subtracting b as we need only interior points.]

After using the pick's formula, i am getting area to be ($x_2$-$x_1$)($y_2$-$y_1$) + 2 which is 2 more than the correct value.

$\endgroup$
3
  • $\begingroup$ Can you explain how you arrived at those formulas? Also check against the case of the unit square. Did everything match? $\endgroup$ Commented Aug 25, 2024 at 13:07
  • $\begingroup$ Can you explain more on how you solve this question? Thanks. $\endgroup$ Commented Aug 25, 2024 at 13:15
  • $\begingroup$ I have edited my post now for more explanation. $\endgroup$ Commented Aug 25, 2024 at 13:47

1 Answer 1

1
$\begingroup$

I have found the mistake. b should be $2(x_2-x_1+1) + 2(y_2-y_1+1) - 4$ instead of $-8$.

$\endgroup$

You must log in to answer this question.