asdgba

© All Rights Reserved

3 views

asdgba

© All Rights Reserved

- unit 3 section 2 solving systems by substitution
- literal equations
- Assembly language programming and organization of the ibm pc solution
- Lab 7 Conservation of Energy Elastic
- 6th Grade Unit 1 Study Guide
- lesson plan
- part part whole assessments or worksheets
- Review 1
- literacy linkage and content are language consideration
- (LCM) BizzBuzz[1]
- CRT Bijection
- Lab05-solutions.pdf
- UCB PhD Finance - Prep Reading
- UG Guide (Math).pdf
- Elmwood B
- Csat Aptitude Paper 2 Maths Data Interpretation High Priority Topics Sample Questions Free Studymaterial Part 2 3
- Ustet Upcat Coverage Exam
- Euclidean_Algorithm_Improvement
- Business Math MBA_Course outline _Summer 2015-2016.doc
- unit 1 test review

You are on page 1of 8

as follows:

An integer c is called the GCD(a,b) (read as the greatest

common divisor of integers a and b) if the following 2

conditions hold:

1) c | a c | b

2) For any common divisor d of a and b, d | c.

Rule 2 ensures that the divisor c is the greatest of all the

common divisors of a and b.

One way we could find the GCD of two integers is by trial and

error. Another way is that we could prime factorize each

integer, and from the prime factorization, see which factors are

common between the two integers. However, both of these

become very time consuming as soon as the integers are

relatively large.

However, Euclid devised a fairly simple and efficient algorithm

to determine the GCD of two integers. The algorithm basically

makes use of the division algorithm repeatedly.

Lets say you are trying to find the GCD(a,b), where a and b

are integers with a b > 0

a = q1b + r1,

where 0 < r < b

b = q2 r 1 + r 2 ,

where 0 < r2 < r1

r1 = q3r2 + r3,

where 0 < r3 < r2

.

.

ri = qi+2ri+1+ ri+2, where 0 < ri+2 < ri+1

.

.

rk-1 = qk+1rk

Euclids algorithm says that the GCD(a,b) = rk

This might make more sense if we look at an example:

Consider computing GCD(125, 87)

125 = 1*87 + 38

87 = 2*38 + 11

38 = 3*11 + 5

11 = 2*5 + 1

5 = 5*1

Thus, we find that GCD(125,87) = 1.

Lets look at one more quickly, GCD(125, 20)

125 = 6*20 + 5

20 = 4*5,

thus, the GCD(125,20) = 5

give us the GCD of the two numbers passed to it. First I will

show that the number the algorithm produces is indeed a

divisor of a and b.

a = q1b + r1,

where 0 < r < b

b = q2 r 1 + r 2 ,

where 0 < r2 < r1

r1 = q3r2 + r3,

where 0 < r3 < r2

.

.

ri = qi+2ri+1+ ri+2, where 0 < ri+2 < ri+1

.

.

rk-1 = qk+1rk

From the last equation, we know that rk | rk-1. So, we know that

we can express rk-1 = crk, where c is an integer. Now consider

the previous equation:

rk-2 = qkrk-1+ rk = qkcrk, + rk = rk(qkc + 1)

Thus, we have that rk | rk-2.

In our equation previous to that one, we have:

rk-3 = qk-1rk-2+ rk-1

divisibility we have that rk | rk-3. As you can see, we can

we get to the last two, where we will find that r k | a and rk | b.

Thus, we find that Euclids algorithm indeed gives us a

common factor of a and b.

Now, we have one more part to prove and that is to show that

the common divisor that Euclids algorithm produces is the

largest possible. This proof is going to look similar to the

previous one, but it is different in that we will start by

assuming that a and b have a common factor d, and then show

that d | rk.

Consider an arbitrary common factor d of a and b. If d is a

common factor, we can rewrite a and b as follows:

a = da

a = q1b + r1.

r1 = da - q1db (Substitute for a and b, and solve for r1.)

= d(a - q1b)

Thus, we have that d | r1.

Now, consider the second equation, and repeat the steps we did

on the first, this time solving for r2. (Note: We will let r1=dr1,

where r1 is an integer.)

b = q2 r 1 + r 2 .

r2 = db - q2dr1

= d(b - q2d)

As you can see, we can continue this process through each of

the equations until we hit the second to last one, where we will

have:

rk-2 = qkrk-1+ rk

rk = drk-2 - qkdrk-1 = d(rk-2 - qkrk-1),

thus, d | rk.

But this says that any arbitrary common factor of a and b that

