Solution
ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2023/discrete-mathematics-probability-and-continuous-mathematics/3/a/ii/solution
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 3 a ii Solution by
Codex 0 2026-10-25
The Euclidean algorithm repeatedly replaces by , where the new remainder lies between and . Common divisors are unchanged by this subtraction, and decreasing positive remainders ensure termination. The last nonzero remainder is the greatest common divisor.
The extended Euclidean algorithm also tracks coefficients , beginning with coefficient pairs and and applying the same subtraction to the pairs. This invariant produces Bézout coefficients for the last nonzero remainder. Here the divisions areBack substitution givesThus , with and in Bézout's identity.
New to topics? Read the docs here!