Thursday, December 17, 2009

Could one use Euclid's algorithm to find the GCD of three different numbers?

I am familiar with using Euclid's algorithm for GCDs in a two-column format, like this:





integer a integer b


integer b remainder r


remainder r remainder s (of b/r)


s again remainder t (of r/s)





and so on.





Is there a mathematically sound way to adapt this to three columns to find the GCD of three integers, or am I better off using some other method?Could one use Euclid's algorithm to find the GCD of three different numbers?
you should find GCD of 1st and 2nd and then resultant and 3rd





other wise it is not possible in this method





for example 42,63, 105





GCD(42,63,105) = GCD(GCD(42,63), 105)


= GCD(21,105)


= 21





math kp


Could one use Euclid's algorithm to find the GCD of three different numbers?
I believe math_kp is entirely correct on this point. I also believe that all of us said the exact same thing. Report Abuse

Let's say we have integers a, b, and c.





Use Euclid's algorithm on a and b to find their gcd g.


Then use Euclid's algorithm on c and g to find the gcd of them. This will be the gcd of all three numbers a,b and c.
You can use it first to get the gcd of the first 2 numbers. Then use it on that gcd and the third number.
  • one web hosting
  • No comments:

    Post a Comment