Week Eight

Iterative program correctness requires a bit more work than recursive correctness. Although a bit trickier, I still prefer this over recurrences and time complexity. The lectures this week were pretty interesting. I am finding myself having trouble determining loop invariants, however. I tried reading the book, and even it says that determining these things just requires practice and thinking. There is no mechanical way of finding it unfortunately :( Also, I am not looking forward to proving iterative correctness on tests. After the double loop example we did in class, I can easily see myself rushing to write out a proof as there are so many steps. Hmm. I can't believe everything we've been doing so far involves induction. I knew we were going to work with induction, but I didn't realize that pretty much our entire course is based on it. 


Anyway, I am still trying to let this material settle in. Some more practice problems with proving loops would be great. I was actually hoping there would be a problem set question dealing with iterative program correctness, but we have a test instead. In fact, I can probably expect an iterative correctness question on the test. Well, I guess it's up to me to force myself to do or at least look at some problems... I seriously need more self-control =_=

I decided to work with a partner for A2. For me personally, I think I should have worked on it alone. Although we discussed together how to approach and do the problems, we ended up finishing 2 problems each to save time. This was a real disadvantage because I didn't get to practice writing up half the problems. A2 went alright in the end. It was pretty much a recap of everything we've done so far. We were stuck on Q1 for the longest time, however. I drew A LOT of ternary trees. Haha.. oh well. We got (most of) it in the end. Because we were focussing on Q1 for so long, we overlooked and didn't check our answers for the rest of the questions, and that's where we lost the rest of our marks.

0 comments: