Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
56 views7 pages

Untitled

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
56 views7 pages

Untitled

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 7
Topic 8 EUCLIDEAN ALGORITHM recursive use of the division algorithm, we may find the greatest common divisor of two positive integers a and 4 ged (a, 9cd ) without factoring either. This procedure is also known as the Euclidean algorithm. 7 ) First, note that if #0 and 6 | a, then ged(a,b) = | 6 |. The (av next observation provides the basis for the Euclidean algorithm. . _ If a= bg +r then (a) = (br). Thus given integers a > 6 > 0, ee thé Euclidean algorithm uses the division algorithm repeatedly to obtain a=bq, +r, withO Sr, r,>..., the remainders get smaller and smaller, and after a finite number of steps we obtain a remainder r,,, = 0. Thus ged(a,b) = ged(br,)=...=17,. For example, for a = 329 and b = 182. Gar, 182.) (O12 4+ \> [329 = 1:182 +147 age 4(h) +o | 182 147 35 and stop when there is no remainder. The last dividend is the 8¢d, so in our example, ged (329, 182) = 7. Take note that in performing Euclidean algorithm it is not necessarily mean tha ais always greater than 6, they just represents values of int : which can be done interchangeable depending on their vile Topic 9 BEZOUT’S THEOREM Theorem : Any two nonzero integers a and 6 have a greatest common divisor, which can be expressed as the smallest positive linear combination of a and 6, caesar Moreover, an integer is a linear combination of a and 6 if and only if ic is a multiple of their greatest common divisor. Example 1; Find ged (435, 377), and express it as a linear combination of 435 and 377. Solution: We will use the Euclidean algorithm. Divide the larger number by the smaller, which gives you a quotient of 1 and a remainder of 58. Then divide the remainder 58 into 377, and continue the Euclidean algorithm. You should get the following equations. Ee 43. 377 +58 Y 37: SB 29Ni, 5 29 Thus ged (435,377) = ged. (377,58) = ged 9), and the repeated divisions show that ged (435, 377) =| since the remainder in the last equation is 0, =e To wte23)ax a linear combination of 435 and 377 we need to use the“Same equations, but we need to solve them for th remainders, — 58 = 435-1 -377% * 29 = 377-6 58 ~ 33 (yen @ Now take the equation involving the rema ainder 29, and substitute for 58, the remainder in the previous equation. (1377-65) 4.6 (377 te 29 «2377-6 58 5377-6 (435-1 °377) ~~ york G7 377-6 438) = 1634 — 2610 gives the linear combination we need, =@4) a mh rk 29 = (71(877) + (-6)1435) oF (71877) + (-6)(435) = 29 - — YR Bezout’s Theorem. be gcd (a, 6), then Bere exist Xy yobl such that at byy= 4. Example 2: Find ged (405, 480), and also find Xp yg such that 405 x, + 480 y, = ged (405,480). (Nt = 1s 14757 405= 75-5 +30 75 =30:2+¢5~ 30=(5)2+0. Hence, ged ( 405, 480) = 15 ~~ -s(a) STE Madr6.9.-2 7% tS) ) 2 75-405 2+75-10 re 2 (40) +10(78 = 75-11-405-2 ~ dS) — 2 (405) 480 - 405) -11~ 405-2 (4x -4os) ~ 2( 40s) 480+ 11 = 405-11 = 405+ ae a) 30 = 480-11- 405-13 I ae +) a Hence, x, = -13, ¥y = = 405° (-13) + 480+ 11 —_ see te lS ee + 4k (11): | (a. ny Two ii integers a and 6 are rae ly prime [that ) Bey = 1] ifand only if there exist x, y such that ax + by = 1. Solution: Note: It will be used in finding for the multiplicative inverse of mod n. Topic 10 LINEAR DIOPHANTINE EQUATION Diophantus is a Greek mathematician who is often called “the Father of Algebra" because he contributed greatly fo number theory, mathematical notation, and because of his work arithmetica which contains the earliest known use of syncopated notation. Ad (the most outstanding work on algebra in Greek Mathematics) is a collection of 130 problems giving numerical solutions of both determinate and indeterminate equations. Although little known about Diophantus'’ life, his age at death is known because one of his admirers described his life in an algebraic riddle. “Diophantus youth lasted 1/6 of his life. He grew a beard after 1/12 more of his life. After 1/7 of his life, Diophantus married. Five years later he had son. The son lived exactly % as long as his father, and Diophantus died just four years after his son's death. All of this totals the years Diophantus lived.” —e ab tv EL Diophantine equation is a polyndmial equation P ( x xX) = 0, where the polynomial P has integral coefficients and one is interested in solutions for which all the unknowns take integer values, | ea: ‘A linear Diophantine equation is a linear equation of the form ax + by = c with integer coefficients a, b, and c requiring integer solutions which has solucions if and only if (@ b) |<. If the linear Diophantine equation is solvable, there is infinite number of integer solutions. There is a-similar result for linear Diophantine equations in more than two variables. Theorem. Consides the Diophantine equation ax + by = where 4 6, c € Z an ‘a, b)# 0. Let d= (a, 6) = Aa) If (a, b) | c, there are solutions for the equation. (b) If (a, b)= dc, there are infinitely many solutions of _b a Me gh Yeap k hy, Here (x,, y,) is a particular solution, and k € Z. —_— —— the form To find the general solution to the Diophantine equation’ax + by _=¢ follow the steps below: “a 1. Find the gcd (a, b) by Euclidean algorithm. “én 2. Check that ged (a, b) |, to make sure that it has integer solutions. If gcd{a,b) does not divide c, do not proceed to step 6105) The equation does have integer solutions. 7 3. Write gcd (a, b) as a linear combination of a and b by reversing the steps of the Euclidean algorithm that was used in finding the gcd. - 4, Determine the value-y and v in the linear y, Yo = combination involving a and b of the form au + by 7 = d= gcd (a, b). aS | 5. Find the value of x, and y, as a particular/ initial solution to the equation = ue HET and Yo= Beats v, als = Find the general solutions or the family of solutions Find the g family of solutions _ (x.y) given o X=N0+ *kand y= yo aromnare ke Xe Xot kK eee ae ke Example 1: Find integers x and y suc tha dy = 21 Solutions: We shall find first ged > 9) using Euclidean algorithm: 932 2+0 Hence the ged (6, 9) -(3 dnd since it divides 21, the linear equation has a solution. Reversing the Euclidean prc 3 = 9-6-1 3 = Lito Che Find) Land v= 1.To find one pantculr solution (x, y,) the general solution (x, y) is given by tl = bee OL XEN t GRAD + Ska 7 + 3k = Y= Yo" Sk=2- Sk=7-2k ioe Therefore, the general solution of the given Sacaticn + (-743k, 7 ~ 2k) where REZ—— a Example 2: Find the complete set of solutions psy = 65a. ‘olutions of 343x Solutions: We shall first find ged( 343, 259), Number Theory 343 = 259-1484 259 = 843-7 84 = (7)12+0 Hence, ged(343, 259) = 7. Since 7 | 658, the linear equation has a solution. To find a particular solution, aes (« _ 259-243 ~~ (1284 — 30% ae - - a — 259 — (343 - 259-1) 3 (esa) _3(%) 343 (-3) + 259 (4) “ane + o59(8) v Therefore, 658 = 7 94 = [343 (-3) + 259 (4)] 94 = 343 (-282) + 259 (376). This gives a solution x, = -282 and y, = 376. sing theorem, Ye4e sed d x= -282+k- 72 y=376-k- 3B Ge : n= Po X= -282 + 87k y=376-49k forallkeZ.*° 7 7B7G, a Koko + Bi Yr You " 7 nou ) ul = M2024 BAI ye TH WA I ~ 28 tis YE mt - 4gKk

You might also like