Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions