Sunday, October 1, 2017

calculation puzzle - N pirates steal their share of bananas to the benefit of a monkey


The following is a type of logic / math puzzle I've yet to see on this site. I feel it belongs because the kernel of this problem can be reworked into other puzzles.



$N$ pirates find themselves marooned on an island with no food stores, no other people, and no animal life besides one monkey. There are, however, many banana trees. The pirates spend the entire day gathering bananas to tide them over as they work on a raft.


After they go to sleep, one pirate wakes up, decides he doesn't trust anyone else, and tries to take his even $(\frac{1}{N})^{\mathrm{th}}$ share of the bananas from the big pile. Finding one extra banana over an even split, he gives one to the monkey and takes $(\frac{1}{N})^{\mathrm{th}}$ of the remaining pile to hide.


After the first pirate finally falls asleep, a second pirate wakes up and decides the same thing but does not realise the other pirate had taken his share. Finding one extra banana over an even split, he gives one banana to the monkey and takes $(\frac{1}{N})^{\mathrm{th}}$ of the remaining pile to hide it.



All N pirates wake up over the night, do the same thing and every time they find one more banana than an even split, give one to the monkey, and take $(\frac{1}{N})^{\mathrm{th}}$ of the remaining pile.


When morning comes and all $N$ pirates wake up, they see the greatly diminished pile and a happy fat monkey.


The question is: how many bananas could there have been in the original pile for this to occur?




Answer



The basic idea is to work backwards.



The last pirate must have found $N+1$ bananas, because he had to find enough bananas remaining for at there to be least 1 banana in the pile left for each pirate. He took 1, fed 1 to the monkey, and left $N-1$. That $N+1$ means that the next to last pirate found $ \frac N{N-1}\cdot (N+1)+1$ and so on.



A cute trick is to recognize that there could have been




$-(N-1)$ bananas. Each pirate gives the monkey $1$, takes $-1$, and leaves the pile the same size as before. Since we need to divide it by $N$ for each pirate, the next solution is higher by $N^N$, so the minimal positive solution is $N^N-N+1$ bananas.



No comments:

Post a Comment

classical mechanics - Moment of a force about a given axis (Torque) - Scalar or vectorial?

I am studying Statics and saw that: The moment of a force about a given axis (or Torque) is defined by the equation: $M_X = (\vec r \times \...