1 / 15

1. The Euclidean Algorithm 2. The Fundamental Theorem of Arithmetic's

1. The Euclidean Algorithm 2. The Fundamental Theorem of Arithmetic's. Instructor: Hayk Melikyan melikyan@nccu.edu. Proof:. Example: (963, 657). So, (963, 657) = 9. Example: (450, 198)= ?. j r j r j+1 q j+1 r j+2 0 450 198 2 54

Download Presentation

1. The Euclidean Algorithm 2. The Fundamental Theorem of Arithmetic's

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 1. The Euclidean Algorithm 2. The Fundamental Theorem of Arithmetic's Instructor: Hayk Melikyan melikyan@nccu.edu

  2. Proof:

  3. Example: (963, 657) So, (963, 657) = 9

  4. Example: (450, 198)= ? j rj rj+1 qj+1 rj+2 0 450 198 2 54 1 198 54 3 36 2 54 36 1 18 3 36 18 2 0 450 = 2*198 + 54 198 = 3*54 + 36 54 = 1*36 + 18 36 = 2*18

  5. As a Linear Combination 18 = 54 - 1*36 = 1*54 – 1*(198 – 3*54) = 4*54 -1*198 = 4*(450 – 2 *198) – 1*(198) = 4*450 + (-9)*178 So 18 = 450*x0 + 198*y0 Where x0 = 4 and y0 = -9

  6. Extended Euclidean Algorithm In general to see how d = (a, b) may be expressed as a linear combination of a and b we traverse the EA backward. rn = (a, b) = rn-2 - rn-1 qn-1 If we substitutern-1 from the second ( bottom) equation, we will find that rn-1 = rn-3 - rn-2 qn-2 therefore (a, b) =( 1 – qn-1qn-2) rn-2 - qn-1 rn-3 If we continue working backward trough the steps of EA we will express (a, b) as a linear combination of a (r0) and b (r1)

  7. If at some step we have (a, b) = srj + trj -1 Then, since rj = rj-2 - rj-1 qj-1 After substitution (a, b) = s(rj-2 - rj-1 qj-1 ) + trj -1 = (t – sqj-1)rj-1 + srj-2

  8. Theorem 13*. Let a, b  Z+. Then(a, b) = sna + tnb for some n  Z+, where sn, tn are the nth terms of the sequence recursively defined bys0 = 1, t0 = 0, s1 = 0, t1 = 1and sj = sj-2 – qj-1sj-1, tj = tj-2 – qj-1tj-1for j = 2, 3, …, n where qjare the quotients in the DAwhen it is used for a and b

  9. Example: gcd (450, 198) sj = sj-2 – qj-1sj-1, tj = tj-2 – qj-1tj-1 j rj rj+1 qj+1 rj+2sjtj 0 450 198 2 54 10 1 198 54 3 36 01 2 54 36 1 18 1 -2 3 36 18 2 0 3 7 4-9

  10. Extended Euclidean Algorithm(second version)

  11. Example

More Related