There is a watermelon seller who begins the day by selling his watermelons. Till evening he has still some watermelons left (say x). He wants to sell all the remaining melons. So decide to put up a offer. The offer states that if you buy half of the watermelons left then you will get an extra half melon free. Hearing this offer four person come one by one and buys the melons with the offer. At the end, no watermelon is left, Can you find the watermelons at the evening when he put up the offer (x) ?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Working backwards:
Each buyer takes ( 1 / 2 ) of what is available when he shows up, plus ( 1 / 2 ) melon. One way to see this is that, if z is the number before he buys and y is the number after he buys, then y = 2 z − 2 1 .
Reversing that, we see z = 2 y + 1 . Let this function be called f ( y ) .
If we see that there are 0 after four buyers, then x = f ( f ( f ( f ( 0 ) ) ) ) = f ( f ( f ( 1 ) ) ) = f ( f ( 3 ) ) = f ( 7 ) = 1 5 .