Thursday, 21 February 2013

Proofs, not my cup of tea

The course have finally started gearing us towards proofs. Every class after the first midterm was so far about doing different proofs using different methods. I find that these lectures are much more engaging than the lectures before we started proofs, because the professor Heap always asked us to do the proofs on our own for a minute or so and compare them to our neighbors. I honestly love this style of teaching because it let me have time to digest the material without being pressured to take notes and it also gives me an excuse for me to talk to people that I always wanted to talk to but was too shy to!

Proofs are not so much about understanding the concept as it is coming up with ideas on the spot. It is true that proofs have a predefined structure that we must follow and how fluent one can build this structure depends on how much one practices. However, it also requires the proofer to be creative, because there are a lot things out there in the world that are not obvious to prove, like for example the geometric mean is always smaller than the arithmetic mean of two numbers.

At this point though, I am confused about why we are doing proofs in this course. I mean, it is certainly mathematical, but it doesn't have as much association to symbol as what we did before. I guess I will wait and see.

Tuesday, 12 February 2013

Latest test impression

Phew! Now that was what I call crunch time. For the past week or so I had at least 4 assignments due and 2 tests to study for, and I somehow managed to deliver a good job on all of them without becoming insane. Such is the life of a university student, especially in University of Toronto, where assignments and test come from left and right, and the only time for any students to catch a breath is during the reading week when there is no class.

Anyways, the most recent test for CSC165 was definitely the most unique test I have taken since entering university. All the students were cramped into this one medium sized class and we had to do the tests right next to each other. Had it not being for the fact that everybody got different versions of the test, I might not have being able to resist the temptation of cheating by looking over someone else's paper that was only 30cm away from mine.

In regards to the content of the test, I didn't find them to be difficult at all. The first set of questions were about analyzing a set of Python definitions and determining what their functions were and matching them to their symbolic equivalents. Although most students did well on this section, I used a different approach from most people in solving them. In case you don't know what I am talking about, here is the link to the version of the test that I had:

http://www.cdf.toronto.edu/~heap/165/W13/t1-solution.pdf

Although this is a logic course, I subconsciously used a programmer's point of view when solving the problem. For example, page 3 of the test could have being done without relying on symbols at all. They have provided all the necessary codes to determine whether the functions will return True or False. What I did was that I determined what the following List Comprehension will return: 

[P1(x) for x in L]

All I knew was that it returned a list with 6 boolean values, and among them there are Trues or Falses. Then the rest was just asking yourself whether there are any Trues or Falses in this list, or if there are no Trues or no Falses. The ladder step was just simple logic, and no symbolic understanding was needed.

Danny Heap's answer that is on the test solution is probably the "correct" way to think about the question in this course, because he converted every python code into their respective symbols, and solved the problem from a symbolist's point of view. For example he converted the P1, P2, and P3 definitions into an implication, and looked at the "set" of numbers provided and determined whether they were examples or counterexamples of "claims" made by Python definitions. I mean, he converted them into FRIGGIN SYMBOLS! I found that really cool because I never realized until now that you can interpret programming codes in such a way to make connections with logic.

I found that most people who took the test had trouble dealing with Section 2 of the test. But honestly, I wouldn't blame them for it. This exact question was introduced during the lecture, and the concept was difficult to understand as it is because there were just so many predicates and implications, that most people probably couldn't help but be confused when they were analyzing the statement. I was also one of those lost sheeps. When this example was introduced in lecture I thought that it was just a complicated example of how swapping the order of the predicates can have some effect on a statement, but I was wrong. The example illustrated a much deeper concept that I didn't realize I understood until I reviewed this example carefully. Let's say that C is a set of courses at U of T, and S is a set of students at U of T, and E(s, c) means s is enrolled in course c. Let's say you make the following statement:

For all s in S, there exists a c in C, that E(s, c)

What I initially thought what this statement meant was that there is a common course c, that all students in U of T take. I think most people would probably make the same mistake as mine. The correct way to interpret this statement is to think about a python code. If you write:

for s in S:
    if E(s, c)
         return True:

then you would notice that what the code is looking at each student in S individually, and then determining whether that student is taking a course. Most beginners would make the mistake of thinking that when the statement say "For all s in S", "s" is referring to all the students simultaneously. These two interpretations are different, because one would claim that all the students in U of T are taking a course, but the other one would claim that all the students in U of T are taking a common course. This exact same concept was applied in Section 2 of the test, and if you understood this then suddenly the question seemed ridiculously easy.

There was nothing else on the test that really caught my attention. From the answers that I saw that was posted by the professor, I think I have a chance of getting 100% on this test, if, and only if, the test markers can read my answers. Well let's hope for the best.