Euclidean algorithm

From Conservapedia

Jump to: navigation, search

The Euclidean algorithm is a method for determining the greatest common divisor of two numbers.

The Algorithm

The algorithm is beautiful in its simplicity. It just uses a basic property of natural numbers: if a number divides two integers, it divides their difference, too. So, for any two numbers, one simply subtracts the smaller number from the larger; if the numbers are equal, or if one number reaches zero, the equal numbers or the remaining number is the GCD. For example, if one starts with 24 and 60, one subtracts the smaller from the larger to get 24 and 36. The process is repeated until at least one number is zero: 24,60 becomes 24,36, which becomes 24,12, which becomes 12,12, so 12 is the GCD of 24 and 60.

History

Section in progress.

Personal tools