Then use your algorithm on some nonobvious numbers

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ommon divisors of m and r. What does this mean if r = 0. Is the theorem still true? Conclude as a corollary: gcd(m,n) = gcd (m,r). Problem 9 4: Use the result of 9 ­3 for an algorithm to find the gcd of any two integers that does not require factoring them into prime factors. Then use your algorithm on some non ­obvious numbers, including some of at least 4 digits and preferably more. Hint 1: The first step is n = qm + r, with gcd(m,n) = gcd (m,r). The next step is m = q’r + r’. With gcd (m,r) = gcd (r, r’). Notice that the remainder is smaller at each step, so at some point it must...
View Full Document

Ask a homework question - tutors are online