Exercise · ZW-EXTENDED-EUCLIDEAN-ALGORITHM-008 · ★★☆ Intermediate

For \(a=17\) and \(b=5\), what is the coefficient \(y\) in the identity \(17x+5y=1\)?

Choose one option.

Show answer
  • A. 7

Explanation

Since \(17=3\cdot 5+2\) and \(5=2\cdot 2+1\), one gets \(1=7\cdot 5-2\cdot 17\), so \(y=7\). The value 3 is the quotient of the first division.

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-007 ZW-EXTENDED-EUCLIDEAN-ALGORITHM-009 →