Friday, August 19, 2011

A math riddle using modular arithmetic?

On a desert island, five men and a monkey gather coconuts all day; then the men go to sleep, leaving the monkey to guard their stash. The first man awakens and decides to take his share. He divides the coconuts into five equal shares, finding that there is one left over; this he throws to the monkey. He then hides his share of the coconuts and goes back to sleep. The second man awakens a little bit later and similarly decides to take his share; he repeats the scenario (likewise finding one extra coconut and giving it to the monkey for his silence). Each of the three remaining men does the same in turn. When all awaken in the morning, the pile contains a multiple of five coconuts. What is the minimum number of coconuts originally present?

No comments:

Post a Comment