The extended Euclidean Algorithm made easy
暂无分享,去创建一个
Teaching Notes The extended Euclidean Algorithm made easy The Euclidean algorithm [1] calculates the greatest common divisor (GCD) of two integers and . A theorem by Bézout and Bachet asserts that this GCD can be written as a linear combination of and : a b a b GCD (a, b) = x × a + y × b with and integers. The extended Euclidean Algorithm calculates and also and . One of the implementations of this algorithm is due to Donald Knuth [1, 2]. It works just fine if you use a computer, but if you want to do the calculations by hand this is not the method to use. x y GCD (a, b) x y
[1] Kenneth H. Rosen. Elementary Number Theory: And Its Applications , 2010 .
[2] David Thomas,et al. The Art in Computer Programming , 2001 .
[3] Kenneth H. Rosen. Elementary number theory and its applications (3. ed.) , 1993 .
[4] Donald E. Knuth,et al. The art of computer programming. Vol.2: Seminumerical algorithms , 1981 .