Name Ihsan ul ghafoor Roll #08030609-001 SubjectNumber theory SectionA

23
Name Ihsan ul ghafoor Roll # 08030609-001 Subject Number theory Section A Department Methamatics Semester 4 th

description

Name Ihsan ul ghafoor Roll #08030609-001 SubjectNumber theory SectionA Department Methamatics Semester4 th. Topic. Different methods of Solving Congruence's. Congruence. What is congruence? Equivalence of congruence:- If a Ξ b(mod m) - PowerPoint PPT Presentation

Transcript of Name Ihsan ul ghafoor Roll #08030609-001 SubjectNumber theory SectionA

Page 1: Name Ihsan  ul ghafoor Roll #08030609-001 SubjectNumber   theory SectionA

Name Ihsan ul ghafoor

Roll # 08030609-001

Subject Number theory

Section A

Department Methamatics

Semester 4th

Page 2: Name Ihsan  ul ghafoor Roll #08030609-001 SubjectNumber   theory SectionA

Topic

Different methods of Solving

Congruence's

Page 3: Name Ihsan  ul ghafoor Roll #08030609-001 SubjectNumber   theory SectionA

CongruenceWhat is congruence?

Equivalence of congruence:-If a Ξ b(mod m)Then we can use ‘a’ as ‘b’ and ‘b’ as ‘a’ in

other congruence's under same modulus m.

Page 4: Name Ihsan  ul ghafoor Roll #08030609-001 SubjectNumber   theory SectionA

CongruenceSolution of congruence:-If ax Ξ b(mod m)Then solution will belong to following set of

numbersX={0,1,2,3,………,m-1}

If solution is greater than that set we can convert it in to the above set number by using equivalence.

Page 5: Name Ihsan  ul ghafoor Roll #08030609-001 SubjectNumber   theory SectionA

Solution of CongruenceFirst we find either solution exists or not.If ax Ξ b(mod m)

Then solution exists if and only ifd|b where d=gcd(a,m)

The congruence will have ‘d’ solutions.

Page 6: Name Ihsan  ul ghafoor Roll #08030609-001 SubjectNumber   theory SectionA

Solution of CongruenceSome methods of solving congruence are

followingTrial method:-Simple method

Put the value one by one from the solution set and check until the congruence is true.

Page 7: Name Ihsan  ul ghafoor Roll #08030609-001 SubjectNumber   theory SectionA

Solution of CongruenceExample:-2x Ξ 3(mod5)As (2,5)=1 and 1|3 solution exists. As d=1 so congruence

has unique solutionX={0,1,2,3,4}

Now put the value of x one by one2(0) Ξ 3(mod 5) false2(1) Ξ 3(mod 5) false2(2) Ξ 3(mod 5) false2(3) Ξ 3(mod 5) false2(4) Ξ 3(mod 5) trueSo x Ξ 4 (mod 5) is the required solution.

Page 8: Name Ihsan  ul ghafoor Roll #08030609-001 SubjectNumber   theory SectionA

Solution of CongruenceDiophantine eq method:-Every congruence relation can be written in

the form of linear Diophantine eqs.

If ax Ξ b(mod m)m|ax-bax-b=my ; yЄ Zax-my=b

Page 9: Name Ihsan  ul ghafoor Roll #08030609-001 SubjectNumber   theory SectionA

Solution of CongruenceThen find the value of x .And that will be the solution.

Further solutions can be findUsing formulax’=x-(bt/d) ; d=(a,m)

Page 10: Name Ihsan  ul ghafoor Roll #08030609-001 SubjectNumber   theory SectionA

Solution of CongruenceExample:-2x Ξ 3(mod5)As (2,5)=1 and 1|3 solution exists. As d=1 so

congruence has unique solution2x – 5y = 3 (in Diophantine form)

now we will find the value of x in diophanitne eq.

Page 11: Name Ihsan  ul ghafoor Roll #08030609-001 SubjectNumber   theory SectionA

Solution of CongruenceAs (2,5)=1=d1=5(1)+2(-2) (gcd as a linear combination)3=-5(-3)+2(-6) (multiply by 3)3=-2(-6) - 5(-3)So value of x = -6-6(mod5) = 4 5|-6 -6 Ξ 4 (mod 5) -6=5(-1)+(-1) but r>=0

so -6=5(-2)+4;

So solution of congruence x Ξ 4(mod 5)

Page 12: Name Ihsan  ul ghafoor Roll #08030609-001 SubjectNumber   theory SectionA

Solution of CongruenceSymbolic fraction method :-If ax Ξ b(mod m)Then solution will bex Ξ {b+mh (mod m)} / a ; h Є ZIff a| (b + mh)

Page 13: Name Ihsan  ul ghafoor Roll #08030609-001 SubjectNumber   theory SectionA

