Find the total number of points having integral co-ordinates that lie inside the triangle having vertices as ( 0 , 0 ) , ( 0 , 2 0 1 9 ) and ( 2 0 1 9 , 0 ) .
Bonus: Can you generalize this for a triangle having vertices as ( 0 , 0 ) ( 0 , n ) and ( n , 0 ) ?
Try also Integral Co-ordinates--2 .
Try Also Integral Co-ordinates -3
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
So its a triangular number! Wow! Nice one. Sir I did like you have a look a bit modified version of this problem and let me know if I am right there.
Let's directly do the general formula.
We will use two different methods to calculate the area of the triangle, one of them involves the number of points inside, so we can set both formulas equal to each other and solve this equation.
First, the area of the triangle is simply A 1 = 2 1 ⋅ b ⋅ h = 2 1 n 2 .
Now, there is another way to calculate this area that involves the number of points inside the triangle. By Pick's theorem , the area is A 2 = I + 2 B − 1 where I is the number of points inside the shape (it works for any shape without holes) and B is the number of points on the boundary of the shape. We can find B by counting the number of points on all three sides. There are ( n − 1 ) on each side, plus the 3 corners, so the area is A 2 = I + 2 3 + 3 ⋅ ( n − 1 ) − 1
Since both ways calculate the same area, they must be equal.
A 1 2 1 n 2 n 2 2 I I = A 2 = I + 2 3 + 3 ( n − 1 ) − 1 = 2 I + 3 n − 2 = n 2 − 3 n + 2 = 2 1 n 2 − 2 3 + 1 = 2 1 ( n − 1 ) ( n − 2 )
For the specific case of n = 2 0 1 9 , we can calculate I as 2 1 ( 2 0 1 9 − 1 ) ( 2 0 1 9 − 2 ) = 2 0 3 5 1 5 3 .
Shouldn't the last step be 2 1 ( n − 1 ) ( n − 2 ) ?
Bro, can you help me with ( 0 , 0 ) , ( 0 , n ) and ( m , 0 ) vertices? A bit stuck there:)
Log in to reply
Using my strategie, we set 2 1 n m and I + 2 B − 1 equal to each other. To determine B, we again have the 3 vertices of the triangle plus a side of n and m respectively, plus the number of integral points on the hypotenuse, let's say h . This number is equal to the number of solutions in the positive integers to the linear diophantine equation m y + n x = n m because every point ( x , y ) on the hypotenuse corresponds to exactly one solution.
To find the number of solutions, we use the fact that, if
(
x
0
,
y
0
)
is a solution, then
(
x
0
+
t
g
cd
(
n
,
m
)
n
,
y
0
−
t
g
cd
(
n
,
m
)
m
is also a solution for all integers
t
.
x
0
and
y
0
can be taken as
x
0
=
0
,
y
0
=
n
.
We now have to count the number of
t
values such that
x
and
y
are still positive. For this, we seek the
t
that makes
y
=
0
.
n
−
t
g
cd
(
n
,
m
)
m
=
0
⇔
t
=
m
n
g
cd
(
n
,
m
)
. Since this
t
makes
y
=
0
, the previous integer will be the greatest possible integer, and also the number of solutions, which is therefore
h
=
m
n
g
cd
(
n
,
m
)
−
1
.
Now, let's solve the equation
2 1 n m n m I = I + 2 3 + n + m + h − 1 = 2 I + n + m + h + 1 = 2 1 ( − n m + n + m + h + 1 ) = 2 1 ( − n m + n + m + m n g cd ( n , m ) − 1 + 1 ) = 2 1 ( − n m + n + m + m n g cd ( n , m ) ) .
However, I have no idea if this is right. If you find any mistakes, please correct me.
Thank you for your help:)
You can check this by taking a case where n = 1 and m = k where k is any integer and we do observe that for all these cases the number of integral interior points are 0 .
Your formula is a bit confusing. You may check with this general cases.
Consider a square having vertices ( 0 , 0 ) , ( 0 , n ) , ( n , 0 ) and ( n , n )
Cut it along the diagonal ( n , 0 ) , ( 0 , n ) , We get our required triangle. Now, we need to find the total number of point inside this triangle. This triangle has a total of 2 1 ( n − 1 ) ( n − 1 ) = 2 1 ( n − 1 ) 2 number of points (integral) that lie inside it.
But actually when we observe we have counted the points that lie along the line y = x twice. Hence, we need to remove that extra countings.
Observe that the hypotenuse and y = x meet at ( 2 n , 2 n ) .There are a total of ( n − 1 ) points between Origin and ( 2 n , 2 n ) .Hence, we need to remove a total of 2 1 ( n − 1 ) number of points.
Hence, N n = 2 1 ( n − 1 ) 2 − 2 1 ( n − 1 ) = 2 1 ( n − 1 ) [ ( n − 1 ) − 1 ] = 2 1 ( n − 1 ) ( n − 2 )
N n = 2 1 ( n − 1 ) ( n − 2 )
So for n = 2 0 1 9
N 2 0 1 9 = 2 1 ( 2 0 1 9 − 1 ) ( 2 0 1 9 − 2 ) = 2 0 3 5 1 5 3
Please correct me if I am wrong.
You're absolutely right! It would be interesting to see your way to get this.
Mine one is a bit difficult to explain. I will try anyways. Thanks :)
Problem Loading...
Note Loading...
Set Loading...
It can be clearly seen that for an isosceles right triangle of leg length n , the number of points with integer coordinates is the triangular number T n − 2 = k = 1 ∑ n − 1 k = 2 ( n − 2 ) ( n − 1 ) . Therefore, for n = 2 0 1 9 , T 2 0 1 7 = 2 2 0 1 7 × 2 0 1 8 = 2 0 3 5 1 5 3 .
Alternative Solution: After solving a tougher problem Co-ordinates--2 , the following general solution for right triangle with ( 0 , 0 ) , ( 0 , n ) , and ( m , 0 ) as vertices is obtained.
N △ ( m , n ) = 2 m n − m − n − g cd ( m , n ) + 1 where g cd ( m , n ) is the greatest common divisor of m and n .
For m = n , we have N △ ( n , n ) = 2 n 2 − 3 n + 1 = 2 ( n − 1 ) ( n − 2 ) . The same solution as above.