![Discrete Mathematics With Applications](https://www.bartleby.com/isbn_cover_images/9780357035283/9780357035283_smallCoverImage.gif)
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.10.3
If
Algorithm 4.10.3 Computlng gcd's by Subtraction [Given two positive integers A and B, variables a and b are set equal to A and B. Then a repetitive process begins. If
After the last repetition,
Hence, after the last repetition,
Input: A, B [positive integers]
Algorithm Body:
while (
if
else
end while
if a = 0 then
else
[After execution of the if—then-else statement,
Output: gcd [a positive integer]
a. Prove Lemma 4.10.3.
b. Trace the execution of Algorithm 4.10.3 for
c. Trace the Execution of Algorithm 4.10.3 for
![Check Mark](/static/check-mark.png)
Want to see the full answer?
Check out a sample textbook solution![Blurred answer](/static/blurred-answer.jpg)
Chapter 4 Solutions
Discrete Mathematics With Applications
- Elements Of Modern AlgebraAlgebraISBN:9781285463230Author:Gilbert, Linda, JimmiePublisher:Cengage Learning,College AlgebraAlgebraISBN:9781305115545Author:James Stewart, Lothar Redlin, Saleem WatsonPublisher:Cengage LearningAlgebra & Trigonometry with Analytic GeometryAlgebraISBN:9781133382119Author:SwokowskiPublisher:Cengage
- College Algebra (MindTap Course List)AlgebraISBN:9781305652231Author:R. David Gustafson, Jeff HughesPublisher:Cengage LearningLinear Algebra: A Modern IntroductionAlgebraISBN:9781285463247Author:David PoolePublisher:Cengage Learning
![Text book image](https://www.bartleby.com/isbn_cover_images/9781285463230/9781285463230_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9781305115545/9781305115545_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9781305652231/9781305652231_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9781285463247/9781285463247_smallCoverImage.gif)