This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 1 COMP170 Discrete Mathematical Tools for Computer Science Discrete Math for Computer Science K. Bogart, C. Stein and R.L. Drysdale Section 2.2, pp. 5669 Inverses and GCDs Version 2.0: Last updated, May 13, 2007 Slides c 2005 by M. J. Golin and G. Trippen 2 2.2 Inverses and Greatest Common Divisors • Solutions to Equations and Inverses mod n • Converting Modular Equations to Normal Equations • Greatest Common Divisors • Euclid’s Division Theorem • Euclid’s GCD Algorithm • Extended GCD Agorithm • Computing Inverses 3 Greatest Common Divisors: Definitions Euclid’s Division Theorem Euclid’s GCD Algorithm Solutions to Eqns & Inverses mod n Converting mod n Eqns to Normal Ones Extended GCD Algorithm Computing Inverses mod n Proving tool from prev lecture This lecture develops lots of tools for later use. Here’s a chart describing the relationship between the various parts Introduction to proof by smallest counterexample Introduction to proof by contradiction 4 Definition: • Positive integer m is a divisor of integer n if n = mq for some integer q • if m is a divisor of n we write m  n . (say) “ m divides n ” • if m is a not a divisor of n we write m 6  n . (say) “ m does not divide n ” Examples: • 1  30 , 5  30 , 5  35 , 5 6  31 5 • If p is a divisor of both m and n then p is a common divisor of m and n • gcd ( m,n ) denotes the greatest common divisor of m and n . 1 is aways a common divisor of m and n Definition: Examples: • { 1 , 2 , 3 , 6 } are all of the common divisors of 24 and 30 . • gcd (24 , 30) = 6 6 Definition: • Positive integer p > 1 is prime if its only divisors are 1 and itself . If p is not prime, it is composite . • m and n are relatively prime if they have no common divisor other than 1 , i.e., gcd ( m,n ) = 1 . Examples: • 2 , 3 , 5 , 7 , 11 are prime. 33 = 3 · 11 is composite • gcd (77 , 34) = 1 , so 77 and 34 are relatively prime gcd (77 , 33) = 11 , so 77 and 33 are not relatively prime 7 Theorem 2.15 : Two positive integers j,k are relatively prime , i.e., gcd ( j,k ) = 1 , if and only if there are integers x and y such that jx + ky = 1 . The main goal of this lecture is to prove the Theorem and Corollary below and also to show how to calculate the corre sponding x and y and multiplicative inverses . Corollary 2.16 : For any positive integer n , an element a ∈ Z n has a multiplicative inverse if and only if gcd ( a,n ) = 1 . In order to get to that point we will have to develop a lot of auxillary machinery. We will see in the next lecture that this auxillary machinery will be useful for implementing RSA publickey cryptography. 8 2.2 Inverses and Greatest Common Divisors • Solutions to Equations and Inverses mod n • Converting Modular Equations to Normal Equations • Greatest Common Divisors • Euclid’s Division Theorem • Euclid’s GCD Algorithm • Extended GCD Agorithm • Computing Inverses 9 Recall that in the last section we learnt about Euclid’s division theorem...
View
Full
Document
This note was uploaded on 08/25/2010 for the course COMP COMP170 taught by Professor M.j.golin during the Spring '10 term at HKUST.
 Spring '10
 M.J.Golin
 Computer Science

Click to edit the document details