This preview shows page 1. Sign up to view the full content.
Unformatted text preview: b. wp(y:= x  y; x:= x + y, x y) = c. wp(y:= x  y; x:= x + y, x y) wp(y:= x  y; x:= x + y, x > y) = d. wp( i,m:= 0, b[0], 0 i n ( j 0 j<i: m=b[j])) = e. wp( t :=ni; if b[i]=0 z:=z+1 & b[i] 0 skip fi, t > ni1) 4. For the following: {n>0} i,y:= n, a n {0 i n y= ( j i j n: a j x ji )} do i>0 i:= i1; y:= y*x+a i od {y= ( j 0 j n: a j x j )} a. Give a bound function for this loop. b. Prove that the invariant holds before the loop begins. c. Prove that the invariant holds after an iteration given it hold before....
View
Full
Document
This note was uploaded on 11/30/2010 for the course CS 336 taught by Professor Myers during the Fall '08 term at University of Texas at Austin.
 Fall '08
 Myers

Click to edit the document details