Changes

Jump to navigation Jump to search
124 bytes added ,  13:03, May 18, 2010
→‎The Algorithm: why it works...
Line 2: Line 2:     
==The Algorithm==
 
==The Algorithm==
−
The [[algorithm]] is beautiful in its simplicity. 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.
+
The [[algorithm]] is beautiful in its simplicity. It just uses a basic property of [[natural number]]s: 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==
 
==History==
 
''Section in progress.''
 
''Section in progress.''
256

edits

Navigation menu