Q BgQuestion:

      
Novice
Karma Points: 28
Respect (100%):
posted by  Raine on 11/4/2009 3:38:11 PM  |  status: Closed  |  Earned Karma: 28

gcd

Course Textbook Chapter Problem Needs by
Discrete Math Discrete Math and Its Applications (6th) by Rosen 3.7 2E 11/4/2009 at 8:00:00 PM
Question Details:
Express the greatest common divisor of each of these pairs of integers as a linear combination of these integers.
a)35, 78
b)101, 203
c)2002, 2339
Find an inverse of 2 modulo 17.
Bonus Point Alert! Earn +2 additional karma points for helping this gold member.

AAnswers:

Answer Question Ask for clarification
Expert
Karma Points: 1,522
posted by A-ManESL on 11/5/2009 12:50:56 AM  |  status: Live
Asker's Rating: Lifesaver   
Response Details:
(a)Use the Euclidean algorithm as follows:

78 = 35.2 + 8
35 = 8.4 + 3
8 = 3.2 + 2
3 = 2.1 + 1
2 = 2.1
The last non zero remainder is 1 so the gcd(35,78) is 1. To find the requisite linear combination work backwards from the second last step as follows:
1 = 3 - 2.1 = 3 - (8-3.2) = 3 - 8 + 3.2 = 3.3 - 8 = 3.(35 - 8.4) - 8 = 3.35 - 8.12 - 8 = 3.35 - 8.13 = 3.35 - 13.(78-35.2) = 3.35 - 13.78 + 35.26 = 29.35 - 13.78
Notice that I never actually multiplied out and added the terms. I only brought each equation in a form so as to allow me to substitute the previous step's remainder in it.     
Similarly,
(b) gcd(101,203) = 1 = -2.101 + 1.203
(c) gcd(2002,2339) = 1 = -819.2002 + 701.2339
To find the inverse of 2 modulo 17 first note that the inverse exists iff gcd(2,17) = 1 which is true here. Now apply the Euclidean algorithm as in steps (a), (b) and (c) to obtain 1 = -8.2  + 1.17 or in other words 1 - (-8).2  = 17. Thus -8.2 = 1 mod 17 or -8 is the inverse of 2 mod 17. Obviously -8 = 9 mod 17 so the inverse is 9.
Answer Question Ask for clarificarion

Join Cramster's Community

Cramster.com brings together students, educators and subject enthusiasts in an online study community. With around-the-clock expert help and a community of over 100,000 knowledgeable members, you can find the help you need, whenever you need it. Join for free today » How Cramster is different from tutoring »