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.


2014年9月17日星期三

#1

Last week and this week in CSC165 classes, we discussed about precise expressions, problem solving, quantifiers, some symbols, implications, and logical connectives.

The problem solving part was really interesting with the streetcar drama. The thought process, in which we figured out that there had to be two or more combinations that had the same sum since knowing the sum wasn't enough and there should be a pair of twins since knowing there is only one eldest child revealed the answer, is quite exciting to me. It's like one of those fun logic puzzles that I loved to do as a child. Whenever I solved the puzzle, it's like my brain got its food. So I went home and figured out the solution to be 2 2 9.

The ideas of quantifiers, which set properties and connect properties of elements to properties of sets, and how to evaluate them, verifying and falsifying universal and existential claims, were new to me. But this part was also very intuitive and self-explanatory. So it's not hard to grasp the concept.

As for the second week's contents, since I'm taking PHL245 simultaneously, it feels kinda like Deja Vu when my mind wandered a little bit in class. Now I think I know why our PHL245 prof asked us if some of us were from computer science and heard that PHL245 was an easy A. At least for the logic part, both the courses covered concepts like antecedent and consequent, negation and contrapositive, if, only if, necessary and sufficient. Some of the symbols were different though.

Since it is logic, for the most part it is intuitive, we just need to think it through. For example, if P is necessary for Q, then, if you have Q, you must have P, since without P, you won't get Q. Therefore, Q is the antecedent and P would be the consequent. That's just one of the easy examples. I did enjoyed the time when we had to figure out what the correct logic relationships were and express them symbolically for some tricky implications.

Mmm...

The tutorial was fun. Our TA even prepared treats for us :)

Anyway, the bottom line is:
        Go Take PHL245 if you are looking for some courses in BR2  o(* ̄▽ ̄*)o