Minimum number of coconuts

504 Views Asked by At

Three friends namely $A$, $B$ and $C$ collected coconuts with the help of monkey and fell asleep. At night, $A$ woke up and decided to have his share. He divided coconuts into three shares, gave the left out coconut to the monkey and fell asleep. In the same way in order $B$ and $C$ got up and not knowing whether anybody woke up divided the coconuts, giving the left out coconut to the monkey. Early in the morning all of them woke up together, divided the coconuts into equal shares and gave the left out coconut to the monkey.

What is the minimum number of coconuts they counted?

1

There are 1 best solutions below

5
On BEST ANSWER

Let $n$ be the total.

$A$ first takes $\dfrac{n-1}3$ and $1$ goes to the monkey. Left out coconuts is $n-1-\dfrac{n-1}3 = \dfrac{2(n-1)}3$.

After $B$ does the same at night, left out coconuts is $\dfrac23 \cdot \left(\dfrac23 (n-1)-1 \right)$.

After $C$ does the same at night, left out coconuts is $\dfrac23 \cdot \left(\dfrac23 \cdot \left(\dfrac23 (n-1)-1 \right) -1\right)$.

Let $m$ be the number of coconuts left in the morning.

Hence, we have $$\dfrac23 \cdot \left(\dfrac23 \cdot \left(\dfrac23 (n-1)-1 \right) -1\right) = m \implies n = \dfrac{27m+38}8$$

Let the minimum number of coconuts left in the morning be $m$.

This is an integer only when $$27m \equiv 2 \pmod8 \implies m \equiv 6 \pmod8$$ We also know that $m=3k+1$, since they share in the morning and give one to the monkey. Hence, $$m \equiv 6 \pmod8 \text{ and } m \equiv 1 \pmod3 \implies m \equiv 22 \pmod{24}$$ Since, we want $n$ to be a minimum, so has to be $m$. Hence, we have $$\color{red}{m=22 \implies n = 79}$$