You are viewing a single comment's thread. Return to all comments →
Difficulty "Easy"? Seriously? That's deliberate misinformation.
It's HARD. The gyst of the problem is to find triangles where:
a. all sides are integer numbers, and
b. all 3 distances from the angles to the Torricelli point is also whole numbers (not fractional numbers).
For that you need to apply Law of cosines to 120-degree triangles, that would give you equasions like that:
c^2 = p^2+r^2 + pr
Considering p, r, and c are integer numbers, you need to build a collection of pairs (p, r) where p^2+r^2 + pr would give you a square number.
Building this collection is not trivial, here's a useful article on that: http://www.geocities.ws/fredlb37/node9.html
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #143: Investigating the Torricelli point of a triangle
You are viewing a single comment's thread. Return to all comments →
Difficulty "Easy"? Seriously? That's deliberate misinformation.
It's HARD. The gyst of the problem is to find triangles where:
a. all sides are integer numbers, and
b. all 3 distances from the angles to the Torricelli point is also whole numbers (not fractional numbers).
For that you need to apply Law of cosines to 120-degree triangles, that would give you equasions like that:
c^2 = p^2+r^2 + pr
Considering p, r, and c are integer numbers, you need to build a collection of pairs (p, r) where p^2+r^2 + pr would give you a square number.
Building this collection is not trivial, here's a useful article on that: http://www.geocities.ws/fredlb37/node9.html