Sunteți pe pagina 1din 4

M10.

1 Definitions and Solving Diophantine Equations

FINITE CONTINUED FRACTIONS.


It was Fibonacci who introduced continued fraction .His way of
writing the fraction was upward.
Now they are written in descending manner.
2+ 1/(4+(1/1+(1/3+(1/2))))
In general continued fraction means
j/k = a0+1/ (a1+1/a2+ (1/a3+ (1/……))) written also as
j/k = [a0 ; a1, a2,…..an-1,an]
Where a0, a1, a2,….. are real numbers all positive where a0 can
be I.
If all ai are integer such fraction is called Simple continued
fraction.
Note: If the Numerator is greater than the denominator then a0
has a value ≥ 1 otherwise it is 0.
Example:
53/170
We divide bigger integer by the smaller one and use Euclids
Division Lemma
170=3×53+11
Now divide all over by 53
170/53= 3+ (11/53), here we get a fraction 11/53 , so we will
again divide 53 by 11 and use Euclids Division Lemma once
again to get
53=11×4+9 ,divide all over by 11
53/11=4+ (9/11), repeat the process till the fraction has 1 in the
numerator
11 =9×1+2 or
11/9=1+ (2/9)
9 = 2×4+1 or 9/2 = 4+ (1/2)
We stop now as we got 1 in the fractional part. Hence
170/53 = 1/ (170/50) =1/(3+(11/53))
= 1/(3+(1/(53//11)))
= 1/(3+1/(4+(9/11)))
=1/(3+1/(4+(1/(11/9))))
= 1/(3+1/(4+1/(1+(2/9)))) or
[0;3,4,1,4,2]=1/(3+1/(4+1/(1+(1/4+(1/2)))))
Note :The simple continued fraction is not unique
If last number is
an=an-1+1=an-1+(1/1)
For example:
19/51=[0,2,1,2,6]=[0,2,1,2,5,1]
19/51=1/(2+1/(1/2+(1/6)))=1/2+(1/1+(1/(2+(1/(6-1+1)))))
=1/(2+(1/(1/2+(1/5+(1 /1)))))

SOLVING DIOPHANTIVE EQUATIONS:-


Ckare continued fraction made from cutting off the expansion
after kth partial denominator.
Ck=[a0 ;a1,a2,…….ak] when ak 's are called kth convergents.
We will always have C0=a0
Ck =pk /qk
Example:
19/51=[0;2,1,2,6]
C0=0
C1=[0,2]=0+(1/2)=1/2
C2=[0,2,1]=0+1/(2+1)=1/3
C3=[0,2,1,2]=0+1/(2+(1/(1+(1/2))))=3/8
C4=[0,2,1,2,6]=0+1/(2+(1/1+(1/2+(1/6))))=19/51

Example:
For [0;1,1,1]
C0=0,c1=1,c2=1/2,c3=2/3,c4=3/5

DIOHAMTINE EQUATINS:-
Lets say we are asked to solve the equation ax+by=c
If d is the g.c.d of a and b, then
a/d .x + b/d .y =c/d
and g.c.d(a/d,b/d)=1, so we
first solve
ax+by=1
if x0,y0 exist s.t ax0+y0=1
If we multiply by c.
acx0+bcy0=c, implies
ax+by=c
so cx0and cy0 will be the desired solution
Method:
First write a/b as a continued fraction.
Here we will use the formulas
C0= a0
p0=a0 , p1 =a0a1+1, q0=1, q1 = a1
for k≥2
pk = ak pk-2 + ak-2 pk -1
qk = ak qk-2 + ak-2 qk -1
Ck =pk /qk
and Cn-1=pn-1/qn-1 , cn=pn/qn=a/b
As g.c.d of (pn,qn)=1,pn=a,qn=b.
So
Pnqn-1-qnpn-1=(-1)n-1
Example: Lets say we have to solve the Diophantine
equation 158x -57 y = 2.
First we will reduce 158/57 to continued fraction
158/57=2+(44/57)= 2+(1/(57/44))=2+1/(1+(13/44))
= 2+1/(1+(1/(44/13)))
= 2+1/(1+1/(3+(1/(13/5))))
=2+1/(1+1/(3+1/(2+1/(1+1/(1+(1/2))))))
As p0=2,q0=1
p1=3,q1=1
p2=a2×p1+p0=3×3+2=11
q2=a2×q1+q0=3×1+1=4
p3=a3×p2+p1=2×11+3=25
q3=a3×q2+q1=2×4+1=9
p4=a4×p3+p2=1×25+11=36
q4=a4×q3+q2=1×9+4=13
p5=1×36+25=a5 ×p4+p3=61
q5=a5×p4+q3=1×13+9=22
p6=a6×p5+p4=2×61+36=158
q6=a6×p5+q4=2×22+13=57
We will find
C6=158/57
C5=61/22
So 158(22) - 57(61) = (-1)6-1

158(22) - 57(61) = -1 or 158(-22) - 57(-61) = 1
As the equation had RHS as 2
Multiply by 2
158(-22.2) - 57(-61.2) = 2
The general Solution will be
x = -44 + 57t
y = -122 +158t where t = 0,±1, ±2.............

S-ar putea să vă placă și