Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Show that if a b > 0, then the values s and t computed by ExtEuclid(a, b) satisfy |s| b/d and |t| a/d. Hint: prove
Show that if a b > 0, then the values s and t computed by ExtEuclid(a, b) satisfy |s| b/d and |t| a/d. Hint: prove by induction on bbe careful, you have to stop the induction before b gets to zero, so the last step to consider is when b | a.
ExtEuclid(a, b): On input a, b, where a and b are integers such that a b 0, compute (d, s, t), where d = gcd(a, b) and s and t are integers such that as + bt = d, as follows:
if b = 0 then d a,
s 1, t 0
else
q [a/b], r a mod b
(d, s' , t' ) ExtEuclid(b, r)
s t' , t s' qt'
return (d, s, t)
Algorithm ExtEuclid(a, b): On input a, b, where a and b are integers such that a 2b20, compute (d, s, t), where d- gcd(a, b) and s and t are integers such that as +bt-d, as follows: if b 0 then da, s
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started