Exercise · ZW-EXTENDED-EUCLIDEAN-ALGORITHM-005 · ★☆☆ Basic

What is \(\gcd(240,46)\) according to the algorithm?

Choose one option.

Show answer
  • D. 2

Explanation

The last nonzero remainder of the process is 2, which is the greatest common divisor. The 10 appears as an intermediate remainder rather than the final result.

Study Elementary number theory in ZWMath →

Review the concept: Extended Euclidean algorithm

The extended Euclidean algorithm computes \(d=\gcd(a,b)\) and integers \(x\), \(y\) such that \(ax+by=d\). It is the Euclidean algorithm that also tracks the Bézout coefficients.

\[r_k=r_{k-2}-q_{k-1}r_{k-1}\\s_k=s_{k-2}-q_{k-1}s_{k-1}\\t_k=t_{k-2}-q_{k-1}t_{k-1}\]

More practice problems: extended euclidean algorithm

← ZW-EXTENDED-EUCLIDEAN-ALGORITHM-004 ZW-EXTENDED-EUCLIDEAN-ALGORITHM-006 →