we originally picked divides into rk, the value that Euclids

algorithm produced. Since we know that rk IS a common factor

to both a and b, this shows that is must be the largest possible

common factor, or the GCD(a,b).

One of the consequences of the Euclidean Algorithm is as

follows:

Given integers a and b, there is always an integral solution to

the equation

ax + by = gcd(a,b).

Furthermore, the Extended Euclidean Algorithm can be used

to find values of x and y to satisfy the equation above. The

algorithm will look similar to the proof in some manner.

Consider writing down the steps of Euclid's algorithm:

a = q1b + r1,

where 0 < r < b

b = q2 r 1 + r 2 ,

where 0 < r2 < r1

r1 = q3r2 + r3,

where 0 < r3 < r2

.

.

ri = qi+2ri+1+ ri+2, where 0 < ri+2 < ri+1

.

rk-2 = qkrk-1+ rk,

where 0 < rk < rk-1

rk-1 = qk+1rk

Considersolvingthesecondtolastequationforrk. You get

rk = rk-2 - qkrk-1,or

gcd(a,b)= rk-2 - qkrk-1

Now,solvethepreviousequationforrk-1:

rk-1 = rk-3 - qk-1rk-2,

andsubstitutethisvalueintothepreviousderivedequation:

gcd(a,b)= rk-2 - qk(rk-3 - qk-1rk-2)

gcd(a,b)=(1+qkqk-1)rk-2 - qkrk-3

Noticethatnowwehaveexpressedgcd(a,b)asalinear

combinationofrk-2 and rk-3.Nextwecansubstituteforofrk-2 in

terms of ofrk-3 andrk-4,sothatthegcd(a,b)canbeexpressed

asthelinearcombinationof ofrk-3 andrk-4.Eventually,by

continuingthisprocess,gcd(a,b)willbeexpressedasalinear

combinationofaandbasdesired.

Thisprocesswillbemucheasiertoseewithexamples:

Findintegersxandysuchthat

135x+50y=5.

UseEuclid'sAlgorithmtocomputeGCD(135,50):

135=2*50+35

50=1*35+15

35=2*15+5

15=3*5

Now,let'susetheExtendedEuclideanalgorithmtosolvethe

problem:

5=352*15,fromthesecondtolastequation35=2*15+5.

But,wehavethat

15=5035,fromthethirdtolastequation50=1*35+15.

Now,substitutethisvalueintothepreviouslyderivedequation:

5=352*(5035)

5=3*352*50

Now,finallyusethefirstequationtodetermineanexpression

for35asalinearcombinationof135and50:

35=1352*50.

Plugthisintoourlastequation:

5=3*(1352*50)2*50

5=3*1358*50

So,asetofsolutionstotheequationisx=3,y=8.

- unit 3 section 2 solving systems by substitutionUploaded byapi-372576508
- literal equationsUploaded byapi-348347219
- Assembly language programming and organization of the ibm pc solutionUploaded byshawon
- Lab 7 Conservation of Energy ElasticUploaded byAndrew Gomez
- 6th Grade Unit 1 Study GuideUploaded by504mathletes
- lesson planUploaded byapi-339480866
- part part whole assessments or worksheetsUploaded byDinDin
- Review 1Uploaded bysima_s
- literacy linkage and content are language considerationUploaded byapi-269024224
- (LCM) BizzBuzz[1]Uploaded bySam Mesut Ozil
- CRT BijectionUploaded byKiera Halkias
- Lab05-solutions.pdfUploaded byShweta Sridhar
- UCB PhD Finance - Prep ReadingUploaded byMalarkey Snollygoster
- UG Guide (Math).pdfUploaded byShubhamParashar
- Elmwood BUploaded byKonstantinos Konstantinou
- Csat Aptitude Paper 2 Maths Data Interpretation High Priority Topics Sample Questions Free Studymaterial Part 2 3Uploaded bySanjeev Chaudhary
- Ustet Upcat Coverage ExamUploaded byAnnaGuese
- Euclidean_Algorithm_ImprovementUploaded byjd
- Business Math MBA_Course outline _Summer 2015-2016.docUploaded byAminul Islam
- unit 1 test reviewUploaded byapi-302577842
- unit 1 test reviewUploaded byapi-302577842
- 10 Mathematics Ncert Ch03 Pair of Linear Equations in Two Variables Ex 3.7 Ans SsaUploaded byarpit
- ship propulsionUploaded byPutika Appha
- SE10 Using the Numeric Solver to solve a formula.pdfUploaded byFabinho Juntá Ká Afer Tuxá
- Mathematics 2012 Unsolved Paper Outside Delhi.pdfUploaded bysagar
- alg iunit02inequalitiesliteralequationsUploaded byapi-327299670
- Impes MethodUploaded byDavid Reyes
- UPPSC Mathematics SyllabusUploaded byankit
- CoursesUploaded byAnonymous gUjimJK
- Lectut CHN-302 PDF Assignment3Uploaded byPritam Paul

