Jump to content


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 :-)
Guest Message by DevFuse
 

Photo
- - - - -

Apples and Monkeys


  • Please log in to reply
31 replies to this topic

#21 woon

woon

    Senior Member

  • Members
  • PipPipPipPip
  • 2443 posts

Posted 19 April 2008 - 04:38 AM

Yup, 3121 is what I found too through Excel.

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.

:D
  • 0

#22 Mistwalker

Mistwalker

    Newbie

  • Members
  • Pip
  • 18 posts

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.

  • 0

#23 rainonme2

rainonme2

    Newbie

  • Members
  • Pip
  • 1 posts

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.
  • 0

#24 pjharren

pjharren

    Newbie

  • Members
  • Pip
  • 1 posts

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.
  • 0

#25 mrentropy

mrentropy

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 01 March 2009 - 05:00 AM

Hmm. I worked it out by pencil and paper but got 12496.

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.
  • 0

#26 mrentropy

mrentropy

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 01 March 2009 - 05:41 AM

Here's how I got my answer:

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.
  • 0

#27 mrentropy

mrentropy

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 01 March 2009 - 05:50 AM

One last thought: Extra kudos to whoever finds the general formula for the answer for arbitrary number of monkeys. I'm pretty sure this is possible so long as iterated functions count as a general formula - in other words, you can say "for M monkeys, you need to generate a function f and some integers i, j and k, all of which depend on M, and the answer is N apples where N = j+ f( f( f( ... f(i)...))), and f() is applied recursively M-k times" for example, and you provide the functional dependence of f, i,j,and k on M, of course.
  • 0

#28 mrentropy

mrentropy

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 01 March 2009 - 09:26 AM

Got it.

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. :D

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.

  • 0

#29 mrentropy

mrentropy

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 01 March 2009 - 06:09 PM

Duuuh --- now that I've had some sleep - the general answer for M monkeys is:
N = M^M - M + 1.
  • 0

#30 mrentropy

mrentropy

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 01 March 2009 - 06:34 PM

..... which follows the form given by pjharry. Sorry to flood the msg board. My interface won't let me delete/edit my previous posts.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users