Sunday, November 30, 2014

Twelfth Week: The Last Week

This week was the last week of classes (almost, there is one more lecture next week officially), but we pretty much finished all the material that will be covered this year anyway. These past two lectures Danny introduced to us several different concepts, but first he allowed us to understand the halting problem better by using other problems and extending them to the Halt one. He also used the process called diagonalization to show how some problems can't be solved.

As well, we started to learn induction. I have already solved many problems using induction, so I have got a lot of experience, but Danny's method was different, using conditionals and statements involving logic. I have understood induction much better because of this.

Finally on Friday we had another problem to solve - Diagonals Counting. We were supposed to draw a line from the upper left to the lower right corner of a m by n rectangular grid (the diagonal). Then we were supposed to understand through how many of the grid squares the line will pass. The picture below shows a 4 by 6 grid where the diagonal passes through 8 squares.



The base cases were easy to come up with - given input D(m,n), where D outputs the number of squares that diagonal passes through, we note that D(m,n) = D(n,m). This is seen clearly if we simply rotate the paper.

Next, if m = 1, then D(m,n) = n (switch if n = 1)
Then if there is a common factor between m and n, we have to factor it out: D(m,n) = c * D(m/c, n/c) until the two values are either not co-factors or either m or n equals 1.
If there is no common factor, then D(m, n) = m + n - 1.

This was a pretty difficult but an amazing problem!

Saturday, November 22, 2014

Eleventh Week: The Short Week

This week was really short, with just two lectures held. The reason for this, as I think I have already mentioned in the previous posts, is the Reading Week. Not that I did that much reading over those two days, but it was a really welcome short break. Now with just one week to go, I am feeling a lot fresher and readier for the soon upcoming exam.

Meanwhile, this week Danny has been going over the halting problem, proved by the famous Alan Turing way back in 1936. It was quite easy to understand because it was easy for me to follow the steps of the proof by contradiction we derived in class. I will probably need a little more hands-on practice before I feel totally comfortable with this concept.

As well, the third assignment has been posted, and I believe it is a nice preview of what is going to be on the final exam. Finally, the CDF website is still down, so there is no way for me to figure out what my marks for my test 2 and assignment 2 are, which worries me a little.

Saturday, November 15, 2014

Tenth Week: Results

Well, we got our test 2 back, and I wasn't that satisfied with my mark. Turns out I did screw up some things that I should have been more careful about. However, on the bright side, I started to really get the Big-Oh and Big-Omega principles, since they are very similar to the proofs we have been doing for the past month, with just maybe a little more thinking involved.

As well, there is no tutorial this week, nor is there a lecture on Monday, due to the Reading Week, thanks to the gracious University of Toronto. But Danny and Larry made sure that we don't just waste our time by telling us that they'll post the third assignment over the weekends. I guess that this is a good thing because it will give me more free time to spend thinking over the problems stress-free, which is exactly how I prefer to complete my tasks.

Saturday, November 8, 2014

Ninth Week: The Second Test

This week went by pretty quickly, probably because I only had this course twice. On Wednesday, I had my second test for CSC165, and it was actually quite easy - just three proofs. Since we were told whether to prove or disprove each statement, I automatically wrote out the structures for each proof and then completed the in-between logic without much problems. Two of the questions were very similar to the ones we had to do for Assignment 2, which was due on Monday. As well, one of the proofs we did earlier in the course came in as a quite useful property, which was great because I put it down on my cheat sheet.

During the lectures, we have continued analyzing equations using Big-Oh and Big-Omega functions. They are becoming easier and easier to understand. I guess that practice does make perfect. Overall, I am really happy about the way the course goes.