Exercise · ZW-EXTENDED-EUCLIDEAN-ALGORITHM-006 · ★★☆ Intermediate
For \(a=30\) and \(b=12\), with \(6=30-2\cdot 12\), what value of \(y\) satisfies \(30x+12y=6\) with \(x=1\)?
Choose one option.
Show answer
- C. -2
Exercise · ZW-EXTENDED-EUCLIDEAN-ALGORITHM-006 · ★★☆ Intermediate
Choose one option.
From \(6=30-2\cdot 12\) one reads \(30\cdot 1+12\cdot(-2)=6\), so \(y=-2\). The value 2 comes from copying the quotient without the minus sign.
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.
← ZW-EXTENDED-EUCLIDEAN-ALGORITHM-005 ZW-EXTENDED-EUCLIDEAN-ALGORITHM-007 →