Skip to content
← All questions

How do you trace the Euclidean algorithm for gcd(10, 15) to the base case?

To trace the Euclidean algorithm for gcd⁡(10,15)\gcd(10,15), repeatedly apply the step gcd⁡(a,b)=gcd⁡(b,a mod b)\gcd(a,b)=\gcd(b,a\bmod b) until the second argument is zero. The sequence is gcd⁡(10,15)=gcd⁡(15,10)=gcd⁡(10,5)=gcd⁡(5,0)=5\gcd(10,15)=\gcd(15,10)=\gcd(10,5)=\gcd(5,0)=5.

Conditions

  • The initial pair is (10, 15).
  • The algorithm uses the Euclidean step gcd⁡(a,b)=gcd⁡(b,a mod b)\gcd(a,b)=\gcd(b,a\bmod b).
  • The process stops when the second argument is zero.

Reasoning, step by step

  1. Start with gcd⁡(10,15)\gcd(10,15).
  2. Apply the step to get gcd⁡(15,10 mod 15)=gcd⁡(15,10)\gcd(15, 10\bmod 15) = \gcd(15,10).
  3. Apply the step to get gcd⁡(10,15 mod 10)=gcd⁡(10,5)\gcd(10, 15\bmod 10) = \gcd(10,5).
  4. Apply the step to get gcd⁡(5,10 mod 5)=gcd⁡(5,0)\gcd(5, 10\bmod 5) = \gcd(5,0).
  5. Stop because the second argument is zero, and the result is 5.

Example

The sequence is gcd⁡(10,15)=gcd⁡(15,10)=gcd⁡(10,5)=gcd⁡(5,0)=5\gcd(10,15)=\gcd(15,10)=\gcd(10,5)=\gcd(5,0)=5.

Common misconceptions

  • Incorrectly calculating the remainder in any of the steps.
  • Stopping the sequence before the second argument reaches zero.
  • Assuming the result is the second argument instead of the first.

Watch the explanation

Connected concepts

Explore next

Related questions

Meet the concept

↗
Find a method

↗
Meet the concept

↗
Find a method

↗
Find a method

↗

Answers are generated from source material and independently checked. Consult the original video or creator if something is unclear.