Exercise · ZW-EXTENDED-EUCLIDEAN-ALGORITHM-007 · ★★☆ Intermediate
With \(a=35\) and \(b=15\), the algorithm gives \(\gcd=5\). Which is a valid pair \((x,y)\) with \(35x+15y=5\)?
Choose one option.
Show answer
- B. \((1,-2)\)
Exercise · ZW-EXTENDED-EUCLIDEAN-ALGORITHM-007 · ★★☆ Intermediate
Choose one option.
We have \(35-2\cdot 15=5\), so \((1,-2)\) works. The option \((2,-4)\) gives \(70-60=10\), which is not 5.
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-006 ZW-EXTENDED-EUCLIDEAN-ALGORITHM-008 →