13.07.2015 Views

제 2 ‚절 The Euclidean Algorithm

제 2 ‚절 The Euclidean Algorithm

제 2 ‚절 The Euclidean Algorithm

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

10 1 .s i = s i−2 − q i−1 s i−1 , (2 ≤ i ≤ n)s 0 = 1,s 1 = 0,t i = t i−2 − q i−1 t i−1 , (2 ≤ i ≤ n)t 0 = 0,t 1 = 1.(1.1). s i , t i (1.1) , 1 ≤ i ≤ n r i = s i x + t i y (1.2) . r 0 = 1 · x + 0 = s 0 x + t 0 y r 1 = 0 · x + 1 · y =s 1 x + t 1 y i 0 1 . 2 ≤ i ≤ k − 1 (1.2) . <strong>Euclidean</strong> algorithm k r k−2 = r k−1 q k−1 + r k , r k = r k−2 − r k−1 q k−1= (s k−2 x + t k−2 y) − (s k−1 x + t k−1 y)q k−1= (s k−2 − s k−1 q k−1 )x + (t k−2 − t k−1 q k−1 )y= s k x + t k y (1.2) i = k . , . Maple Program 5. [extGCD( )] n, m gcd(n, m) sn + tm =gcd(n, m) s, t , L[1], L[2], L[3] gcd(n, m), s, t list .: A:=extGCD(n,m) extGCD(n,m).> restart;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!