Integral Co-ordinates -2

Algebra Level 2

Find the total number of points having integral co-ordinates that lie inside the triangle having vertices as ( 0 , 0 ) , ( 0 , 360 ) (0,0) , (0,360) and ( 720 , 0 ) (720,0)


Bonus: Can you find the total number of such integral points inside a triangle having vertices as ( 0 , 0 ) , ( 0 , n ) (0,0),(0,n) and ( m , 0 ) ? (m, 0)?

Try also Integral Co-ordinates .

Try Also Integral Co-ordinates -3


The answer is 128881.

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.

2 solutions

Chew-Seong Cheong
Jan 11, 2019

Consider a right triangle of vertices ( 0 , 0 ) (0,0) , ( 0 , n ) (0,n) , and ( m , 0 ) (m,0) . I am using m = 20 m=20 and n = 15 n=15 for convenience. If we consider the rectangle twice the size of the triangle with vertices ( 0 , 0 ) (0,0) , ( 0 , n ) (0,n) , ( m , 0 ) (m,0) , and ( m , n ) (m,n) . Then we can find the number of points with integer coordinates in the triangle as:

N = N rectangle N 4 sides N diagonal-2 2 N_\triangle = \dfrac {N_{\text{rectangle}} - N_{\text{4 sides}}-N_{\text{diagonal-2}}}2

where

  • N rectangle = ( m + 1 ) ( n + 1 ) N_{\text{rectangle}} = (m+1)(n+1) is the total number of points with integer coordinates along the four sides and within the rectangle.
  • N 4 sides = 2 ( m + n ) N_{\text{4 sides}} = 2(m+n) is the number of points with integer coordinates along the four sides of the rectangle.
  • N diagonal - 2 = gcd ( m , n ) 1 N_{\text{diagonal - 2}} = \gcd(m,n)-1 is the number of points with integer coordinates along a diagonal or the hypotenuse of the rectangle but excluding the two at ( 0 , n ) (0,n) and ( m , 0 ) (m,0) , where gcd ( m , n ) \gcd(m,n) is the greatest common divisor of m m and n n .

Therefore,

N = ( m + 1 ) ( n + 1 ) 2 ( m + n ) gcd ( m , n ) + 1 2 = m n m n gcd ( m , n ) 2 + 1 \begin{aligned} N_\triangle & = \frac {(m+1)(n+1) - 2(m+n)-\gcd(m,n)+1}2 \\ & = \frac {mn - m-n - \gcd(m,n)}2 + 1 \end{aligned}

For m = 720 m=720 and n = 360 n=360 , N = 720 × 360 720 360 360 2 + 1 = 128881 N_\triangle = \dfrac {720\times 360 - 720-360-360}2 + 1 = \boxed{128881} .

Sir I did like to see your solution for a higher version :)

A Former Brilliant Member - 2 years, 5 months ago

Log in to reply

That one is not that easy.

Chew-Seong Cheong - 2 years, 5 months ago

Hmm, I see. Then how did you got the answer? I mean as far as I remember you were the first one to answer that.

A Former Brilliant Member - 2 years, 5 months ago

Log in to reply

The triangle is so small. I just draw it out to scale and count.

Chew-Seong Cheong - 2 years, 4 months ago

Yeah, even I did the same for verification :)

A Former Brilliant Member - 2 years, 4 months ago

Using Pick's Theorem as used by @Henry U in my previous simpler version of this problem.

The Area of a Polygon, A = I + B 2 1 {\color{#20A900}{A= I + \dfrac B2 -1 }}

Here, I I is the total number of interior points inside the polygon.

B B is the total number of points on the boundary of the polygon.

Here, we can simply tell that area of our triangle having ( 0 , 0 ) , ( 0 , n ) (0,0),(0,n) and ( m , 0 ) (m, 0) as vertices is A = 1 2 m n A'= \dfrac 12 mn

Now, we need to find B B we have n n points on one side and m m points on another side and origin and also k k points on the hypotenuse.

We get k = g c d ( n , m ) 1 k = gcd(-n, m) -1 For detailed explanation visit .

Now we have, A = A A=A'

1 2 m n = I + 1 2 ( 1 + m + n + g c d ( n , m ) 1 ) 1 \dfrac 12 mn = I + \dfrac 12( 1 + m +n + gcd(-n, m)-1) -1

We get I = 1 2 m n 1 2 ( m + n + g c d ( n , m ) ) + 1 I = \dfrac 12 mn - \dfrac 12 (m + n + gcd(-n, m)) + 1

Finally, N ( n , m ) = I = 1 2 ( m n m n g c d ( n , m ) ) + 1 \boxed{{\color{#20A900}{N_{(n, m) } = I = \dfrac 12 ( mn -m -n -gcd(-n, m)) + 1 }}}

Hence, for n = 360 , m = 720 n =360 , m = 720

N ( 360 , 720 ) = 1 2 ( 720 × 360 720 360 g c d ( 360 , 720 ) ) + 1 = 128881 N_{(360,720)} = \dfrac 12( 720\times 360 - 720 - 360 - gcd(-360,720)) + 1 = \boxed{128881}

I might be seriously wrong, please do correct me if so.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...