Solution of CongruenceExample:-2x Ξ 3(mod 5)As (2,5)=1 and 1|3 solution exists. As d=1 so

congruence has unique solution

x Ξ {3 + 5h (mod 5)} /2 [eq 1]2| (2+5h) ( a | b + mh)3+5h Ξ 0 (mod 2)1+ h Ξ 0 (mod 2) 5h Ξ h (mod 2), 3 Ξ 1(mod 2), h Ξ -1 (mod 2) mean h= -1

Page 14: Name Ihsan  ul ghafoor Roll #08030609-001 SubjectNumber   theory SectionA

Solution of CongruencePut h = -1 in [eq 1]x Ξ {3 + 5(-1) (mod 5)} /2x Ξ {-2 (mod 5)} /2x Ξ -1 (mod 5)x Ξ 4 (mod 5) { -1 Ξ 4 (mod 5) }

as { -1 = 5(-1) + 4 }

Page 15: Name Ihsan  ul ghafoor Roll #08030609-001 SubjectNumber   theory SectionA

Solution of CongruenceBy Fermate theorem :-

If ax Ξ b(mod m)

Then solution will be

x Ξ b aФ(m)-1 (mod m)

Ф(n) is Euler phi function.

Page 16: Name Ihsan  ul ghafoor Roll #08030609-001 SubjectNumber   theory SectionA

Solution of CongruenceExample:-2x Ξ 3(mod 5)As (2,5)=1 and 1|3 solution exists. As d=1 so

congruence has unique solutionx Ξ 3.2Ф(5)-1

(mod 5)x Ξ 3.24-1

(mod 5)x Ξ 3.23

(mod 5)x Ξ 24 (mod 5)x Ξ 4 (mod 5) { 24 Ξ 4 (mod 5) }

Page 17: Name Ihsan  ul ghafoor Roll #08030609-001 SubjectNumber   theory SectionA

Solution of CongruenceLet take another example and then find the

solution by methods explain above.

If 4 x Ξ 1 (mod 7)

As (4,7)=1 and 1|1 so unique solution exists.

Page 18: Name Ihsan  ul ghafoor Roll #08030609-001 SubjectNumber   theory SectionA

Solution of Congruence 4 x Ξ 1 (mod 7)

By trial method:-

Put value of x one by one from the setX = {0,1,2,3,4,5,6}

x Ξ 2 (mod 7)

Page 19: Name Ihsan  ul ghafoor Roll #08030609-001 SubjectNumber   theory SectionA

Solution of Congruence 4 x Ξ 1 (mod 7)By Diophantine eq method :-

4 x - 7 y = 1 gcd linear combination

7=4(1)+3 1=4(1)-3(1)

4=3(1)+1 1=4(1)-{7(1)-4(1)}(1)

So x = 2 1=4(1)-7(1)+4(1)x Ξ 2 (mod 7) is solution 1=4(2)-7(1)

Page 20: Name Ihsan  ul ghafoor Roll #08030609-001 SubjectNumber   theory SectionA

Solution of Congruence 4 x Ξ 1 (mod 7)

By symbolic fraction method:-x Ξ {1 + 7 h(mod 7)} / 4 eq 1As 4 | 1 + 7 h1 + 7 h Ξ 0 (mod 4)1 + 3 h Ξ 0 (mod 4) 7 h Ξ 3h (mod 4)3h Ξ {-1 (mod 4) } h Ξ {-1 + 4 k(mod 4) } / 3 eq 23 | -1 + 4k-1 + 4k Ξ 0 (mod 3)-1 + k Ξ 0 (mod 3) 4k Ξ k (mod 3)k Ξ 1 (mod 3)

Page 21: Name Ihsan  ul ghafoor Roll #08030609-001 SubjectNumber   theory SectionA

Solution of CongruencePut k =1 in eq 2h Ξ {-1 + 4(1) (mod 4) } / 3h Ξ {3 (mod 4) } / 3h Ξ 1 (mod 4)Put h =1 in eq 2x Ξ {1 + 7 (1)(mod 7)} / 4x Ξ {8 (mod 7)} / 4x Ξ 2 (mod 7)Required solution

Page 22: Name Ihsan  ul ghafoor Roll #08030609-001 SubjectNumber   theory SectionA

Solution of Congruence4 x Ξ 1 (mod 7)

By Fermate theorem :- x Ξ 1.4Ф(7)-1 (mod 7)x Ξ 46-1 (mod 7)x Ξ 45 (mod 7)x Ξ 1024 (mod 7)x Ξ 2 (mod 7) { 1024 Ξ 2 (mod 7)}

Page 23: Name Ihsan  ul ghafoor Roll #08030609-001 SubjectNumber   theory SectionA

ENDAny Question ?