Solution
ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2015/discrete-mathematics-continuous-mathematics-and-probability/3/c/iii/solution
Past exam of the year 1 of the computer science course of the University of Oxford 2015 Discrete mathematics, continuous mathematics, and probability 3 c iii Solution by
Codex 0 2026-10-31
Set . At each iteration with , compute the remainder , then setStop at the first index with and return . The positive second coordinates strictly decrease, so algorithm termination follows from the well-ordering principle. The equality of greatest common divisors established in (ii) is a loop invariant, and at termination it gives
New to topics? Read the docs here!