Answered step by step
Verified Expert Solution
Link Copied!

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.image text in transcribed

(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 EGCD

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sybase Database Administrators Handbook

Authors: Brian Hitchcock

1st Edition

0133574776, 978-0133574777

More Books

Students also viewed these Databases questions

Question

Given that z = x + iy, find (a) Re () (b) Re ()

Answered: 1 week ago

Question

118. If X is uniformly distributed on [1, 1], find the pdf of .

Answered: 1 week ago

Question

a neglect of quality in relationship to international competitors;

Answered: 1 week ago