Thursday, October 30, 2008

Assignment #2 and beginning of Loop Invariant

Assignment 2 was due this Monday,and boy was it ever challenging.The question about the recursive formula for the number of ternary trees took me for ever to figure out,however by a combination of knowledge from STA247(at last some use from the course),and help from the T.A's at the aid center,We were able to finish it quite satisfactorily.Otherwise,in lecture this week,we began talking about loop-invariants,which are sort of relational tools in that they help you more fully understand the functioning of a particular loop.Personally,i am finding them a little bit strange to deal with right now,but i guess in due course,i will grow to understand them.

Tuesday, October 21, 2008

Midterm and introduction to correctness of a program

 The midterm was quite good,however i screwed up royally on one of the questions,while doing quite well on the remaining two.An overall estimation of my performance was that i knew what i was doing for the most part,i just did not follow through.hopefully,this will enable me to do better on the 2nd test.We began doing the correctness of a program this week,which was confined to two important properties,the precondtion which states what sort of input is needed for the program to be 'correct',and the postcondition,which states what sort of output stipulates a 'correct'program.Very interesting stuff.The other order of buisness is Assignment 2.Having done exceptionally well on A1, i now have to emulate the standard i have set myself on this assignment.

Monday, October 6, 2008

Recursion and Introduction to Closed Form.

Now into weeks 4/5, We have began discussing recursion, which i was first exposed to in CSC148 last year, and actually did not have too difficult a time understanding (barring the Huffman Code incident).We began unwinding some sample recursive functions and a sorting algorithm Binary Sort, (i.e simplifying each run of the code into a recursive call),Then coming up with an inductive proof to substantiate our claims.Our first midterm is this Friday, and i am not as nervous as i normally am come midterm season ,because of the methodical strategy i have adapted this year with regards to the material covered in class as well as the assignments/problem sets.Finally, we began closed forms today, which in essence relates a recursive function to a closed(i.e some sort of power or simpler) definition and use induction yet again.Good luck on the midterm everyone:)