5 monkeys gather a pile of N peaches. They agree to divide the peaches the following day. Monkey A wakes up before the others, and wants some peaches, so he divides the peaches up evenly. There's a leftover peach, so he rewards himself for his efforts. He takes his share and leaves. A gust of wind then combines the remaining 4 piles into 1. Monkey B wakes up, and not knowing of A's actions, proceeds to do the same thing. The same happens for the other 3 monkeys. There are Q peaches after the final monkey takes his share.
Assuming no fractional peaches are involved, what is the smallest value of N, and the corresponding value of Q? If you did this problem in a certain way, you should have an entire set of possible values of N and Q.
Obviously, this problem can be brute forced in various ways. There is however, a quick and elegant solution. In fact, this solution generalizes to K monkeys. Can you find it?
Name:
Anonymous2008-10-22 14:14
Why would the final monkey leave Q peaches? Shouldn't he take all of them since there's nobody left to share with?
Name:
Anonymous2008-10-22 16:52
>>2
Every monkey is under the impression the remaining peaches are to be divided among all monkeys.
Name:
Anonymous2008-10-22 16:58
>>3
Yeah, and since there's only one monkey left, dividing the remaining peaches would mean simply taking all of them.
>>6
``N ≡ 1 (mod 5)'' means ``N is congruent to 1, modulo 5''.
``N = 1 mod 5'' means ``N equals 1 modulo 5'', which is 1.
Name:
Anonymous2008-10-23 0:00
>>5
Hey, fuck you. I just didn't realize that the monkeys were aware of how many total others there are. Since each one leaves after it takes its peaches, I figured the number of remaining monkeys was what the next would divide by.
Name:
4tran2008-10-23 2:00
>>8
But if that were the case, then succeeding monkeys would not have leftover peaches; they would take exactly their share and leave. The result then, would be a trivial puzzle.
Oh hey, guess your notation differs from mine, want a fucking medal?
It's pretty obvious what I mean, and in fact what I typed was fine, so fuck off you piece of shit.
Ps. You're a cunt and I hope you die. I hate you.
Name:
Anonymous2008-10-24 1:24
>>9
err... right. I get it now. Disregard everything I said :)
Name:
Anonymous2008-10-24 2:44
>>11
Oh hey, your notation means that what you typed means something else entirely than what you meant.
The only reason it's ``obvious'' what you meant is because most people have very low expectations when it comes to /sci/'s mathematical literacy anyway. Otherwise, nobody would have assumed you'd be that ignorant of basic mathematical notation.
Wikipedia is right there if you need to look this kind of shit up. Fucking do it.
Name:
4tran2008-10-24 5:00
>>13
>``N = 1 mod 5'' means ``N equals 1 modulo 5'', which is 1.
a) typing the congruent sign is non trivial
b) this meaning you're suggesting is almost non sense (unless you're speaking in terms of CS, but they use % for taking remainders), and I have never seen such a use in mathematical discussions
c) as a consequence of a and b, his meaning was obvious
>>14
If you can't type a congruence sign, the convention is to instead put the ``mod n'' bit in parentheses.
The meaning his post would have been read as having by anyone with a passing acquaintance with mathematical notation is nonsensical in this context, but /sci/ is hardly above posting nonsensical (or pig ignorant) replies.
And the only people who use % for remainder instead of true modulus are Sun.
Name:
4tran2008-10-25 2:35
Yes, putting the "mod n" in parentheses is very common, though I hardly see a difference in neglecting the parentheses.
Sun? Those who use products from Sun Microsystems?