Need help from an expert?
The world’s top online tutoring provider trusted by students, parents, and schools globally.
The Extended Euclidean Algorithm is a method for finding the greatest common divisor of two integers.
The Extended Euclidean Algorithm is an extension of the Euclidean Algorithm, which is used to find the greatest common divisor (GCD) of two integers. The algorithm works by repeatedly dividing the larger number by the smaller number and taking the remainder until the remainder is zero. The last non-zero remainder is the GCD of the two numbers.
The Extended Euclidean Algorithm not only finds the GCD of two integers, but also finds the coefficients of Bézout's identity, which are integers x and y such that ax + by = gcd(a,b). These coefficients can be used to solve linear Diophantine equations, which are equations of the form ax + by = c, where a, b, and c are integers.
To use the Extended Euclidean Algorithm, we start by applying the Euclidean Algorithm to the two integers a and b. We write the remainders as a linear combination of a and b, and then use these equations to eliminate the remainders until we get a linear combination of a and b that equals the GCD. We then solve for the coefficients x and y using back substitution.
For example, let's find the GCD of 54 and 24 using the Extended Euclidean Algorithm:
54 = 2(24) + 6
24 = 4(6) + 0
The last non-zero remainder is 6, so gcd(54,24) = 6. To find the coefficients x and y, we work backwards:
6 = 54 - 2(24)
6 = 54 - 2(54 - 2(24))
6 = 3(54) - 6(24)
Therefore, the coefficients of Bézout's identity are x = 3 and y = -6.
Study and Practice for Free
Trusted by 100,000+ Students Worldwide
Achieve Top Grades in your Exams with our Free Resources.
Practice Questions, Study Notes, and Past Exam Papers for all Subjects!
The world’s top online tutoring provider trusted by students, parents, and schools globally.