About Me

My photo
Science communication is important in today's technologically advanced society. A good part of the adult community is not science savvy and lacks the background to make sense of rapidly changing technology. My blog attempts to help by publishing articles of general interest in an easy to read and understand format without using mathematics. You can contact me at ektalks@yahoo.co.uk

Friday, 24 July 2026

Monkey, Coconuts and the Three Sailors Problem - an Easier, More Tractable Version - but with all the Intrigue and Excitement

 Monkey and the coconut puzzle is an ancient puzzle.  Wiki has a detailed article on the puzzle with several different solutions and a list of references - but also note what Wiki says:

 "The problem is notorious for it confounding difficulty  ....  has become a staple in recreational mathematical collections"

There are two versions of the puzzle that are widely discussed.  Solving either version algebraically or through trial & error quickly leads to endless cycles and logical dead ends - it can be a frustrating exercise.

In this feature, I present a simpler, manageable version of the puzzle that is more tractable but still retains all the infuriating aspects of the original puzzle.  The change I have made is to reduce the number of men to three from five.

The puzzle (version 1) is now stated as in the following:

Three sailors and a monkey, shipwrecked on a desert island, spent the first day gathering coconuts.  During the night, one sailor woke up and decided to take his share.  He divided the coconuts into three equal piles but had one coconut left over that he gave to the monkey.  He hid his pile and put the rest all back together.  Soon after, the second sailor woke up and did the same thing; he also had one coconut left over that he gave to the monkey.  The third sailor woke up next and did the same thing, also giving the extra coconut to the monkey.  In the morning, the sailors divided the coconuts that were left into three equal shares with one coconut left over for the monkey.  They all knew that a good number of coconuts were missing, but each sailor was guilty as the others and they kept quiet.  How many coconuts were present in the beginning?

In the alternate statement of the puzzle (version 2), the division in the morning results in the coconuts divided exactly among the three sailors with no coconut left for the monkey.

In the following, we shall solve the puzzle using algebra and then try a couple of ingenious methods that have been used for the standard five sailor version.  The three sailor problem is more realistic in terms of the number of coconuts collected in a day - the five sailor version requires several thousand coconuts at the start.

Method 1:   (A Numerical Approach)

Slide 1: 


Slide 2: 

Slide 3: 

Slide 4: 


From the above discussion, it follows that since (-2,-1) is a solution, the original number of coconuts were -2+81 or 79.  
The morning division provides -1+8 or 7 coconuts to each sailor. 
It also follows that any additions of 81 to N would also be a solution - so 160, 241, 322 ... are also possibilities, but the minimum number of coconuts would be 79.
An alternate way to solve eq.9 is described in the next slide 
Slide 5: 


Let us now look at the version2 of the puzzle in which the number of coconuts in the morning divide equally between the sailors and none is left for the monkey.  Version2 is generally quoted as a much more difficult variation of the puzzle - we look at it in the following:

Version2_ Coconuts divide equally in the morning with none left over

In fact, our analysis of version1 is applicable up to the point when the third sailor had his turn to divide the coconuts - the analysis from equations 1 to 5 is totally valid but equation 6 is now different as there is no leftover coconut for the monkey in the morning division.  This is discussed in slide 6.

Slide 6:

Slide 7:

A word of caution about the use of the above method (used in slide 7) to solve the linear Diophantine equation.  We are only looking for integral solutions and must check that both the starting number of coconuts and the final distribution provide intergral numbers.  If not, then we might have to use more sophisticated methods to solve the problem.  From my attempts, it seems that all Version1 problems give acceptable solutions.  In version2 problems with odd number of sailors give good solutions but the method fails for even number of sailors - although the equations obtained are correct, the simple method of solving the equation fails for even number of sailors.    

Summary of the three Sailor Puzzle:
 The following slide lists the distribution of coconuts in both versions of the tree sailor monkey and coconuts puzzle:

Slide 8:

Some Observations from the Above Discussion: 

Let us call the number of sailors as n.

We notice for n = 3, version2 with no coconuts left over in the morning division could be solved as easily as version1 where there was a coconut left for the monkey.  

Slide 9:


Negative Coconuts (An ingenious solution for version1)
The next two slides describe an interesting method of soving the problem:


The monkey and the coconut problem is an interesting puzzle to work on.  In the literature, we can find some rather sophisticated analyses of the problem but these are largely untractable for the general audience.  Here, I have given a detailed solution of the problem which is simple to follow and, hopefully, enjoyable.   

Appendix:  For completeness, I give a calculation of the division of the coconuts for 5 sailors.  Both versions 1 and 2 of the puzzle with 5 sailors are discussed in slides 5.1 to 5.4

Slide 5.1:

Slide 5.2:
Slide 5.3:
Slide 5.4:

No comments: