Sei sulla pagina 1di 17

Introduction

The problem, Sailors, Coconuts, and Monkeys is a classic problem that may be
used to help illustrate the use of continued fractions. Five sailors were cast away on an
island. To provide food, they collected all the coconuts they could find. During the night
one of the sailors awoke and decided to take his share of the coconuts. e divided the
nuts into five e!ual piles and discovered that one nut was left over, so he threw this e"tra
one to the monkeys. e then hid his share and went back to sleep. # little later a second
sailor awoke and had the same idea as the first. e divided the remainder of the nuts into
five e!ual piles, discovered also that one was left over, and threw it to the monkeys.
Then he hid his share. $n their turn the other three sailors did the same thing, each
throwing a coconut to the monkeys.
The ne"t morning the sailors, all looking innocent as possible, divided the
remaining nuts into five e!ual piles, no nuts being left over this time. The problem is to
find the smallest number of nuts possible in the original pile.
To solve this e!uation we let
x
be the original number of coconuts. The amount
of coconuts that the first sailor took is
% & '
(
&
x
coconuts and what was left was
% & '
(
)
x
. *ikewise the second sailor took
+(
, )
& % & '
(
)
(
&
=


x
x
coconuts and left four times this number,
&
+(
-. &. x
.
Continuing on we see that the third, fourth, and fifth sailors left,
,
&+(
+)) .) x
,
.+(
&)/. +(. x
-&+(
0)1) &1+) x
nuts.
Since the last pile of nuts was split into five piles with no nuts left over the
number of nuts in the pile must be a multiple of (. This gives us the e!uation
y
x
(
-&+(
0)1) &1+)
=

,
where y is some integer. #fter multiplying both sides of the e!uation by -&+( we attain
the indeterminate e!uation
0)1) &(.+( &1+) = y x
.
Factoring into primes we find that &1+) 2 +
&1
and &(.+( 2 (
.
3 hence these numbers are
relatively prime and, by Theorem +.& of 4lds '&,.-%, the e!uation
0)1) &(.+( &1+) = y x
has integral solutions. To solve this it suffices to solve
& &(.+( &1+) = y x
. 5e can do so using continued fractions.
History
The origin of continued fractions is a mystery. This is because we can find
e"amples of these fractions throughout mathematics in the last +111 years, but its true
foundations were not laid until the late &.116s, early &/116s.
+
The beginning of continued fractions is traditionally placed at the time of the
creation of 7uclid6s #lgorithm, about -11 8.C. 7uclid6s #lgorithm, however, is used to
find the greatest common denominator 'gcd% of two numbers. owever, by inspection of
the algorithm, one can compute the simple continued fraction of the rational p9!.
For more than a thousand years, any work that used continued fractions was
restricted to specific e"amples. The $ndian mathematician #ryabhata 'd. ((1 #D% used a
continued fraction to solve a linear indeterminate e!uation.
Two men from the city of 8ologna, $taly, :afael 8ombelli 'b. c.&(-1% and ;ietro
Cataldi '&()0<&.+.% also contributed to this field. 8ombelli e"pressed the s!uare root of
&- as a repeating continued fraction. Cataldi did the same for the s!uare root of &0.
# Dutch mathematician, mechanician, physicist, and astronomer Christiaan
uygens '&.+,<&.,(% was the first to demonstrate a practical application of continued
fractions. uygen used the convergents of continued fraction to appro"imate the correct
design for the toothed wheels of a planetarium '&.,0%.
5hile the work of 5allis and uygens began the work on continued fractions, the
field of continued fractions began to grow when *eonard 7uler '&/1/<&/0-%, =ohan
einrich *ambert '&/+0<&///%, and =oseph *ouis *agrange '&/-.<&0&-% embraced the
topic. 7uler laid down much of the modern theory in his great memoir, De Fractionibus
Continius '&/-/%. e showed that every rational can be e"pressed as a terminating simple
continued fraction. e also provided an e"pression for e in continued fraction form.
Continued Fractions
-
#n e"pression of the form
...
)
-
-
+
+
&
&
+
+
+
+
a
b
a
b
a
b
a
is called a continued fraction. The values of a
&,
a
+
, a
-
,>, b
&
, b
+
, b
-
,> can be any real or
comple" numbers with the number of terms being finite or infinite. 5e?ll restrict our
attention to simple continued fractions of the form
...
&
&
&
)
-
+
&
+
+
+
+
a
a
a
a
,
'this can also be written as
...
& & &
) - +
&
+ + + +
a a a
a
or @a
&
, a
+
, a
-
, a
)
, >A%
where a
&
is either a positive or negative number or Bero, and the terms a
+,
a
-
, a
)
,> are all
positive integers. 5hen a fraction has a limited amount of terms a
&
, a
+,
a
-
, a
)
,>, a
n
the
fraction is called a finite continued fraction.
# rational number is a fraction of the form p9! where p and ! are integers with !
1. ow can we write it as a continued fractionC *et?s take the rational number
+,
./
.
First divide ./ by +, and obtain the !uotient + with the remainder ,, so that
)
,
+,
&
+
+,
,
+
+,
./
+ = + =
De"t we divide by +, by , to obtain
+
,
&
-
,
+,
+ =
.
Finally, we divided , by + to obtain
+
&
)
+
,
+ =
,
5hich will give us the finite simple continued fraction
+
&
)
&
-
&
+
+,
./
+
+
+ =
$t will be convenient to represent this as

A , , , @ A + , ) , - , + @
+,
./
) - + &
a a a a = =
Euclids Algorithm
Esing Euclids Algorithm we can find the greatest common divisor of two
integers. The greatest common divisor 'g.c.d.% of any two integers p and ! is the largest
integer which divides both p and !. $n the theory of numbers the g.c.d. of the integers p
and ! is denoted by the symbol 'p,!%3 thus 'p,!% 2 d means that d is the largest integral
(
factor common to both p and !. To find the greatest common divisor of p and ! by means
of Euclids algorithm, we can write the below e!uations
p 2 a
&
! F r
&
1 G r
&
G !
! 2 a
+
r
&
F r
+
1 G r
+
G r
&
r
&
2 a
-
r
+
F r
-
1 G r
-
G r
+
......................... >>>>>.
r
n<-
2 a
n<&
r
n<+
F r
n<&
1 G r
n<&
G r
n<+
,
r
n<+
2 a
n
r
n<&
F 1 1 2 r
n
Example
Esing 7uclid?s algorithm to determine the g.c.d of p 2 .-0& and ! 2 (&.-.
&+&0 (&.- & .-0& + =
+,& &+&0 ) (&.- + =
() +,& ) &+&0 + =
+& () ( +,& + =
&+ +& + () + =
, &+ & +& + =
.
- , & &+ + =
1 - - , + = 3
hence - is the g.c.d of .-0& and (&.-. Thus - is the only factor common to these two
numbers, and hence is the g.c.d.
Convergents
7arlier we saw that any rational fraction p9! can be e"panded into a finite simple
continued fraction
=

p
@a
&
, a
+
,>, a
n<&
, a
n
A,
where a
&
is either a positive or negative number or Bero, and the terms a
+,
a
-
, a
)
,> are all
positive integers. These numbers a
&
, a
+,
a
-
,>, a
n
are also called the partial uotients or
uotients of the continued fraction. From these we can form the fractions
c
&
2 ,
&
&
a
c
+
2
,
&
+
&
a
a +
c
-
2
- +
&
& &
a a
a + +
, >,
obtained , in succession, by cutting off the e"pansion process after the first, second, >
steps. These fractions are called the first, second, > convergents, of the continued
fraction, p9!. The nth convergent,
c
n
2
A , , , @
& &
+ &
+
& n
n
a a a
a a
a = + + +
.
/
$t is important to develop a systematic way of computing these convergents. They
can also be written as,
&
& &
&
&
p a
c = =
,
where p
&
2 a
&
, !
&
2 &. #lso
+
+
+
+ &
+
& +
& &

p
a
a a
a
a c =
+
= + =
where p
+
2 a
&
a
+
F & and !
+
2 a
+
3 then
-
-
- +
- & - + &
-
&
p
a a
a a a a a
c =
+
+ +
=
and so on. $f we look at the convergent c
-
we notice that
-
-
& + -
& + -
+ -
& + & -
-
& % '
% & '

p
a
p p a
a a
a a a a
c =
+
+
=
+
+ +
=
,
so that p
-
2 a
-
p
+
F p
&
and !
-
2 a
-
!
+
F !
&.
$n general for i 2 -,),(,>,n,
i
i
i i

p
a a a c = = A , , , @
+ & ,
where
.
+ &
+ &


+ =
+ =
i i i i
i i i i
a
p p a p
'&.1&%
0
For i values of & and + for the above e!uation we get undefined terms, p
1
, p
<&
, !
1
,
!
<&.
owever if we assign the values p
1
2 &, p
<&
2 1, !
1
2 1, !
<&
2 & the e!uation will hold for
i 2 &,+,-,> n H &, n, and the first two values, i 2 &,+, will reproduce
& & 1 a
1 &
a
&
&
&
& 1 &
& 1 &
&
&
&
a a

p p a

p
c =
+
+
=
+
+
= =

and
+
& +
+
& +
1 & +
1 & +
+
+
+
&
1 & a
&
a a
a a a a

p p a

p
c
+
=
+
+
=
+
+
= =
.
The Indeterminate Equation of ax y ! "#
Theorem +.& statesI The euation ax ! by " #, $here a and b are relatively prime
positive integers, has an infinite number of integral solutions %x, y&.
5e first convert a9b into a finite simple continues fraction
@ =
b
a
a
&
, a
+
,>, a
n<&
, a
n
A, '&.1+%
and calculate the convergents c
&
, c
+
, >, c
n<&,
c
n
. The last two convergents,
,
&
&
&

=
n
n
n

p
c
b
a

p
c
n
n
n
= =
,
are the key to the solution. They satisfy the relation stated in Theorem &.) 'see 4lds
'&,.-%, p +/%, namely that
,
% & '
& &
=
n n n n
p p
n
,
and since p
n
2 a, !
n
2 b, this gives us
% & '
& &
=
n n
bp a
n
. '&.1-%
$f we have a even number of partial !uotients a
&
, a
+
, >, a
n
, then '<&%
n
2 & and '&.1-%
becomes
&
& &
=
n n
bp a
. '&.1)%
Comparing this with the e!uation a" H by 2 &, we see that a particular solution to this
given e!uation is "
o
2 !
n<&
, and y
1
2 p
n<&
.
Dote that if we have an odd number of partial !uotients, we can modify the
continued fraction e"pansion '&.1+% to get an even number of partial !uotients by
replacing
n
a
&
by
&
&
% & '
&
+
n
a
if a
n
J &.
That is, if '&.1+% has an odd number of partial !uotients, it may be transformed into
@a
&
, a
+
, >, a
n
<&,&A, if a
n
J &
@a
&
, a
+
, >, a
n<&
F&A, if a
n
2 &3
in both cases the number of partial !uotients is even.
&1
4nce, a particular solution '"
1
, y
1
% of e!uation a" H by 2 &, has been found, it is an
easy matter to find the general solution. *et '", y% be any other solution of a" H by 2 &.
Then a" H by 2 & and a"
1
H by
1
2 &, and subtracting them gives
a'" < "
1
% 2 b'y < y
1
%. '&.1(%
This shows that b divides the left side of the e!uation. 8ut b cannot divide a since a and
b are relatively prime, hence b must divide " H "
1
, that is " H "
1
is an integral multiple of b
and we can write " 2 "
1
F tb 't an integer%. #nd because this is true '&.1(% shows that y <
y
1
2 at. $t follows that any other solution '",y% of a" H by 2 & has the form
ta y y
tb x x
+ =
+ =
1
1
= t 1, &,
, +
>. '&.1.%
7!ually, if '"
1
, y
1
% is any particular solution of a" H by 2 &, and if we set the
e!uations '&.1.% with t any integer, then the values '",y% will satisfy the given e!uation,
because
a" H by 2 a'"
1
F tb% H b'y
1
F ta%
2 'a"
1
H by
1
% F tab H tab
2a"
1
H by
1
2 &.
5e call the values of " and y given by e!uation '&.1.% the general solution of the
indeterminate e!uation a" H by 2 &.
&&
Continued fractions can be used to solve indeterminate e!uations a" by 2 c
where a, b, and c are integers with a and b positive and relatively prime, for " and y
unknown integers 'see 4lds '&,.-%, p.)/%. *ets look at the e!uation &1+)" H &(.+(y 2 &.
5e start by finding the convergents of the continued fraction
=
&(.+(
&1+)
@1, &(, -, &, ., +,
&, -, +, &A. Esing Euclids Algorithm we can compute the values for p
i
and !
i
.
p
&
2 1 !
&
2 &
p
+
2 & !
+
2 &(
p
-
2 - !
-
2 ).
p
)
2 ) !
)
2 .&
p
(
2 +/ !
(
2 )&+
p
.
2 (0 !
.
2 00(
p
/
2 0( !
/
2 &+,/
p
0
2 -&- !
0
2 )//.
p
,
2 /&& !
,
2 &10),
p
&1
2 &1+) !
&1
2 &(.+(
The convergent c
,
yields the particular solution "
&
2 !
,
2 &10),, y
&
2 p
,
/&& of &1+)" H
&(.+(y 2 &. ence "
1
2 0)1)"
&
2 ,&&/),,., y
1
2 0)1)y
&
2 (,/(+)) will be a particular
solution of the &1+)" H &(.+(y 2 0)1). The general solution is
t y
t x
&1+) (,/(+))
&(.+( ,&&/),,.
+ =
+ =
= t 1, &,
, +
>. '&.1/%
&+
Since both " and y must be positive, we search for the value of t which gives the
smallest positive value of " and which at the same time makes y positive. From '&.1/%
we find that t must be an integer satisfying the two ine!ualities
t J
, + . (0-(
&(.+(
,&&/),,.
=
t J
, & . (0-(
&1+)
(,/(+))
=
ence the re!uired value is t 2 <(0-(. Substituting this value of t into the e!uations
'&.1/%, we finally obtain
+1) (,/(1)1 (,/(+))
-&+& ,&&/&0/( ,&&/),,.
= =
= =
y
x
which means that the original number of coconuts was -&+& and each sailor received +1)
in the final distribution.
The method for solving the e!uation
a" H by 2 <&, 'a,b% 2 &,
is similar to that used to solve a" H by 2 &. 5e convert a9b into a finite simple continued
fraction with an odd number of convergents. $n this case e!uation '&.1-% becomes
a!
n<&
H bp
n<&
2 '<&%
n
2 <&,
since n is odd. Comparing this e!uation with
&-
a" H by 2 <&,
we see that
"
o
2 !
n<&
, y
o
2 p
n<&
is a particular solution of the given e!uation, the general solution being, as before,
ta y y
tb x x
+ =
+ =
1
1
= t 1, &,
, +
>
$uadratic Irrational
#n irrational number is a number which cannot be represented as the ratio of two
integers. #ny number of the form
'
D (
, where ;, D, and K are integers and where D
is a positive integer not a perfect s!uare, is irrational. # number that has this property is
called a !uadratic irrational or a !uadratic surd since it is the root of the !uadratic
e!uation 1 % ' +
+ + +
= + D ( ('x x ' . 4ne irrational number that is not a !uadratic surd
is the number -.&)&(,> is one e"ample. There are also infinite simple continued
fractions3 an e"ample would be to e"pand the !uadratic irrational + into an infinite
simple continued fraction. To do so we need to find the largest integer less than +
which is a
&
2 &, so
+ +
&
&
&
&
+
x x
a + = + =
.
Solving this e!uation for "
+
, we get
&)
& +
& +
& +
& +
&
+
+ =
+
+

= x .
Therefore,
& +
&
&
&
+
+
&
+
+ = + =
x
a
.
The largest integer less than "
+
2 + F & is a
+
2 +, so
- -
+ +
&
+
&
x x
a x + = + =
,
where
. & & +
& +
& +
& +
&
& +
&
+ % & + '
&
+
&
+
+
> + =
+
+

=
+
=
+
=
x
x
#t this stage we know that
& +
&
+
&
&
&
+
&
&
&
+
-
+
&
+
+
+ =
+
+ = + =
x
x
a
.
Since & +
-
+ = x is the same as & +
+
+ = x , the calculations of "
)
, "
(
,> will produce the
same result, & + + . Thus all the subse!uent partial !uotients will be e!ual to + and the
infinite e"pansion of + will be
= + + + =
+
&
+
&
& +
@&, +, +, +,>A 2 @&, + A.
5ith the bar over the +, it indicates that this number repeats itself over and over.
&(
Facts aout Continued Fractions
7very rational number can be e"panded as a finite simple continued fraction 'see
4lds '&,.-%, p.(&%.
7very finite simple continued fraction represents a rational number 'see 4lds
'&,.-%, p.&&1%.
Continued fraction e"pansion of any !uadratic irrational is periodic at some point
'see 4lds '&,.-%, p.(&%.
#ny periodic continued fraction which is periodic at some point represents a
!uadratic irrational 'see 4lds '&,.-%, p.0,%.
The odd convergent c
+F&
of an infinite simple continued fraction form an
increasing se!uence, and the even convergents c
+n
form a decreasing se!uence,
and every odd convergent is less than any even convergent 'see 4lds '&,.-%,
p..-%.
&.
%eferences
4lds, C.D. Continued Fractions. Lale Eniversity, &,.-
Continued Fractions>an $ntroduction. httpI99archives.math.utk.edu9articles9atuyl9confrac9
&/

Potrebbero piacerti anche