Equilateral triangle resizing

84 Views Asked by At

What is the minimum number of moves to transform an equilateral triangle of size $x$ to an equilateral triangle of size $y$ , where $y < x$ ? For example, for $x = 22$ and $y = 4$ it would be $6$ : $(22,22,22) \rightarrow (7,22,22) \rightarrow (7,22,16) \rightarrow (7,10,16) \rightarrow (7,10,4) \rightarrow (7,4,4) \rightarrow (4,4,4).$

1

There are 1 best solutions below

0
On BEST ANSWER

Let Fn be n-th Fibonacci sequence number, F = (1,1,2,3,5,8,13,...)
The minimum number of moves n is such that Fn-1≤$\frac{x}{y}$<Fn

You can prove it this way: let n=$\frac{x}{y}$ do it opposite way, expanding the smaller triangle as fast as you can, so if x=20 and y=4 it would go like this, (4,4,4)→(4,4,8)→(4,12,8)→(20,12,8)→(20,12,20)→(20,20,20), it is the fastest way so one of the pages reach 20, and 2 more steps to get all of them to 20
It's up to you will you allow triangles like 4,4,8 or only 4,4,7.9999 , on it depends if is Fn-1≤$\frac{x}{y}$<Fn or Fn-1<$\frac{x}{y}$≤Fn

Hope this is ok with you