Saturday, October 25, 2008

Week 7: It's going good

Midterms have been keeping me from focusing on CSC236 a lot, and now I think I'm in trouble since Assignment #2 is due Monday and I'm still unsure as to how I should explain everything. I guess it's going to be a long weekend of working on it.

I'm finding the stuff we're doing now more interesting, proving programs correct. This part of it seems like its much more relevant to computer science than the first bit was, but I suppose the initial inductive proofs were needed in order to be able to prove programs correct. I'd like to mention something about what was shown in Friday's lecture, mainly about the proof for the function egcd(n, m). Prof. Heap said that we would have to prove special cases separately, if n <= m. Well if n < m then n%m is simply n, so then egcd(m, n) is called. Now this is a state that matches the inductive hypothesis, since n < m, and then we know egcd(m,n) returns gcd(m,n) which is the same as gcd(n,m). The only special case would be for n=m.

I don't feel like I'm running into any problems in the course or having a hard time, so for the time being I don't have too much else to say.

No comments: