Você está na página 1de 4

Statement of the Problem

Given m sailors and a pile of coconuts, each sailor in sequence takes


m
1
of the coconuts
left after the previous sailor removed his share and gives n (less than m) coconuts to a monkey.
Then in the morning, they divide the remaining coconuts in m ways and give the n coconuts
which are left over to the monkey. If n is the same at each division, then how many C coconuts
were there originally?
Solution:
Assuming C
i
is the number of coconuts left after the previous the sailor removed his share
where . Since n coconuts were given to the monkey at each division, then the first
sailor took ( ) n C
m

1
coconuts. That leaves C
1
coconuts left after the first sailor took his share.
In equation, we write
( ) ( )
( )
n
m
m
C
m
m
C
n C
m
m
C
n C
m
n C C
|
.
|

\
|

|
.
|

\
|
=
|
.
|

\
|
=
=
1 1
1
1
1
1
1
.
Take note that
m
m 1
is the proportion of the coconuts that was left after each sailor in
sequence took his share. So after the second sailor took his share, there were C
2
coconuts left,
where,
( )
n
m
m
n
m
m
C
m
m
C
n n
m
m
C
m
m
m
m
C
n C
m
m
C
|
.
|

\
|

|
.
|

\
|

|
.
|

\
|
=
(


|
.
|

\
|

|
.
|

\
|
|
.
|

\
|
=
|
.
|

\
|
=
1 1 1
1 1 1
1
2 2
2
2
1 2






After the third sailor took his share, there were C
3
coconuts left, where,

( )
n
m
m
n
m
m
n
m
m
C
m
m
C
n n
m
m
n
m
m
C
m
m
m
m
C
n C
m
m
C
|
.
|

\
|
|
.
|

\
|
|
.
|

\
|
|
.
|

\
|
=
(
(

|
.
|

\
|
|
.
|

\
|
|
.
|

\
|
|
.
|

\
|
=
|
.
|

\
|
=
1 1 1 1
1 1 1 1
1
2 3 3
3
2 2
3
2 3


After the fourth sailor took his share, there were C
4
coconuts left, where,


( )
n
m
m
n
m
m
n
m
m
n
m
m
C
m
m
C
n n
m
m
n
m
m
n
m
m
C
m
m
m
m
C
n C
m
m
C
|
.
|

\
|
|
.
|

\
|
|
.
|

\
|
|
.
|

\
|
|
.
|

\
|
=
(
(

|
.
|

\
|
|
.
|

\
|
|
.
|

\
|
|
.
|

\
|
|
.
|

\
|
=
|
.
|

\
|
=
1 1 1 1 1
1 1 1 1 1
1
2 3 4 4
4
2 3 3
4
3 4


After the fifth sailor took his share, there were C
5
coconuts left, where,


( )
n
m
m
n
m
m
n
m
m
n
m
m
n
m
m
C
m
m
C
n n
m
m
n
m
m
n
m
m
n
m
m
C
m
m
m
m
C
n C
m
m
C
|
.
|

\
|
|
.
|

\
|
|
.
|

\
|
|
.
|

\
|
|
.
|

\
|
|
.
|

\
|
=
(
(

|
.
|

\
|
|
.
|

\
|
|
.
|

\
|
|
.
|

\
|
|
.
|

\
|
|
.
|

\
|
=
|
.
|

\
|
=
1 1 1 1 1 1
1 1 1 1 1 1
1
2 3 4 5 5
5
2 3 4 4
5
4 5





Clearly, from the second term to the last term of the equations, they form a geometric
progression, where the common ratio r = |
.
|

\
|
m
m 1
. Thus, successive C
i
s can be generated.

terms
m m m
m
n
m
m
n
m
m
n
m
m
n
m
m
C
m
m
C
n
m
m
n
m
m
n
m
m
n
m
m
n
m
m
n
m
m
C
m
m
C
n
m
m
n
m
m
n
m
m
n
m
m
n
m
m
C
m
m
C
m
2 1
2 3 4 5 6 6
6
2 3 4 5 5
5
1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1
|
.
|

\
|

|
.
|

\
|

|
.
|

\
|

|
.
|

\
|

|
.
|

\
|
=
|
.
|

\
|

|
.
|

\
|

|
.
|

\
|

|
.
|

\
|

|
.
|

\
|

|
.
|

\
|

|
.
|

\
|
=
|
.
|

\
|

|
.
|

\
|

|
.
|

\
|

|
.
|

\
|

|
.
|

\
|

|
.
|

\
|
=


In the morning, after m sailors kept their share, there were C
m
coconuts left. For the final
division, n coconuts were given to the monkey and each man got Y coconuts, where,
( )
( )
(
(
(
(

+
|
.
|

\
|
+
|
.
|

\
|
+ +
|
.
|

\
|
+
|
.
|

\
|

|
.
|

\
|

|
.
|

\
|

|
.
|

\
|

|
.
|

\
|

|
.
|

\
|
=
=
+

+
+





terms m
m m
m
m
terms m
m m m
m
m
m
m
m
m
m
m
m
m
n
m
C m
Y
n n
m
m
n
m
m
n
m
m
n
m
m
C
m
m
m
Y
n C
m
Y
) 1 (
2 1
1
) 1 (
2 1
1
1 1 1 1 1
1 1 1 1 1 1
1

Notice that the terms in the bracket is a geometric progression. It can be simplified as,
( )
( )
(
(
(
(
(

|
.
|

\
|

=
(
(
(
(
(

|
.
|

\
|

|
.
|

\
|

=
+
+
+
+
m
m
m
m
n
m
C m
Y
m
m
m
m
m
n
m
C m
Y
m
m
m
m
m
m
1
1
1
1
1
1
1
1
1
1
1
1
1

Further algebraic manipulation and clearing out fractions will yield to simple equation.
( )
( )
( ) ( )
( ) ( ) ( )
( ) ( ) ( ) 1 1
1 1
1 1
1 1
1
1
1
1
1 1
1
1
1
1
1
1
1
+ = +
+ = +

= +
|
.
|

\
|
+

=
(
(

|
.
|

\
|

=
+
+ +
+
+
+
+
+
+
+
m C m n Y m
m C m n Y m
m
m
m
C m
n Y
m
m
n n
m
C m
Y
m
m
n
m
C m
Y
m m
m m m
m
m
m
m
m
m
m
m
m
m

The resulting equation looks a lot simpler, but it still may not be clear how to make
progress. Since m and n are whole number constants, Y and C must be whole numbers also.
Clearly, there are infinite number of solutions. Solving for C in terms of m, notice that
1 + m
m does
not divide ( )
m
m 1 and vice versa. Thus,
1 + m
m must divide ( ) 1 + m C . By definition of
congruence, we have
( )
( )
1
1
mod 1
mod 0 1
+
+
+ ~
~ +
m
m
m m C
m m C

Solving for Y, we can apply the same principle. ( )
m
m 1 must divide ( ) n Y + . Thus,
( ) ( )
( ) ( )
m
m
m n Y
m n Y
1 mod
1 mod 0
~
~ +

In the original problem with m = 5 and n = 1, ( ) 15625 mod 4 ~ C and
( ) 1024 mod 1 ~ Y . The smallest positive solution to the problem is there are 15625 coconuts at
the beginning.

Você também pode gostar