Geometry
Triangles
Number of triangle with given perimeter
Let us assume sides of a triangle are integers and the perimeter of the triangle is 6, and we need to calculate how many such triangles exist. Since each side is less than half of the perimeter of the triangle so each side will be less than 3. Also sum of the two smaller sides must be bigger than the third side. In this case there is only one triangle (2, 2, 2).
Now take another example the perimeter is now 9, then each side will be less than or equal to 4, the possible triangles are (4, 4, 1) and (4, 3, 2).
For such questions we can use indirect formula to calculate number of triangles with the given perimeter. Let the perimeter is \(p\), then number of such triangles, \(n\) is given by:
\[\color{blue}{n = \left\{ {\begin{array}{*{20}{c}}{\left[ {\cfrac{{{p^2}}}{{48}}} \right]}&{p\;{\rm{is}}\;{\rm{even}}}\\{\left[ {\cfrac{{{{(p + 3)}^2}}}{{48}}} \right]}&{p\;{\rm{is}}\;{\rm{odd}}}\end{array}} \right.}\]
Here \(\left[ {} \right]\)is the nearest integer. For example \(\left[ {\frac{{{{20}^2}}}{{48}}} \right] = \left[ {8.33} \right] = 8\)
Example: Find the number of possible triangles having integer sides such that perimeter of the triangle is 30 cm.
Solution: Number of such triangles = \(\left[ {\frac{{{{30}^2}}}{{48}}} \right] = \left[ {18.75} \right] = 19\)