The Euclidean algorithm reduces the problem size by replacing the larger number with the remainder of the division of the two numbers. Since the remainder satisfies (where is the divisor), the new number is strictly smaller than the previous larger number, ensuring progress towards the base case.
Conditions: The current pair is with .; The step computes with .; The new pair is or depending on implementation, but effectively the max value decreases.
The Euclidean algorithm reduces the problem size by replacing the larger number with the remainder of the division of the two numbers. Since the remainder satisfies (where is the divisor), the new number is strictly smaller than the previous larger number, ensuring progress towards the base case.
Conditions: The current pair is with .; The step computes with .; The new pair is or depending on implementation, but effectively the max value decreases.