# Sunday Times Teaser 2627 – Inversion

### by H Bradley and C Higgins

A triangle whose side lengths in centimetres are consecutive integers is cut out of a sheet of plywood leaving a hole in it.

To turn the triangle over and fit it back into the hole, it has to be cut into three pieces with two straight cuts, each starting at the midpoint of a side.

Each piece (two having the same perimeter) can then be turned over and put back into its original position in the hole.

What are the lengths of the sides of the original triangle?

1. I didn’t find an easy way of doing this one using Python so I did it manually. Here is my solution giving sides of 5, 6 and 7 centimetres: 2. 3.  From this diagram we can see that $$x=b\cos\alpha$$ and $$y=a\cos\beta$$ so we can express x and y as follows using the cosine rule: $x = \frac{b^2+c^2-a^2} {2c}\quad\text{and}\quad y=\frac{a^2+c^2-b^2}{2c}$ Adding $$x$$ and $$y$$ gives $$x+y=c$$, which shows that this construction can be applied irrespective of the shape of the original triangle. The requirement for two equal perimeters must hence provide the constraint necessary for a solution.
We can now obtain the perimeters of the two triangular pieces as $b+\frac{b^2+c^2-a^2}{2c}=\frac{(b+c)^2-a^2}{2c}\quad\text{and}\quad a+\frac{a^2+c^2-b^2}{2c}=\frac{(a+c)^2-b^2}{2c}$ Since the perimeter of the quadrilateral is $$(a+b)$$, we can express the ratios of the lengths of the three perimeters by multiplying them all by $$2c$$ to give $2(a+b)c \quad : \quad(a+c)^2-b^2\quad : \quad (b+c)^2-a^2$ which is the form used in the following Python program: