T.R | Title | User | Personal Name | Date | Lines |
---|
1094.1 | no "monkey see, monkey do" ? | UTRUST::DEHARTOG | | Fri Jun 30 1989 20:17 | 21 |
| /* The answer is 3121 by brute force */
main(){
int a=6,b,c,d,e,f;
do{ b=4*(a-1)/5;
if(b%5==1){
c=4*(b-1)/5;
if(c%5==1){
d=4*(c-1)/5;
if(d%5==1){
e=4*(d-1)/5;
if(e%5==1){
f=4*(e-1)/5;
if(f%5==0)break;
}
}
}
}
}while(a+=5);
printf("%d\n", a);
}
|
1094.2 | | AITG::DERAMO | Daniel V. {AITG,ZFC}:: D'Eramo | Tue Jul 04 1989 00:48 | 18 |
| re .1 (3121)
Yes.
Let n be how many were in each pile after they divided the
remaining ones up on the next day. So after the fifth
person had finished the night before, there had been 5n.
Therefore before the fifth person divided them there had
been (5/4)(5n) + 1, before the fourth person had divided
them there had been (5/4)^2(5n) + (5/4) + 1, ..., until we
find that originally there had been (5/4)^5(5n) + (5/4)^4 +
(5/4)^3 + (5/4)^2 + (5/4) + 1 = (5/4)^5(5n) + 4((5/4)^5 - 1) =
(5/4)^5(5n+4) - 4 = 3125/1024 (5n + 4) - 4. This is an
integer when 5n + 4 is a multiple of 1024, and is smallest
when 5n + 4 = 1024 in which case there were originally 3125 - 4
or 3121.
Dan
|
1094.3 | Mathematical reasoning is better! | PSYCHE::ROOS | | Wed Jul 05 1989 13:26 | 5 |
|
I like this mathematical solution better than the "brute force"
method.
|
1094.4 | | KOBAL::GILBERT | Don't Worry, Be Bobby McFerrin | Wed Jul 05 1989 15:37 | 6 |
| If the monkey had gotten TWO cocoanuts every night, then there
would've been exactly twice as many cocoanuts. And there would
have been THREE times as many cocoanuts if the monkey has received
three cocoanuts each night.
Draw your own conclusions from this.
|
1094.5 | Holes in an infinite sea of cocoanuts | SUBURB::STRANGEWAYS | Andy Strangeways@REO DTN 830-3216 | Tue Apr 04 1995 12:34 | 9 |
|
Actually, there were (-4) cocoanuts. The first man gave one cocoanut
to the monkey, leaving (-5), then took his share of (-1) and went back
to sleep. The others simply repeated this, leaving (-4) to be shared
out (with one for the monkey) in the morning.
This solution due to Paul Dirac, I believe.
Andy.
|
1094.6 | being a wet blanket | AUSSIE::GARSON | achtentachtig kacheltjes | Fri Apr 07 1995 01:57 | 7 |
| re .5
or perhaps anti-coconuts...
but it should be recognised that in either the case of holes or
anti-coconuts this solution is not in strict accordance with the
wording in the base note.
|