You start with two buckets of water. First bucket has $x$ litres and the second bucket has $y$ litres. Both have enough capacity to hold $x+y$ litres.
Now you do the following:
You take the bucket with the larger amount of water and from that pour water into the other bucket so that the other bucket has double the water.
So if $x \lt y$, then we go from $(x,y)$ to $(2x, y-x)$.
You keep doing this till the buckets have an equal amount of water. Note that in some cases, you will loop indefinitely.
For what initial $(x,y)$ will you be able to equalize the buckets, and not loop indefinitely?
Now you do the following:
You take the bucket with the larger amount of water and from that pour water into the other bucket so that the other bucket has double the water.
So if $x \lt y$, then we go from $(x,y)$ to $(2x, y-x)$.
You keep doing this till the buckets have an equal amount of water. Note that in some cases, you will loop indefinitely.
For what initial $(x,y)$ will you be able to equalize the buckets, and not loop indefinitely?
By observation appears as follows:
ReplyDeleteIf x/y = Xn/Xn-1, where Xn is from the pattern 1, 3, 5, 11, 21... given by Xn = Xn-1 + 2Xn-2 where Xo is 1, X1 is 3.
Somehow dont like the solution, there must be something neater ..
I believe you have it right, but can be phrased in simpler terms. Hint: Consider $x_n + x_{n-1}$
DeleteDid you prove that it works?
btw, you can use latex in the comments. Put them inside dollar signs, so Dollar x_n + x_{n-1} Dollar looks like $x_n + x_{n-1}$.
Actually upon further consideration, you are missing more.
DeleteFor instance, $(x,y) = (15,1)$.
Sorry for the misleading comment earlier.