## Welcome to BrainDen.com - Brain Teasers Forum

Welcome to BrainDen.com - Brain Teasers Forum. Like most online communities you must register to post in our community, but don't worry this is a simple free process. To be a part of BrainDen Forums you may create a new account or sign in if you already have an account. As a member you could start new topics, reply to others, subscribe to topics/forums to get automatic updates, get your own profile and make new friends. Of course, you can also enjoy our collection of amazing optical illusions and cool math games. If you like our site, you may support us by simply clicking Google "+1" or Facebook "Like" buttons at the top. If you have a website, we would appreciate a little link to BrainDen. Thanks and enjoy the Den :-) |

# Apples and Monkeys

### #21

Posted 19 April 2008 - 04:38 AM

Wow, if I need to use Excel to calculate the share, and it takes some minutes to figure out; how could the 5 monkeys can do counting (without mistakes, do they do double checking), dividing (again, gurantee no mistake) and hiding their individual share one by one in 1 overnight time?

Are they supermonkey?

Just kidding.

### #22

Posted 19 May 2008 - 03:14 AM

In the puzzle

He Says He finds out that there is an extra, and eats it

he did not say there is 1 extra .

i think here that "there is an extra" means that the extra number is unknown

and "eats it" means he eats this extra

He finds out that there is an extra, and eats it

an & it are singular therefore only 1

**Edited by Mistwalker, 19 May 2008 - 03:15 AM.**

### #23

Posted 03 June 2008 - 02:56 AM

In the puzzle

He Says He finds out that there is an extra, and eats it

he did not say there is 1 extra .

i think here that "there is an extra" means that the extra number is unknown

and "eats it" means he eats this extra

"an" is grammar for "a". the n is added to the "a" because of the following vowel "e" in extra. therefore a is equal to one. also, the word extra should be "extras" when speaking of the second monkeys findings. this riddle is either written incorrect or your answer is wrong.

### #24

Posted 24 November 2008 - 04:35 AM

In the puzzle

He Says He finds out that there is an extra, and eats it

he did not say there is 1 extra .

i think here that "there is an extra" means that the extra number is unknown

and "eats it" means he eats this extra

Solutions are of the form X + N*(5**5) . (N more apples for each at the end). X = -4 works. Start with -4 apples, the monkey first eats an apple then divides the -5 apples, takes -1 and leaves -4 for the next monkey. -4 is not a feasible solution, so add 3125 (5**5) for the same answer that Senior Member posted: 3121.

### #25

Posted 01 March 2009 - 05:00 AM

12496 works but it's not the smallest number. I made some subtle mistake about the form the starting and ending piles must be in.

### #26

Posted 01 March 2009 - 05:41 AM

Let N(0) be the number of apples the FIRST monkey sees when he wakes up, N(1) is the number the second monkey sees, etc etc, and N(5) is the number that is left at the end of the whole slumber party.

All piles except the first and last pile must have a number N() of apples of the form

N(i) = p(i+1) * 5 + 1 = p(i) * 4

for some set of numbers p(i), where i ranges from 1 to 5. You can think of p(i) as the size of the sub-piles that monkey (i) makes when he sorts his apples.

The final pile is simply of the form

N(5) = p(5) * 4

and the first pile is of the form

N(0) = p(1) * 5 + 1

You can then verify that, for all p(i) to be integers, we must have for i ranging from 1 to 4 that

N(i) =(5 n(i) - 1) * 4 = (4 n(i) -1) * 5 +1 = 20 * n(i) - 4

for some integers n(i), where

p(i) = 5 * n(i) – 1 = 4 * n(i-1) -1.

Working backwards from a pile of such form, say N(4), it is necessary and sufficient that the previous pile correspond to n being increased by some integer multiple of 4, in order to ensure that the previous pile will remain in the stated form.

Call this quantity m(i) = n(i) – n(i+1). To restate, all m(i) except m(1) must be divisible by 4, and i runs from 1 to 3. (This is the subtle part that I missed: m(1) does not have to be divisible by 4. If you make m(1) divisible by 4, you get my answer of 12496.)

Each time we iterate backward, m also increases. (That is, m(2) > m(3), etc)

You can check that, each iteration going backwards, m must increase by a factor of 5/4. Since this must happen twice going from m(3) backwards to m(1), then m(3) must be divisible by 4^2, i.e, 16.

The smallest nonzero integer divisible by 16 is 16, so m(3)=16. I think this is both necessary and sufficient, but I haven't quite nailed the proof.

Anyway m(3) = 16 means that n(4) = 64, since you can verify that n(i) = 4 * m(i-1).

From that you can back out that N(0) = 3121. No computer needed if you don't make subtle logic mistakes. :)

I'm going home. My brain hurts. I'm sure I've made a couple typos in here since the notation I actually used on my notepad was COMPLETELY different and I probably messed the translation up somewhere.

### #27

Posted 01 March 2009 - 05:50 AM

### #28

Posted 01 March 2009 - 09:26 AM

After a drive home and a few glasses of wine, here's what I have:

The general answer for M monkeys is as follows:

let h(M) = (M-1) * (M * (M-1)^(M-2) - 1)

let f(n) = M * n / (M-1) + 1

The answer for the minimum number of apples N to start with is then

N = f( f( f( ... f( h(M) ) ... ) ) )

... where f() is applied recursively, M-1 times.

I'm happy to see that this follows the form I suggested for the general answer, with i being h(M) above, j=0, and k=1.

If we were to restate the problem for 10 little monkeys the answer would be 9,999,999,991 apples instead of 3121.

Here are the solutions for M=3 up to M=10:

M N

=====

3 25

4 253

5 3121

6 46,651

7 823,537

8 16,777,209

9 387,420,481

10 9,999,999,991

The formula doesn't hold for M < 3. For M=2, it yields 3, when the correct answer is 7. This is because of the condition that after the final monkey is done, there must still be some apples left.

I think it holds, though, for all M >= 3. If anybody finds differently, let me know.

**Edited by mrentropy, 01 March 2009 - 09:32 AM.**

### #29

Posted 01 March 2009 - 06:09 PM

N = M^M - M + 1.

### #30

Posted 01 March 2009 - 06:34 PM

#### 0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users