An algorithm for general solution of Monkey and Coconut problem
P.Bharath Kumar · viXra · 2016
In this paper I discuss an algorithm which will solve a very famous puzzle involving a monkey, few men and some coconuts. The puzzle involves a group of n men who have an unknown number of coconuts among them. At night, while the others are asleep, one of the men divides the coconuts in n parts and hides his share. While dividing, he discovers that there is one extra coconut, which he gives away to a monkey. Exactly the same thing happens with the rest of the men, one by one. They all hide their share, are left with one extra coconut that cannot be divided, which they give to the monkey. The next morning they again divide the coconuts together equally among themselves, with no extra coconut remaining this time. The puzzle is to find out the initial number of coconuts.