Tuesday, December 2, 2014

SLOG Post 9 - Last week of class

Last week of class! Can't believe I'm already here; my first semester is almost over! Last week I focused on reviewing class material in order to prepare for the final exam. Basically, everything we have done is preparation for the final. Without a doubt CSC165 presented the challenges I was expecting. Looking back at the first weeks of class I thought I was not going to like this course but in all honesty I have enjoyed this course. Now it is time to show what I have learnt and try to do my best in the final exam. I will go over past exams and assignments in order to prepare for it as much as I can. I missed a couple of slog posts at the beginning of the year as I was having trouble with time management. However, I tried to make up for it and I hope that doesn't affect my overall mark. Lesson learnt!

Assignment 3 was fairly straight forward although a couple of questions did required a bit of intensive thinking in other to work out the logic. I feel confident about doing proofs with the big oh/omega/theta. However, the more practice the better.

Overall I think this course has being a positive experience and I have learnt more essential skills that will be required in university (time management, etc). I'm looking forward to next semester and I wish everyone good luck!

Tip for next year students: keep up with your work and regular practice problems, you will need it for this course.

Sunday, November 30, 2014

SLOG Post 8 - Problem Solving

Last week we were given a problem about diagonals and I have used the "How to Solve it" steps to approach the problem and try to solve it.

1. Understanding the problem


  • We are given a rectangle/square of n m rows and columns respectively, and we draw a diagonal line from one corner to the other. We need to find how many grid squares the line passes through.
  • We need to account for special cases such as when n or m are odd or even.
2. Devising a Plan
  • Given the example, it seems that we could work out some sort of a pattern.
  • My firsts thoughts guide me to create a table and record down different numbers of rows and columns to see if there is similarity between the values in terms of n and m.
  • After evaluating the data I would see if we could get a formula that would satisfy both n and m on all occasions.
  • I would sketch some visual representations to see if the formula works correctly.
3. Carrying out the plan
  • The first thing we can obtain from the table is that when both n and m are the same, the number of squares.
  • There is an obvious pattern going on but at first I couldn't seem to be able to generate a formula for it. However, after a bit of thinking I solved it. It used something that I haven't seen since elementary school (I don't recall using it after); finding the highest common factor. However, I ended up with 2 formulas and couldn't find a way to join them. Here they are:
    • When there is a highest common factor between m and n, the formula for the total number of grid squares crossed by the line is m + n - the highest common factor. Lets take m = 4 and n = 8 for example. Total number of squares would be 8 + 4 - 4 which equals 8
    • When there is not a highest common factor, the total number of squares is m + n - 1. m = 4 n = 5. Total number of squares 4 + 5 - 1 = 8 total squares; matches the table.
4. Looking Back
  • I wasn't expecting the problem to take 2 different formulas to solve and I took a bit of extra thinking as I was trying to solve it all using one formula.

Friday, November 28, 2014

SLOG Post 7 - Computability and close to the end

This week we covered more about computability. As this is more Python involved it is easier to understand as I have a strong programming background. Following function logic is something I can do without problems. I also did some review myself and worked on the assignment as preparation for the exam. I'm doing all the practice problems I can in order to be ready for the final exam. I think my semester was average at best but I hope I can go and give my best on that final exam.

Friday, November 21, 2014

SLOG Post 6 - Halt

Halt.

Now here is a topic that required a bit of thinking. This class we talked about halt and computability. After the necessary thinking we just come up with the conclusion that halt cannot exist as its proof show it is just a mere contradiction.

When a program halts it doesn't and we it doesn't it does.

Just thinking about it makes me question the origin of the universe. But back to the topic, thing is that we can use the uncomputability of halt to proof that other functions are not computable using reduction. If function F reduces to G, then F being not computable implies that G is not computable. It is just a thing of reducing the function you want to proof and implementing it into halt.

Friday, November 14, 2014

SLOG Post 5 - big-Omega/Theta

This week we were introduced to the big-Omega and big-Theta; concepts with very familiar definitions if you understood the definition of big-Oh. I am really enjoying this topic as with practice I finally managed to understand the definition of big-Oh. Proofs using big-Oh, Omega, and Theta seem fairly straight; at least I understand them better than regular proofs that involved limits or some sort. However, there was something that I found challenging this week and this is limits as you would have probably guessed from my last sentence. For some reason, I can't seem to comprehend what the definition of a limit is when it is explained with logical symbols but I know what a limit is and I can show my understanding of it using English. I don't really know how to explain it. Assignment and test went OK this week. I could have done better but I didn't; I blame myself for that.

Thursday, November 6, 2014

SLOG Post 4 - Formal Big-Oh

This week they formally introduced the Big-Oh to us and we did some proofs about O(n^2). I have written before that doing proofs is not one of my strengths but I will try everything I can to understand the concept of the big-oh. Once I have interest in something it captivates my thoughts until I understand it completely. It is like - "You need to know the answer (or in this case, how to work around the big-oh to do proofs)". I have a feeling I did average on the midterm but luckily the assignment 2 questions  helped when it came to do proofs for the mid term. Guess I will need to keep working on my proofs. Intriguing but certainly hard.

Tuesday, October 21, 2014

SLOG Post 3 - Big-Oh

As I predicted on my last post, proofs were going to be the hardest part of this course. However, I have come to understand the majority of it thanks to enough practice and the assignments. Certainly it is something I need to keep working on. This week they introduced to us the Big-Oh, something that was briefly mentioned in my 148 class and left me intrigued. I've always been interested on how computing is done and how machines work with our "input". The introduction was brief and I look forward to learning more about the topic.