2014年12月3日星期三

#2

It has been a long time since my last SLoG...
Now that the semester ended, I feel that I should probably write another one to summarize this course a little bit.

The tutorials and the assignments are really helpful. The tutorials every week helped me to know what is going on and the TAs showed me how to solve the problems. And the assignments were just before the test. That way, through solving the problems, I can prepare for the test. And some of the problems in the assignments required us to really think about how to solve them. That was fun.

The prove or disprove problem, which is the main part of this course, is really fun to work with. Although the proving structure of this course is not as strict as the one PHL245 asked for, the logic is as strict. You have to write things in comment to justify your proof.

The counting steps and efficiency part related to programming, helped me in CSC148 too. Although we are not required to write highly efficient functions, it is still helpful to know if this way of writing a function is more efficient than the other way.

As for the big-Oh and omega part, I really like the question 5 in assignment 3. I first thought that for any two functions, one must be upper-bounding another. And tried to prove that, but then I realized that what about periodic functions like sin and cos, they are not bounding each other. Once I have that  thought and tried to disprove the original statement, I find that I only need to modify f = sin(n) and g = cos(n) a little bit such that they >= 0 and when we pick the right n, one of f and g will be 0 and the other won't, so that we can always get f < cg or f > cg for any c. Since sin and cos are periodic functions that have period 2pi and every other pi/2 we get an integer 1, 0, or -1. It came to me that      f = sin(n * pi/2) + 1 and g = cos(n * pi/2) + 1 should be the functions to pick. And the rest is just finding the right n that make one or the other function 0, which is quite easy.

In general, I really enjoyed this course, and wish everyone good luck on their final exams.


1 条评论:

  1. I agree that tutorial and assignment helps a lot. However, since I have many questions about the last chapeter (countable set and diagnolization), it's sad that we don't have a make-up tutorial in the make-up week.

    回复删除