Abstract Algebra: Theory and Applications · Problem 2.5.3

Groups — Thomas Judson

Mathematics — Abstract Algebra · euclidean-algorithm-programming

Problem

Write a computer program that will implement the Euclidean algorithm. The program should accept two positive integers aa and bb as input and should output gcd⁡(a,b)\gcd(a,b) as well as integers rr and ss such that gcd⁡(a,b)=ra+sb.\gcd(a,b) = ra + sb.

Related theory

Browse the problem library