Pedrinho is playing with three triangular pieces with sides $(5,8,10),(5,10,12)$ and $(5,8,12)$ as shown in the drawing below. He can join two pieces by exactly gluing the sides of the same length. For example, he can join the side 10 of the first piece with the side 10 of the second, but he cannot join the side 10 of the first piece with the side 8 of the third, as they do not have the same length. What is the largest perimeter that Pedrinho can obtain by joining the three pieces?

![](https://cdn.mathpix.com/cropped/2024_05_01_80f7f1185898b39e7876g-19.jpg?height=157&width=345&top_left_y=1760&top_left_x=427)

10

![](https://cdn.mathpix.com/cropped/2024_05_01_80f7f1185898b39e7876g-19.jpg?height=157&width=411&top_left_y=1758&top_left_x=891)

12

![](https://cdn.mathpix.com/cropped/2024_05_01_80f7f1185898b39e7876g-19.jpg?height=114&width=412&top_left_y=1802&top_left_x=1416)

12

#
Solution

By adding the perimeters of the three triangles, we have:

$$
(5+8+10)+(5+10+12)+(5+8+12)=23+27+25=75
$$

When we join two triangles using a specific side, the practical effect on the above sum is to reduce it by twice the length of that side, as it no longer contributes to two triangles. To maximize the sum that produces the perimeter, we should make joins using the smallest possible sides. The smallest possible join involves the side of length 5, which can only be done once since there are only three sides of length 5 and we need two of them for such a join. The second smallest possible join involves the sides of length 8.

Thus, we should join the first and third triangles using the sides of length 8. Then, we can join the side of length 5 from the second triangle with any of the sides of length 5 in the already formed figure. Therefore, the largest perimeter is $75-2 \cdot 5-2 \cdot 8=49$. Below is an example of the figure formed with the triangles.

![](https://cdn.mathpix.com/cropped/2024_05_01_80f7f1185898b39e7876g-20.jpg?height=275&width=741&top_left_y=522&top_left_x=563)