Solved

Cocunut tree

Posted on 2008-10-27
15
334 Views
Last Modified: 2008-11-10
a question of coconuts..
An island is inhabited by 5 men and a pet monkey. One afternoon the men gathered a large pile of coconuts, which they proposed to divide equally among themselves the next morning.
During night one of the men awoke and on dividing the nuts into 5 equal parts he found that there was one nut left over which he gave to the monkey. He then hid his one-fifth share.
Later another man awoke with the same idea in mind. He went to the pile, divided into 5 equal parts, and found one nut left over which he gave to the monkey and then hid his 1/5th share.
During the same night, each of the three men arose, went to the pile, and followed the same procedure. Each time one cocnut was left over, and given to monkey.
The next morning, all 5 men went to the diminished pile and divided into 5 equal parts, finding that one coconut remained over which they gave to the monkey.
What is the least number of nuts the original pile could have contained?
0
Comment
Question by:jaisonshereen
  • 4
  • 3
  • 3
  • +3
15 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 22819482
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 22819980
3121
0
 
LVL 84

Accepted Solution

by:
ozo earned 250 total points
ID: 22820059
n * 5^5 - 4
According to the discussion in another question, negative coconuts can't exist,
and 6246 is larger than 3121
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 31

Expert Comment

by:Paranormastic
ID: 22822846
6 events:
a=5x+1
b=5(a)+1
c=5(b)+1
d=5(c)+1
e=5(d)+1
f=5(e)+1

a=5x+1
b=25x+6
c=125x+31
d=625x+156
e=3125x+781
f=15625x+3906

for x=1
a=6
b=31
c=156
d=781
e=3906
f=19531

Answer: 19,531 coconuts in the original pile.
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 22823181
Paranormastic, Isnt that ridiculous? Unless 3121 is a wrong answer how can 19531 be the minimum, possible?

Saqib
0
 
LVL 31

Expert Comment

by:Paranormastic
ID: 22823497
Oops, thought through this one wrong...  Ozo would be correct.  
3121 total
2496 =4/5 of 3121-1
1996 =4/5 of 2496-1
1596 =4/5 of 1996-1
1276 =4/5 of 1596-1
255 =1/5 of 1276-1
0
 
LVL 31

Expert Comment

by:Paranormastic
ID: 22823502
I just wanted more coconut cream pie!
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 22823597
;-)
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 22826771
Surely all 5 of the men divide the coconuts...and then there's a further division by 5.....which means that the number is 15621
0
 
LVL 15

Expert Comment

by:lyonst
ID: 22827201
The smallest answer: 15,621
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 22827971
Is that smaller than 3121?
0
 
LVL 50

Assisted Solution

by:barry houdini
barry houdini earned 250 total points
ID: 22829633
In my view 15621 is the answer to the question

That's the least number of nuts that the original pile could have contained

If there were 3121 coconuts to start then after the first man gives one to the monkey and takes away a fifth there will be 2496 left

After man 2 gives 1 to the monkey and takes away a fifth there will be 1996
After man 3 gives 1 to the monkey and takes away a fifth there will be 1596
After man 4 gives 1 to the monkey and takes away a fifth there will be 1276
After man 5 gives 1 to the monkey and takes away a fifth there will be 1020

But this amount left needs to be (5*n)+1 where n is an integer, which it isn't

If you start with 15621 the numbers reduce as follows

15621
12496
9996
7996
6396
5116

So 5116 coconuts are left in the morning. The monkey gets one and each man has 1023

0
 
LVL 18

Expert Comment

by:deighton
ID: 22830130
0
 
LVL 18

Expert Comment

by:deighton
ID: 22830135
that didn't work, but i made a script that came up with 15621

javascript:coc();function coc() {        var ok = false;    for(var c = 1; c < 50000 ; c++)    {        var itest = c;        for(var r=0; r < 6;r++)    {             itest = reduce(itest);                if (itest == -999) break;                 if (r == 5) {alert(String(c));ok=true;}}if (ok) break;    }        }    function reduce(x){    if ((x-1) % 5 == 0)return 4 * (x - 1) / 5;return -999;}                    

Open in new window

0
 
LVL 18

Expert Comment

by:deighton
ID: 22830137
cut and paste above script into firefox url line
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sample Space 12 51
Rounding Values 11 59
Independent Events 4 83
Does a rhombus have 2 pairs of parallel sides 5 99
A Guide to the PMT, FV, IPMT and PPMT Functions In MS Excel we have the PMT, FV, IPMT and PPMT functions, which do a fantastic job for interest rate calculations.  But what if you don't have Excel ? This article is for programmers looking to re…
This article provides a brief introduction to tissue engineering, the process by which organs can be grown artificially. It covers the problems with organ transplants, the tissue engineering process, and the current successes and problems of the tec…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question