The Euclidean algorithm terminates because the remainder in each step is strictly smaller than the previous divisor. Since the second argument is a nonnegative integer that decreases with each step, it must eventually reach zero.
Conditions: The algorithm operates on nonnegative integers.; Each step replaces the pair with .; The remainder is strictly less than when .
The Euclidean algorithm terminates because the remainder in each step is strictly smaller than the previous divisor. Since the second argument is a nonnegative integer that decreases with each step, it must eventually reach zero.
Conditions: The algorithm operates on nonnegative integers.; Each step replaces the pair with .; The remainder is strictly less than when .