All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Logic
Monkeys and Coconuts (Posted on 2003-03-26) Difficulty: 3 of 5
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.

See The Solution Submitted by Ravi Raja    
Rating: 3.8571 (7 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
re(4): Possible solution - smaller solution | Comment 14 of 37 |
(In reply to re(3): Possible solution - smaller solution by Ravi Raja)

I also used a program and here it is for (a)
n = 10: tr = 6
DO
  lft = n
  fl = 1
  FOR i = 1 TO tr
    lft = 4 * (lft - 1) / 5
    IF lft <> INT(lft) THEN fl = 0: EXIT FOR
  NEXT
  IF fl THEN
    lft = n
    fl = 1
    PRINT n
    FOR i = 1 TO tr
      lft = 4 * (lft - 1) / 5
      PRINT i, lft
    NEXT
    EXIT DO
  END IF
  n = n + 1
LOOP

  Posted by Charlie on 2003-03-27 09:27:06

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (7)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information