Exercise · ZW-EUCLIDEAN-ALGORITHM-010 · ★★★ Advanced
Which pair does the first Euclidean step \((a,b)\to(b,\,a\bmod b)\) produce when applied to \((35,91)\)?
Choose one option.
Show answer
- B. (91, 35)
Exercise · ZW-EUCLIDEAN-ALGORITHM-010 · ★★★ Advanced
Choose one option.
Since \(35<91\), \(35\bmod91=35\); the pair becomes \((91,35)\): the step just swaps the numbers when \(a<b\).
The Euclidean algorithm computes the greatest common divisor of two integers \(a\) and \(b\) by dividing repeatedly, replacing each pair by the divisor and the remainder, until the remainder is 0.