Sunday, October 26, 2008

Program Correctness and induction

Program correctness sounds fun, given a precondition and post condition, you try to hack your way to break the program, what makes a program correct? or it works?, personally, i think when some one says "yay it worked" means given a correct input, it spits out the correct output, but i personally don't believe programs to "work" 100% correctly, but hey only precondition and post conditions needs to be satisfied ;)

even if i code a program, i don't think it'll work 100% correct, i'm sure someone will be able to hack or break apart my program, but hey, if it satisfies what the assignment was required, why do extra work? (and i'm lazy to find all cases, but i do have to do that for 207 otherwise i won't be having a good mark for test cases! ;( ) (speaking of hacking, that reminds me of the movie "Live Free or Die Hard" hehe where hackers were able to hack into FBI network(talk about something important as that..) or the national database.. (i sure hope it doesn't happen here! or there goes all my money)

the last couple of lectures certainly improved my understanding of induction, not just the simple "you have T(n) and prove T(n+1) thing", but allowed me to understand that we make a claim, assume something, then using that hypothesis, prove what we want to prove, which is not limited to just the "n+1" case, such as proving T(n) >= logn or G(n) <= F(n) as the question in the assignment.

o well now that i have the assignment and problem set out of the way, onward to study for midterms and finish other assignments :(

No comments: