Five men were stuck in a desert island. The island was plentifully supplied with coconuts, fortunately, and they spent the first day gathering the coconuts, heaping them in a great pile.
That night, one of the men was sleepless at the thought that everyone would fight over the coconuts at daybreak. So he arose, crept to the pile, and counted out the coconuts. Except for one coconut, it was possible to divide the pile into five equal portions. He gave the extra coconut to the monkey (who was the only other living being on the island besides those five men), buried his share of the coconuts, then went back to a sound sleep leaving the rest again in a pile.
Then another man got up and stole to the pile with the same object in mind. Again there was one coconut left over. The second man gave the spare coconut to the monkey, buried (what he thought was) his fair share, and went back to sleep, again leaving the remaining coconuts in one pile.
One by one, the remaining men got up and did the same and everytime the monkey got his share of one coconut.
In the morning, the men divided whatever coconuts remained into five equal piles, each taking his share and saying nothing about the night just past.
What is the minimum number of coconuts the five men assembled on the first day, if in the Final Division:
(a)There was again one coconut left over and the men (as usual) gave it to the monkey.
(b) There was no coconut left over for the monkey.
Note: to make it shorter, I will suppose all variables are positive integers...
I'm gonna give the solution for the first part, and the second one is solvable the same way, but with other calculations...
Suppose we have x coconuts at the beginning. Then we kno that x - 1 = 5a, for some a, since the first man takes a fifth of x - 1. So by taking a (1/5 of x - 1), he leaves 4a. Now we know that the second man takes one fifth of 4a - 1, so, for some number b:
4a - 1 = 5b proceeding this way, we get the following equations:
x - 1 = 5a
4a - 1 = 5b
4b - 1 = 5c
4c - 1 = 5d
4d - 1 = 5e
Now, the fifth man takes e coconuts, leaving 4e for the next morning. If they give one of those to the monkey, then, 4e - 1 = 5f for some f. In part b), we get the equation 4e = 5f for some f. Now I'm gonna solve only the first system of equations. The last one says:
4e - 1 = 5f so 4 divides 5f + 1. So 4 divides 4f + f + 1, so it divides f + 1. So f = 4g - 1, for some g. Substitution in 4e - 1 = 5f yields:
4e - 1 = 20g - 5 which is:
e = 5g - 1. Substitution in 4d - 1 = 5e yields:
4d - 1 = 25g - 5 which is:
4d = 25g - 4. So 4 divides 25g - 4, thus, it divides g. So g = 4h for some h. Substitution in 4d = 25g - 4 yields after cancellation:
d = 25h - 1. Substituting that in 4c - 1 = 5d we get:
4c - 1 = 125h - 5, which is: 4c = 125h - 4. So 4 divides 125h - 4, thus, it divides h. So h = 4i for some i. Substituting that into the previous equation, and cancelling, we get:
c = 125i - 1 Putting that value in 4b - 1 = 5c, we get:
(solution continues in part 2)
Posted by Fernando
on 2003-03-26 09:41:59