Half the Watermelons

Logic Level 2

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) ?


The answer is 15.

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.

2 solutions

Richard Desper
Jul 20, 2020

Working backwards:

Each buyer takes ( 1 / 2 (1/2 ) of what is available when he shows up, plus ( 1 / 2 ) (1/2) melon. One way to see this is that, if z z is the number before he buys and y y is the number after he buys, then y = z 2 1 2 y = \frac{z}{2} - \frac{1}{2} .

Reversing that, we see z = 2 y + 1 z = 2y + 1 . Let this function be called f ( y ) f(y) .

If we see that there are 0 0 after four buyers, then x = f ( f ( f ( f ( 0 ) ) ) ) = f ( f ( f ( 1 ) ) ) = f ( f ( 3 ) ) = f ( 7 ) = 15 x = f(f(f(f(0)))) = f(f(f(1))) = f(f(3)) = f(7) = 15 .

Is this known as an interactive function...

Mahdi Raza - 10 months, 3 weeks ago

No, it's an inverse function.

Richard Desper - 10 months, 3 weeks ago
Ron Gallagher
Jul 20, 2020

If x is the original number of watermelons, then after the first person comes by, the seller will have x/2 - 1/2 melons. Then, after the second person, he will have (1/2) (x/2 - 1/2) - 1/2 = (x-1)/4 - 1/2 = (x-3)/4. Then, after the third person, he will have (1/2) (x-3)/4 - 1/2 = (x-7) / 8. Finally, after the fourth customer, the seller will have (1/2)*(x - 7) / 8 - 1/2 = (x - 15) / 16 melons. For this to equal zero, we need x - 15 = 0 or x = 15.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...