- Programming Abstractions in C++Uploaded byAhmad Amin
- DebashisUploaded byAlexander Bennett
- ResultsUploaded byAlexander Bennett
- Stanford - Programming Abstractions in C++Uploaded byAlexander Bennett
- CE520.Syll_18Uploaded byAlexander Bennett
- platoUploaded byAlexander Bennett
- Curriculum Vitae 1Uploaded byAlexander Bennett
- HW8_1Uploaded byAlexander Bennett
- hw06Uploaded byAlexander Bennett
- hw06Uploaded byAlexander Bennett
- Lecture 3Uploaded byAlexander Bennett
- L02Uploaded byAlexander Bennett
- hw01Uploaded byAlexander Bennett
- hw03 (1)Uploaded byAlexander Bennett
- hw02Uploaded byAlexander Bennett
- L01Uploaded byAlexander Bennett
- Summary BasicsUploaded byAlexander Bennett
- MIT6_241JS11_chap05.pdfUploaded byAlexander Bennett
- Psoriasis - Treatment for Moderate or Severe Psoriasis Updated January 2017 - Lay Reviewed January 2017Uploaded byAlexander Bennett
- Cleartrip Flight E-TicketUploaded byAlexander Bennett
- Auto Cad ManualUploaded byBaljeet Singh
- Numerical Analysis_I. Jacques and C. JuddUploaded byvicksgeorge
- FM.4bUploaded byAlexander Bennett
- Invitation GlendaUploaded byAlexander Bennett
- limitations of winkler.pdfUploaded bySamitha Soysa
- New Microsoft Office Excel WorksheetUploaded byAlexander Bennett
- AMIR79704884_2016-01-14_10-05-12 - CopyUploaded byAlexander Bennett
- Reagan Chandramohan Curriculum VitaeUploaded byAlexander Bennett
- pzt_stfpltUploaded byAlexander Bennett
- Starting NIMAXUploaded byAlexander Bennett

- Hot Tap ManualUploaded byChegg Chem
- lecture1_2Uploaded bybotee
- LAB38A3Uploaded byVinoth Kumar
- AWR Nonlinear Modeling White PaperUploaded byAWR Corporation
- CCNA Notes FinalUploaded byNabi Bakhsh
- Top 10 Router OS Configuration MistakesUploaded byinnovativekalu
- 16 Mark Questions TQMUploaded bysaravanan_saptc
- kupdf.com_salve-regina-arvo-partpdf.pdfUploaded byFrancisco Cesar
- IP Location in Australia - Melissa DataUploaded byjasmineau
- Straight Dope on the iPod's BirthUploaded byederazza
- Lift Station DesignUploaded byPaolo De Peralta
- Numerical Simulation of a Cathodic Protection System LendlUploaded byGT Parthiban
- Playstation 3 User ManualUploaded bynat4187
- Application for NRK ID CardUploaded byvipinchombala
- ESM740G-tiristorUploaded byjosenicolas12000
- Lexical Analysis for the Measurement of Conceptual Duplicity Between C ProgramsUploaded byIJRASETPublications
- SORTING.pptUploaded byMohammed Jeelan
- mac oscx security configuration 10Uploaded bykvkvbird
- 2-Technical Specification DevKitUploaded byfuckqqqq
- KU107_UsingSQL_MERGESlowlyChangingDimensionUploaded byuans
- BBIFBI_standalone_IET_PE.pdfUploaded byJeremy Meyer
- Protocol Dp25 Dp05 Dp500 Dp500l(2)Uploaded bydizzirom
- FO Components & SystemsUploaded byNikos Tsagkopoulos Anastasia Dimaki
- Segmented PricingUploaded byEmad Rashid
- AutoCAD Release HistoryUploaded byjoabjim8392
- Definition and Introduction of QoS in LTEUploaded bySonny Kurniawan
- 2009 German Tax Organizer Siemens VersionUploaded byshaonaa
- Joint Sentiment Topic Model for Sentiment AnalysisUploaded byHung Hanviet
- Director of Information TechnologyUploaded byapi-121341165
- PPT QUANTCOMPUploaded byDeepak Chandra