Puzzle time - Coconuts and a monkey
-
Five men and a monkey, marooned on an island, collect a pile of coconuts to be divided equally the next morning. During the night, however, one of the men decides he'd rather take his share now. He tosses one coconut to the monkey and removes exactly 1/5 of the remaining coconuts for himself. After he leaves, a second man, reasoning similarly, gets up, tosses one coconut to the monkey, and takes 1/5 of the remaining coconuts. A third, fourth, and fifth man follow, each unaware of the others.
In the morning, one more coconut goes to the monkey and the rest are split equally among the five men. What's the smallest original number of coconuts needed to make this whole scenario possible?
-
Are you allowing fractions of coconuts?
-
Nope.
-
Ugh, I want to sit down and work this one out (seems a bit more straightforward than some of the others), but no time. I have an aqua load of work to do before driving to Cincinnati this afternoon.
-
Then solve it, bitch.
It’ll keep you away from the piano.
-
Nope. But close.
-
Oh, and show your reasoning rather than code it up.
-
Seriously try your hand at it for real. But yes that’s the right number.
-
I will have to think this, but looking at it quickly, each time the number of coconuts would have to be divided by 5. It couldn’t because each time you throw to monkey, it makes an non five number.
Hmmmmm. 🧐
Interesting to think
-
@kluurs said in Puzzle time - Coconuts and a monkey:
You know he just assigned the problem to his strudents and then went back to struggling with performing the Fröhlicher Landmann with both hands.
LOL
Actually, I performed it as "Angry Farmer who comes home drunk and beats his wife and kids".
-
@jon-nyc said in Puzzle time - Coconuts and a monkey:
Seriously try your hand at it for real. But yes that’s the right number.
So you want me to actually think?
I'd say the key idea here is the observation that it is sufficient to consider "the rest are split equally among the five men". It is sufficient to demand that this number is integer. If it is, everything else will be integer, too, because it's all multiplication with 5 and addition of integers only (which preserves integer-ness).
Based on that idea, one can combine all the information given in the puzzle into a huge equation which however only has a single variable, namely the number of coconuts x. The result is the number of coconuts from the sentence quoted above, y.
When doing it in the most straightforward way, the equation gets very long and quite repetitive. It looks like this:
y = 0.2(x - 0.2(x-1) - 0.2(x-0.2(x-1)-2) - 0.2(x-0.2(x-1)-0.2(x-0.2(x-1)-2)-3)-0.2(x-0.2(x-1)-0.2(x-0.2(x-1)-2)-0.2(x-0.2(x-1)-0.2(x-0.2(x-1)-2)-3)-4)-0.2(x - 0.2(x-1) - 0.2(x-0.2(x-1)-2) - 0.2(x-0.2(x-1)-0.2(x-0.2(x-1)-2)-3)-0.2(x-0.2(x-1)-0.2(x-0.2(x-1)-2)-0.2(x-0.2(x-1)-0.2(x-0.2(x-1)-2)-3)-4)-5)-6)
This can be simplified (multiplying everything out) to:
y = 0.2(0.32768x-3.68928)
To turn this into a true linear Diophantine equation (with integer coefficients), this can be rewritten as:
32768x - 500000y = 368928
According to Bézout's identity, this equation has an integer solution if the greatest common divisor of 32768 and 500000 (which is 32) divides 368928. This is true hence a solution exists.
Such a linear Diophantine equation can be solved using a variant of the Euclid algorithm for greatest common divisor described here. Applying that method to the equation above yields the solution space
x = -55062504 + k*15625
y = -3608577 + k * 1024The smallest x that is positive is for k = 3525:
-55062504 + 3525 * 15625 = 15621.This is the result I already posted above.
Add or subtract 15625 ad libitum for other solutions.
Any questions?
(Presumably there's a way simpler solution that I don't see, but I think at least it is a solution)
-
@Klaus said in Puzzle time - Coconuts and a monkey:
Any questions?
What is the airspeed velocity of an unladen swallow?
-
@jon-nyc said in Puzzle time - Coconuts and a monkey:
Seriously try your hand at it for real. But yes that’s the right number.
Don't see how Klaus' numerical answer can be correct.
Actually I don't think there is a solution at all.
It seems the problem is over-constraint.
Maybe there is some ambiguity in the problem that I don't understand."Five men and a monkey, marooned on an island, collect a pile of coconuts to be divided equally the next morning." ==> assuming they intend to divide the pile equally among the five men, then the number of coconuts in the initial pile would need to be a multiple of five. (Klaus' answer does not satisfy this criterion.)
"During the night, however, one of the men decides he'd rather take his share now. He tosses one coconut to the monkey and removes exactly 1/5 of the remaining coconuts for himself." ==> this means, from the initial number of coconuts in the initial pile, after subtracting one from that number, the remaining pile is still divisible by five. This does not seem possible, as there is no "multiple of five" that is still divisible by five after subtracting one.