(Solved) : 5 5 Marks Prove Algorithm 5 Satisfies Termination Property Assume Proof Loop Invariant Tru Q44132835 . . .
5. 5 marks Prove that Algorithm 5 below satisfies the Termination property. You should assume (with- out proof) that the loop invariant is true each time the loop condition is checked. Algorithm 5 1: //LoopInv: (x,y e Z) ^ (x,y > 0) A (x is even) 2: while I 70 do 3: if y> 1 then 1: yy-1 2+ 1+2 else II – 2 8: end if 9: end while Show transcribed image text 5. 5 marks Prove that Algorithm 5 below satisfies the Termination property. You should assume (with- out proof) that the loop invariant is true each time the loop condition is checked. Algorithm 5 1: //LoopInv: (x,y e Z) ^ (x,y > 0) A (x is even) 2: while I 70 do 3: if y> 1 then 1: yy-1 2+ 1+2 else II – 2 8: end if 9: end while
Expert Answer
Answer to 5. 5 marks Prove that Algorithm 5 below satisfies the Termination property. You should assume (with- out proof) that the…
OR