Question

a. Find gcd(31415, 14142) by applying Euclid’s algorithm. b. Estimate how many times faster it will...

a. Find gcd(31415, 14142) by applying Euclid’s algorithm.

b. Estimate how many times faster it will be to find gcd(31415, 14142) by Euclid’s algorithm compared with the algorithm based on checking consecutive integers from min{m, n}down to gcd(m, n).

0 0
Add a comment Improve this question Transcribed image text
Answer #1

ANS:- The bormula for compute gredest common dVIS a) ged (min) = gcd (nim mad n) "The ged (31415, 14142) by applying Euclid's algorthm 18 ged ( 31415, 14.1 42) = ged(14,142, 3,131) ged (3,131,1,618) -gedciG18.1513) ged ( 1,513, 105) ged (105, 43) ged (43119) - ged (19,5) ged c5,4) ged (411) %3D = 1. b) The no of comparison's on given mput with the algai thm checking consutive integers and Eucltas algorthm based on The no ot ciu Bions using Eudid's algorithm = 10 brom part caj The consueutive integen checesing algorithm 81 2 divislong fan iterations. The no-of terations = 14,142 and 14,142 2= number of divisions<=24 14

ANS:- The bormula for compute gredest common dVIS a) ged (min) = gcd (nim mad n) "The ged (31415, 14142) by applying Euclid's algorthm 18 ged ( 31415, 14.1 42) = ged(14,142, 3,131) ged (3,131,1,618) -gedciG18.1513) ged ( 1,513, 105) ged (105, 43) ged (43119) - ged (19,5) ged c5,4) ged (411) %3D = 1. b) The no of comparison's on given mput with the algai thm checking consutive integers and Eucltas algorthm based on The no ot ciu Bions using Eudid's algorithm = 10 brom part caj The consueutive integen checesing algorithm 81 2 divislong fan iterations. The no-of terations = 14,142 and 14,142 2= number of divisions<=24 14

18 faster by least Eucl'all's algorithm 8 at 14,142/10= 140o times. At mosf 2*14,142 2800 timos . 10

Add a comment
Know the answer?
Add Answer to:
a. Find gcd(31415, 14142) by applying Euclid’s algorithm. b. Estimate how many times faster it will...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT