An alternative to the Euclidean algorithm uses subtraction rather than division to compute greatest common divisors. (After all, division is repeated subtraction.) It is based on the following lemma:
Lemma 4.8.3
If a ≥ b > 0, then gcd(a, b) = gcd(b, a − b).
a. Prove Lemma 4.8.3.
b. Trace the execution of Algorithm 4.8.3 for A = 630 and B = 336.
c. Trace the execution of Algorithm 4.8.3 for A = 768 and B = 348.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.