Thursday, April 03, 2008

Pythagorean 30

Do nontrivial line segments of integer length exist on the hexagonal or triangular lattice?

1 comment :

Sabeel Hakim said...

My thoughts on the triangular lattice:

Yes, there are.
For notational purposes, let [a,b] represent a point on the triangular lattice where a is units of movement right (_) and b is movement diagonally up and right (/).

Let's consider the line segment [0,0] to [a,b]. To calculate the length, we will convert each into rectangular coordinates. [0,0] is simply (0,0). We find that [a,b] = (a+1/2b,sqrt(3)/2b) with simple geometry. Using Pythagorean Theorem, the line segment has length:

sqrt((a+1/2b)^2+(sqrt(3)/2b)^2)
=sqrt(a^2+ab+1/4b^2+3/4b^2)
=sqrt(a^2+ab+b^2).

Therefore, we need to find integers a,b,c such that a^2+ab+b^2=c^2.

Now that I think about it, we could have reached this same conclusion using Law of Cosines. Making a triangle with two of the legs be made entirely of _ and / respectively, results in a triangle with side lengths a and b, and a 120º angle between them. By Law of Cosines, the last side c has the property: c^2=a^2+2abcos(120º)+b^2 = a^2+ab+b^2.

How to find all the solutions to this Diophantine equation is beyond me, but brute force on a calculator confirms that there are indeed solutions: (3,5,7), (7,8,13), (5,16,9), (11,24,31), etc.

This is reminiscent of Euclid's formula for finding Pythagorean triplets, except in this case, we need triplets for a 120º triangle.

Interesting stuff.