Jump to content

Euclidean algorithm

Featured Replies

Can anyone please explain why gcd(n,m)=gcd(n-m,m)? (n>=m)

 

It's like everyone assumes it because, apparantly, it's so obvious, but I don't see it.

Can anyone please explain why gcd(n' date='m)=gcd(n-m,m)? (n>=m)

[/quote']Not really sure what you're looking for. I think your question isn't really to do with the algorithm, are you looking for a proof of the identity you gave?

Is it clear to you that if r is a divisor of n and m then r will also be a divisor of n-m?

And can you see that'd it'd be impossible for the GD to get bigger with a smaller number, so r is still the GCD?

It's like everyone assumes it because, apparantly, it's so obvious, but I don't see it.
Lots of things aren't obvious that get assumed, "the" quadratic equation for instance. I can never remember how that is derived.

It's not necessary to try to 'see that the GD can't get bigger'.

 

If d divides x and y it divides ax+by for integers a and b. So in particular the divisors of n and m are the same as the divisors of n-m and m (you don't actually need the restriction on n=>m: divisors are well defined for negative numbers).

 

So the set of divisors of n and m is the same as the set of divisors of n-m and m, hence the largest element in each of those two sets must be the same.

  • Author
It's not necessary to try to 'see that the GD can't get bigger'.

 

If d divides x and y it divides ax+by for integers a and b. So in particular the divisors of n and m are the same as the divisors of n-m and m (you don't actually need the restriction on n=>m: divisors are well defined for negative numbers).

 

So the set of divisors of n and m is the same as the set of divisors of n-m and m' date=' hence the largest element in each of those two sets must be the same.[/quote']

 

Ah, I see. It's so freaking obvious now. Thanks!

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.