On this week's class, we had covered the correctness of algorithm. Two examples were shown; recursive binary search, and greatest common divisor. In the recBinSearch, by using the condition variables in the code, we had set up P(n) statement and we proved that precondition implies to postcondition and we did the same with great common divisor.
Problem Set #4 was not hard, I needed to review an examples from the lecture notes and just little time to think about its application to the question then I could get the proof that the precondition implies to the postconditon.
Sunday, November 30, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment