Search This Blog

Sunday, November 9, 2014

Week 8 & 9: Proving negation, Algorithm Analysis(2)

We've been taught about algorithm analysis for about 2 weeks now.(oh my Big O! *face-palm*) I honestly had no idea what we were doing for a couple of lectures at the beginning of this. I guess, I wasn't connecting the proofs of big O, etc to the algorithm that we analyzed on the first day of algorithm analysis. I had lost during that time, because I didn't know from where the big O and all the proving stuff came out all of sudden.

After the time of chaos in my head, after the tutorial time and reviewing the material, something clicked and I finally made 'Ah!' sound.

The start is find out the what the given code means. Once I understand the code, count the number of execution of each line of codes. If it is not easy to generalize at once, start from the small number and see how many times each line is executed and do this for several times. Then generalize from the results. (While I'm practicing this with tutorial problem and lecture material, I got little confused at some point and lost the track of count......means that I forgot if I count this line at that point already or if I'm about to count.....duh...)

Proving still feels difficult for me. At this point, the proof style requires that we choose any existential and make the given equation simpler format(like finding bigger possible number, etc). I definitely need more practice on this. When Danny is doing this together in the lecture, I can follow what we are doing, but I am not confident to do this all by myself from the beginning. I know only the practice makes it perfect, so I guess that's what I will do and hopefully, by next week, I can understand this fully and write the proofs fairly well.

No comments:

Post a Comment