001_Baddam_Krishna_Assignment_5

001_Baddam_Krishna_Assignment_5 - CS536Homework#5...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
       CS536                    Homework #5  CWID:A20193023 1A. {a>0^ b>0} (x,y):=(a,b) {gcd(x,y):=gcd(a,b)^x>0^y>0} Loop select { gcd(x,y):=gcd(a,b)^x>0^y>0} x>y =>x:=x-y or y>x =>y:=y-x end loop select {gcd (x,x):=gcd(a,b)} {x=gcd(a,b)}                                          p=c_inv ^ t_inv Gcd := x {Gcd := gcd(a,b)} a) P is true before the loop a>0 ^b>0 =>wp((x,y :=a,b),     gcd(x,y):=gcd(a,b)^x>0^y>0 )    =>gcd(a,b)=gcd(a,b)a>0^b>0    =>true b) p is true inside the loop also   {p^Bi} Si{p} B1=x>y {gcd(x,y):=gcd(a,b)^x>0^y>0^x>y}   x:=x-y    { gcd(x,y):=gcd(a,b)^x>0^y>0}
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
{ gcd(x,y):=gcd(a,b)^x>0^y>0^x>y} =>{ gcd(x,y):=gcd(a,b)^x>0^y>0 } x x-y                                                  =>gcd(x-y,y):=gcd(a,b)^x-y>0^y>0           According to the definition of gcd  gcd(x-y,y)= gcd(x,y)
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

001_Baddam_Krishna_Assignment_5 - CS536Homework#5...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online