Informal Formulation of The Algorithm
Dividend | Divisor | Quotient | Remainder |
---|---|---|---|
120 | 23 | 5 | 5 |
23 | 5 | 4 | 3 |
5 | 3 | 1 | 2 |
3 | 2 | 1 | 1 |
2 | 1 | 2 | 0 |
To illustrate the extension of Euclid's algorithm, consider the computation of gcd(120, 23), which is shown on the table on the left. Notice that the quotient in each division is recorded as well alongside the remainder.
In this case, the remainder in the fourth line (which is equal to 1) indicates that the gcd is 1; that is, 120 and 23 are coprime (also called relatively prime). For the sake of simplicity, the example chosen is a coprime pair; but the more general case of gcd other than 1 also works similarly.
There are two methods to proceed, both using an integer division algorithm as a subprocedure, which will be discussed separately.
Read more about this topic: Extended Euclidean Algorithm
Famous quotes containing the words informal and/or formulation:
“We are now a nation of people in daily contact with strangers. Thanks to mass transportation, school administrators and teachers often live many miles from the neighborhood schoolhouse. They are no longer in daily informal contact with parents, ministers, and other institution leaders . . . [and are] no longer a natural extension of parental authority.”
—James P. Comer (20th century)
“You do not mean by mystery what a Catholic does. You mean an interesting uncertainty: the uncertainty ceasing interest ceases also.... But a Catholic by mystery means an incomprehensible certainty: without certainty, without formulation there is no interest;... the clearer the formulation the greater the interest.”
—Gerard Manley Hopkins (18441889)