The Euclidean algorithm has been known for over 2000 years and has always been a favorite among number theorists. After these many years, there is now a potential competitor, invented by J. Stein in...

1 answer below »

The Euclidean algorithm has been known for over 2000 years and has always been a favorite among number theorists. After these many years, there is now a potential competitor, invented by J. Stein in 1961. Stein’s algorithms is as follows. Determine


a. To get a feel for the two algorithms, compute gcd(2152, 764) using both the Euclidean and Stein’s algorithm.


b. What is the apparent advantage of Stein’s algorithm over the Euclidean algorithm?



Answered Same DayDec 24, 2021

Answer To: The Euclidean algorithm has been known for over 2000 years and has always been a favorite among...

David answered on Dec 24 2021
121 Votes
We can define the relationship as
a = n  a/n + (a mod n)
Thus, we can define the mod oper
ator as: a mod n = a – n  a/n
a. 5 mod 3 = 5 – 3 5/3 = 2
b. 5 mod –3 = 5 – (–3) 5/(–3) = –1
c. –5 mod 3 = –5 – 3 (–5)/3 = 1
d. –5 mod –3 = –5 – (–3) (–5)/(–3) = –2
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here