In Sailor, Monkey, Coconut Problem
Can anyone tell me how adding 56 gives me another solution??I understand that cocount is divided into 5 piles.But how is 56 give me another solution?why wouldn't I add the cocounuts that are being given to monkey?
In Sailor, Monkey, Coconut Problem
Can anyone tell me how adding 56 gives me another solution??I understand that cocount is divided into 5 piles.But how is 56 give me another solution?why wouldn't I add the cocounuts that are being given to monkey?
On
Let $x_0^0$ be a solution of the Sailor,Monkey,Coconut problem.
consider $x_1^0=x_0 + 5^6$. the claim is that $x_1^0$ is another solution. Let's see why:
Sailor 1 divided $x_0^0$ in five equal parts and one was left. $x_0 = 5 x_0^1 + 1$.
Sailor 2 divided $4x^1_0$ in five equal parts and one was left. $4x_0^1 = 5 x_0^2 + 1$.
Sailor 3 divided $4x^2_0$ in five equal parts and one was left. $4x_0^2 = 5 x_0^3 + 1$.
Sailor 4 divided $4x^3_0$ in five equal parts and one was left. $4x_0^3 = 5 x_0^4 + 1$.
Sailor 5 divided $4x^4_0$ in five equal parts and one was left. $4x_0^4 = 5 x_0^5 + 1$.
In the morning the group of sailors divided $4x^5_0$ in five equal parts and one was left. $4x_0^5 = 5 x_0^6 + 1$.
The important is that at each step $x_0^i$ is an integer and $4x_0^i = 5 x_0^{i+1} + 1$, If you consider $x_1^0 = x_0^0 + 5^6 $ you will see that each division operation this relation is preserved.
On
Given that we have $x$ coconuts to begin with, the pile of coconuts $P_k$ remaining after $k$ repetitions of the process can be shown to equal $$ P_k=\frac{4^kx-4\cdot 5^k+4^{k+1}}{5^k} $$ It is simple to check that this formula makes sense after one round, namely $$ P_1=\frac{4x-4\cdot 5+4^2}{5}=\frac{4x-4}{5}=\frac45(x-1) $$ and then one can check using induction and the principle that $P_{k+1}=\frac45(P_k-1)$ that it holds in general. Considering the numerator of the formula, one sees that $$ 4^k x-4\cdot 5^k+4^{k+1}\equiv 4^k(x+4)\mod{5^k} $$ and each $P_k$ is only an integer if the numerator is congruent to $0$ modulo the denominator $5^k$. Thus we must have $4^k(x+4)\equiv 0\mod{5^k}$. This requires $x$ to be congruent to $-4$ modulo $5^k$. So $x$ must have the form $$ x=5^k q-4 $$ With $x=5^6q-4$ this holds for all $k=1,2,...,6$ and so all the piles $P_1,P_2,...,P_6$ will be integers throughout the process. Hence solutions differ by exactly $5^6$, and the smallest non-negative solution is $x=5^6-4=15621$, the next is $x=5^6\cdot 2-4=31246$ and so on.
If the heap has $k\cdot 5^m$ additional coconuts when a sailor wakes up (with $m\ge 1$) then his secret share will be bigger by $k\cdot 5^{m-1}$ coconuts and the heap he leaves for the next round is larger by $4k\cdot 5^{m-1}$ coconuts. Hence if we start with $5^6$ additional coconuts, the heap after the five sailors take their secret shares will be bigger by $4^5\cdot 5^1$ coconuts. This is still (though just barely) divisible by $5$, hence there will still be an extra coconut for the monkey in the end (as well as within each previous round).