310 likes | 644 Views
Comp 750, Fall 2009. Number Theoretic Algs. - 2. Euclid(a, b)if b = 0 thenreturn aelse return Euclid(b, a mod b)fi. Euclid's Algorithm. Example:Euclid(30, 21) = Euclid(21, 9)= Euclid(9, 3)= Euclid(3, 0)= 3. Comp 750, Fall 2009. Number Theoretic Algs. - 3. Case: a = b - Euclid(a
E N D
1. Comp 750, Fall 2009 Number Theoretic Algs. - 1