User:Toploftical/Workpage 11

The monkey and the coconuts is a mathematical puzzle in the field of Diophantine analysis involving five sailors and a monkey on a desert island who divide up a pile of coconuts.

History
The problem became notorious when American novelist and short story writer Ben Ames Williams modified an older problem and included it in a story in the October 9, 1926 issue of The Saturday Evening Post. Here is how the problem was stated by Williams:


 * Five men and a monkey were shipwrecked on an island. They spent the first night gathering coconuts. During the night, one man woke up and decided to take his share of the coconuts. He divided them into five piles. One coconut was left over so he gave it to the monkey, then hid his share and went back to sleep.


 * Soon a second man woke up and did the same thing. After dividing the coconuts into five piles, one coconut was left over which he gave to the monkey.  He then hid his share and went back to bed. The third, fourth, and fifth man followed exactly the same procedure. The next morning, after they all woke up, they divided the remaining coconuts into five equal shares.  This time no coconuts were left over.


 * What is the smallest number of coconuts there could have been in the original pile?

The magazine was inundated by more than 2,000 letters pleading for an answer to the problem. The Post editor, Horace Lorimer, famously fired off a telegram to Williams saying: "FOR THE LOVE OF MIKE, HOW MANY COCONUTS? HELL POPPING AROUND HERE". Williams continued to get letters asking for a solution for the next twenty years.

Williams had modified an older problem to make it more confusing. In the older version there is a coconut for the monkey on the final division. In Williams's version the final division in the morning comes out even.

Martin Gardner featured the problem in his April 1958 Mathematical Games column in Scientific American. He once told his son Jim that it was his favorite problem, so much so that he later chose to make it the first chapter of his "best of columns" collection, The Colossal Book of Mathematics. He said that the Monkey and the Coconuts is "probably the most worked on and least often solved" algebraic puzzle. Since that time the Williams version of the problem has become a staple of recreational mathematics. The original story containing the problem was reprinted in full in Clifton Fadiman's 1962 anthology The Mathematical Magpie, a book that the Mathematical Association of America recommends for acquisition by undergraduate mathematics libraries.

Solution
A complete analysis of both the original problem and William's version was presented by Martin Gardner when he featured the problem in his Mathematical Games column. Gardner begins by solving the original problem because it is less confusing than the Williams variation. Let N be the size of the original pile and F be the number of coconuts received by each sailor after the final division into 5 equal shares in the morning. This leads to the Diophantine equation:
 * 1024 N = 15625 F + 11529

Gardner points out that this equation is much too difficult to solve by trial and error. Moreover, it has an infinite number of solutions. In fact, if (N, F) is a solution then so is (N + 15625 t, F + 1024 t) for any integer t. This means that the equation also has solutions in negative integers. Trying out a few small negative numbers it turns out N = -4 and F = -1 is a solution. This involves the absurd notion of negative coconuts; so we add 15625 to -4 and add 1024 to -1 to get the smallest positive solution (15621, 1023). Gardner then generalizes this case and gets 55 - 4 = 3121 for the number of coconuts in the original pile in the Williams version.