How can we find the coordinates of a triangle, given its area and perimeter? (We can find any triangle that satisfies the given area and perimeter)

I tried to find the lengths of the sides of the triangle in the following way:

Consider the sides as $x, y, z$, altitudes as $p, q, r$, area as $A$ and half the perimeter as $s$.

Then, $px = qy = rz = 2A$ and $A=\sqrt{(s)(s-x)(s-y)(s-z)}$.

I will be computing this answer on my PC and for this method, the best time complexity I could think of is $O(n^{2}.log(n))$, where $n$ is the length of side.

How can I further reduce the problem further and also improve my solution for this problem?

  • 1
    $\begingroup$ Two quantities known, three required, so there are in general many solutions. $\endgroup$ – André Nicolas Nov 20 '14 at 17:03

As André Nicolas and Ross Millikan have said there are usually an infinite number of solutions (unless you have an equilateral triangle or there are no solutions).

For example, among triangles with perimeter $98$ and area $420$ are those with sides $24,37,37$ and $25,34,39$ and $29,29,40$. The following picture comes from my page called Triangles with the same area and perimeter

enter image description here

If you want to find a solution, note that there are usually two isosceles triangles with given perimeter and area , which are easily found.

Another related article worth reading is Angles, Area, and Perimeter Caught in a Cubic by George Baloglou and Michel Helfgott, published in Forum Geometricorum, Volume 8 (2008) 13–25

  • $\begingroup$ One solution of the "base" of an isosceles triangle is $\dfrac{p}{3}\left(\dfrac12 + \cos\left(\dfrac{ \arccos\left(1-864\frac{A^2}{p^4}\right)}{3}\right) \right)$ so each of the other sides is half of what remains of the perimeter $\endgroup$ – Henry Nov 20 '14 at 17:31

You can't. You don't even have enough data to find the sides, as you have two equations in three unknowns. After that, you can translate and rotate the triangle without changing the area or perimeter, so you have (in 2D) three more unknown parameters.

  • $\begingroup$ Ok, I will modify the problem slightly. We can find any triangle that satisfies the given area and perimeter. $\endgroup$ – xennygrimmato Nov 20 '14 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.