Question: This exercise contains a while loop and a predicate. Prove that if the values of the variables in the predicate make the predicate true before

This exercise contains a while loop and a predicate. Prove that if the values of the variables in the predicate make the predicate true before entry to the loop, then after execution of the loop the new values of the variables also make the predicate true.
loop: while (m >=0 and m <=100)
m := m +1
end while
predicate:
2m <(m +2)!
Proof: Let mo denote the old value of m before each entry into the loop, and let mn denote the new value of m after each exit from the loop.
Suppose the predicate is true before entry to the loop.
Then

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!