Saturday, October 4, 2008

Recu[recu[recu[recu...

The recursion lectures were pretty straightforward for the most part since I think everyone in CSC236 would have some sort of programming experience with recursion meaning the concept is very simple. Proving recursion is very natural with induction and since CSC165 and the beginning of CSC236 spent plenty of time dealing with that, that wasn't very difficult either.

However some parts were quite confusing. The first part was the number of binary strings without pairs of 0's. ?It was fine until the "the only way to add a 0 without changing anything is the 10" part. So ending in "x1" and "10" was taken care of, what about "00"? Don't we need to count that? Now that I think about it it's pretty obvious that strings ending in "00" have a pair of 0's in them but for some reason I kept thinking the question was binary strings with pairs of 0's instead of without so I was confused for awhile until I kept scribbling at my own piece of paper to figure it out. I felt that Prof. Heap could have spent some more time on explaining that part since it was the crux of the algorithm. I should have just asked but there exists the fear of the stigma of appearing foolish.

The second part was the complexity of binary search example. Part of the confusion came from the fact that I forgot all about big-O and its friends over the summer. I recall Prof. Heap giving a brief review but it was much too brief. Luckily big-O crawled out from the corners of my brain rather quickly. But then came the part with the proof. The massive amount of marks on the slide in conjunction to the calculations errors just left me dazed. Of course I did not know they were errors and assumed that I was missing something so I was frantically trying to find out what I had missed. The whole structure of the presentation of that part was very messy and confusing because of the erasing of parts. Eventually Prof. Heap realized the errors and everything went back to fine and dandy but the whole ordeal just burnt my tiny brain to a crisp. Eventually after staring at it for a bit though, I got it.

1 comment:

Danny Heap said...

You're afraid of feeling foolish? What about the guy at the front erasing the errors. Nothing ventured, nothing gained.