# 001_Baddam_Krishna_Assignment_5 - CS536Homework#5...

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

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}

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

View Full Document
{ 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)
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}