wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> medium >> medium: Coconut Monkey
(Message started by: FlatLine on Jul 25th, 2002, 3:46pm)

Title: medium: Coconut Monkey
Post by FlatLine on Jul 25th, 2002, 3:46pm
I'm having trouble with the coconut monkey problem, can't find a way to calculate a number that is one short of even division by 10, then 9, then 8 and so on. hell, I can't even correctly find a way to express this relationship mathematically. any ideas? I could brute force it with some simple code, but if you had to do that it would be in the CS division of riddles =(

Title: Re: medium: Coconut Monkey
Post by klbarrus on Jul 25th, 2002, 4:50pm
You are looking for a number that is 1 less than being divisible by 10, 9, 8, 7, 6, 5, 4, 3, and 2.

So a number with factors of 9, 8, 7, and 5 works
==> 9*8*7*5 = 2520.  1 less is 2519.

Title: Re: medium: Coconut Monkey
Post by FlatLine on Jul 27th, 2002, 4:42pm
can you please explain how you arrived at the factors of 9 8 7 and 5?

Title: Re: medium: Coconut Monkey
Post by srowen on Jul 27th, 2002, 6:46pm
A number divisible by 9, 8, 7, and 5 will also be divisible by 10 (there's a factor of 2 and 5 in there), 6, 4, 3 and 2.

You can look at the prime factors of 2 through 10 and then just take enough of each factor to "cover" all them.

2 = 2
3 = 3
4 = 2^2
5 = 5
6 = 2 * 3
7 = 7
8 = 2^3
9 = 3^2
10 = 2 * 5

You need three 2s, two 3s, a 5 and a 7 to cover everything. 2^3 * 3^2 *5 * 7 = 2520. Less 1 is your answer of 2519.

Title: Re: medium: Coconut Monkey
Post by Ravi on Oct 2nd, 2002, 4:34am
Um, if we are allowed to assume the monkey isn't satisfied with one single coconut for the night, one that is repeatedly getting bloody at that, then the answer becomes simple.

There were originaly 10 coconuts. Before each man comes up, the monkey takes another coconut.


Title: Re: medium: Coconut Monkey
Post by S. Owen on Oct 2nd, 2002, 7:06am
You could assume that, but that's not what the riddle asks... ?

Title: Re: medium: Coconut Monkey
Post by Carl_Cox on Oct 3rd, 2002, 7:27am
At first I didn't agree with S. Owen about the monkey not being able to take more coconuts; however, rereading the problem, it does seem to indicate that the monkey has only one coconut throughout the night.  Maybe he can't get it open!

Stupid monkeys!

Title: Re: medium: Coconut Monkey
Post by Marc Nielsen on Nov 4th, 2002, 11:20am
klbarrus wrote:
-----------------------------------------------------------
You are looking for a number that is 1 less than being divisible by 10, 9, 8, 7, 6, 5, 4, 3, and 2.

So a number with factors of 9, 8, 7, and 5 works
==> 9*8*7*5 = 2520.  1 less is 2519
-----------------------------------------------------------

That's a hell of a lot of coconuts!!! Guess what - you can do with exactly 2500 less. You're looking for a primal number (i.e. only divisible by 1 and it self).

You know that the number you are looking for +1 is divisble by 10. So, you count.

(Including the monkey's) There can't be a total of 10 coconuts, as 9 is divisible by 9 (and 3 for that matter).
The next round figure is 20. 20-1 = 19, which is a primal number.

Title: Re: medium: Coconut Monkey
Post by Marc Nielsen on Nov 4th, 2002, 11:24am
:-[ Sorry it's late... didn't read the riddle thoroughly enough...

2520 coconuts is still a lot of nuts to gather, though :) - and we're not even counting the castaways or me... :)

Title: Re: medium: Coconut Monkey
Post by Icarus on Nov 4th, 2002, 5:42pm
Marc - I suggest you go ahead and register. Then you can remove embarassing gaffs like that, plus you can track which threads have new posts.



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board