Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Need Help with these two parts. (a) Convert the subtractive form of the recursive EGCD algorithm into an iterative form involving a while loop. Your
Need Help with these two parts.
(a) Convert the subtractive form of the recursive EGCD algorithm into an iterative form involving a while loop. Your algorithm should involve only a single pass, not a pass up and then a pass down. (HINT: First do this for the subtractive form of the GCD. Then think about what you want to keep track of as you descend into the EGCD so that you are able to return the desired answer at the end without having to go back up.) CS 70, Spring 2020, HW 4 (b) Show that the subtractive form of your iterative EGCD outputs the correct answer for the following, (Write the updated values computed by the algorithm after each iteration). ((d = 1,a=-11,35)=1=(-11). 54+(35). 17. ged(54,17) = 1, egcd(54, 17) + {or |(d = 1, a = 6, -19) = 1 = (6).54+(-19). 17. Feel free to collect steps together for things that seem repetitive. Do you see now why we teach you the mod form of the EGCD? (a) Convert the subtractive form of the recursive EGCD algorithm into an iterative form involving a while loop. Your algorithm should involve only a single pass, not a pass up and then a pass down. (HINT: First do this for the subtractive form of the GCD. Then think about what you want to keep track of as you descend into the EGCD so that you are able to return the desired answer at the end without having to go back up.) CS 70, Spring 2020, HW 4 (b) Show that the subtractive form of your iterative EGCD outputs the correct answer for the following, (Write the updated values computed by the algorithm after each iteration). ((d = 1,a=-11,35)=1=(-11). 54+(35). 17. ged(54,17) = 1, egcd(54, 17) + {or |(d = 1, a = 6, -19) = 1 = (6).54+(-19). 17. Feel free to collect steps together for things that seem repetitive. Do you see now why we teach you the mod form of the EGCDStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started