Question

A. Find gcd(213486, 5423) by applying Euclid’s algorithm. B. Estimate approximately how many times faster it...

A. Find gcd(213486, 5423) by applying Euclid’s algorithm. B. Estimate approximately how many times faster it will be to find gcd (213486, 5423) with the help of the Euclid's algorithm compared with the alroithm based on checking consecutive integers from min {m,n} down to gcd(m,n). You may only count the number of modulus divisions of the largest integer by different divisors.

Homework Answers

Answer #1

(A) .The gcd(213486, 5423) by applying Euclid’s algorithm:

(B). Lets compare the number of divisions the algorithms performs on the given input.

There are 8 divisions carried out by Euclid’s algorithm to find the gcd.

If we count the number of divisions required by the consecutive integer checking algorithm for 1 to 17; and after that 5423/17 = 319 consecutive integers. hence the total number of multiplications is 319.

Therefore, Euclid’s algorithm will be = 319 / 8 = 39.875 ≈ 40 times faster than by integer divisions.

Know the answer?
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
Similar Questions
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT