Extended Euclidean Algorithm

The greatest common divisor of two integers and can be found by the Euclidean algorithm by successive repeated application of the division algorithm. The extended Euclidean algorithm not only computes but also returns the numbers and such that . The remainder of the step in the Euclidean algorithm can be expressed in the form , where and can be determined from the corresponding quotient and the values , or two rows above them using the relations and , respectively. This forward method requires no back substitutions and reduces the amount of computation involved in finding the coefficients and of the linear combination.

(11 lines omitted)

The result saying that the greatest common divisor of any two integers and can be written as their linear combination is also known as the Bachet–Bézout theorem (actually Bézout formulated it for polynomials).
For more information, see the Wikipedia entry.
comments
 
Powered by Wolfram Mathematica
Give us your feedback
Give us your feedback

Source page:




 often  occasionally  never

Note: Please do not include anything you consider confidential or proprietary. Your message and contact information may be shared with the author of any specific Demonstration for which you give feedback, but will not otherwise be published or distributed.
Privacy Policy »

Note: To run this Demonstration you need the free
Mathematica Player
or Mathematica 7+
Download or upgrade to Mathematica Player 7
I already have Mathematica Player or Mathematica 7+