Sunday, 16 November 2014

Week 10

~~~~~~ WEEK 10~~~~~~

Today’s outline:
  • Big-Ω Proof
  • Prove big-Oh proofs for general functions
  •  Introduction to computability


We had to submit our second assignment this week. I found question 1.2 and 1.3 the hardest in the assignment. I got my test result back, I got 71%.

I was happy because we got to know next week we had no class but I was sad because the week after would be the last class with Larry Zhang. I will miss him.

We started the class by recapping the definitions of upper and lower bounds and big-Oh proof.  We did a proof of big-omega which I understood because I thoroughly went through it when we had our 10 minute break. We then looked at general statements about big-Oh and did a couple of proofs, this was a little confusing but I understood it after I read it at home.

We then started computability. It was the third hour and I was really sleepy so I did not understand what was happening during class. I tried understanding when I got home but I did not fully understand the concept of halt.


This week’s tutorial was easy and I managed to solve the quiz without a problem.

Sunday, 9 November 2014

Week 9 - Term Test 2

~~~~~~ WEEK 9~~~~~~

Today’s outline:
  •  Exercises of big-Oh proofs
  • Prove big-Oh using limit techniques


We had our second term test this week and I think I did okay. The second question was the hardest and I think I’ll lose most of my marks there.

We started the class by recapping the definition and doing a proof of big-Oh. The proof made absolutely no sense during class because I was simultaneously doing my CSC108 assignment. When I got home and tried doing the proof it still did not make sense to me because the powers of the numbers were increasing and decreasing. I went to the Larry’s office hours to understand the concept and I did. We then learned about disproving which I did not understand until I went home and reread it.

We then went onto limits and I was extremely exhausted because I just submitted my assignment and an hour ago gave the CSC165 exam. Nothing was making sense to me. I went home and understood the concept easily because we have done it in MAT137.

This week’s tutorial was about proofs. I understood everything and I can confidently attempt these types of questions.

Sunday, 2 November 2014

Week 8 - Penny Piles

~~~~~~WEEK 8~~~~~~

Today’s outline:
  • Formal definition of O, Ω
  • Worst-case analyses of two algorithms
  • Problem solving session


I completed the survey that was given to us and I feel the course has been very good so far. Thank God for the extended office hours because I used those for getting help on the second assignment.

We started off the class by recapping O(n2) then by learning the formal definition of O(n2). I understood the formal definition as it is very simple and straightforward. I think the biggest help in understanding it was the graph that was given to us and the chicken and turkey example. We then went on to learning about Ω(n2) which I did not understand at first. Fortunately the examples cleared up the misunderstanding.

We were then introduced to algorithms, the first one was, “insertion sort.” It took me a while to understand the code and finally understand it. We then went onto doing a code which involved maximum slice which would calculate the maximum difference between any numbers in the list in the correct order. The coding was hard to understand and I asked the professor questions and he helped me out and told me about them. I learned that we needed a loop guard for this function. I am taking CSC108 which helped me understand the coding behind this code. I don’t think I would have understood this function if I had not taken CSC108.

We were given a problem called, “Penny piles.” We were given two drawers and 64 coins in one of them and the other empty. We can only transfer money from one drawer to the other only if the initial drawer has an even number of coins in it. Our task was to find how many moves it took to get 48 coins in one drawer. Furthermore, we were asked to find numbers which could not be obtained. We used the method of tracing backwards and going to the number we want to achieve. Ex. I wanted 48 I started from 1 63 then 2 62, 4 60, 8 56, and finally 16 48. Our group did the same for each number we were trying to get. I used a similar technique to this but backwards: http://kevin-au-csc165.blogspot.ca/2014/12/week-7-worksheet-penny-piles.html

This week’s tutorial exercise was extremely helpful as it gave me an introduction to the definition of floor and proofs according to floors.


I have the assignment due next week along with 2 other major assignments and CSC165 mid-term which I have to study hard for this time around. I felt that the assignment should have been due on the 31 October because we would have completed the assignment before that day and our work would be done instead of all work in once place..

Sunday, 26 October 2014

Week 7

~~~~~~WEEK 7~~~~~~



Today’s outline:
  •  Proof by cases
  •  Review of proofs
  •  Algorithms


We started this class off by learning about proof by cases. I learned that we have to split our argument into different cases and prove the conclusion for each case. As always, a funny slide to lighten the mood:




We were then given a question involving constant ‘n’. We found the possible cases to prove the statement true and we showed its proof. I learned the proof after reading it a second time because it was all too much for one class. We did more examples and I got a better understanding of what we were doing. We then went onto learning about uniqueness. The concept of uniqueness was easy and simple. We learned about introduction and elimination which were easier than expected.

We then started learning about algorithms. We used the website http://www.sorting-algorithms.com/ to get a demo on algorithms. We observed that merge is faster than bubble and with larger input size, the advantage of merge over bubble becomes larger. When the professor was talking about running time I thought it was the time it took for the operation to finish, but it turned out it meant the steps that were taken by the algorithm. I also learned that the running time is independent of hardware on which we run the algorithm, it depends on the algorithm itself. After algorithms we learned about asymptotic notations which I did not understand so I was left confused until the end of the class. I will need to study this because we will be studying more about asymptotic notations for our next class.

I understood the linear search slides because I have used python visualizer in CSC108 which counts the number of steps taken for the code.

This week’s tutorial was a bit complicated but I managed to understand it by asking the TA questions and participating in class. I did the quiz well and manage to prove the statement. I received my marks from the past 2 weeks which were both 2/2.

Assignment 2 is out and I should get to it because I have a lot of due dates in that time. Must use my time efficiently.

Sunday, 19 October 2014

Week 6

~~~~~~ WEEK 6 ~~~~~~

Today's outline:

  • Proof about non-boolean functions
  • proof something false
  • proof about limits

I got 71% on my mid-term grade and I was disappointed at myself because I know I could have done a lot better. I need to spend more time on learning about CSC165 from now on. One thing that cheered up my mood was that we were told that we only have a 2 hour lecture.
We started the class off by learning about non-boolean functions. It is simple and straightforward. I know what boolean is used in CSC108.  Non-boolean functions are functions which return value is not True or False. For example sin(x) and x2.

We learned about floors. They are basically converting a number to an integer. It is exactly what the ‘int’ function in python does. Then we were taught about some proofs involving floors. I understood them once i read over them because I was a little confused during class. I love how the professor uses memes to indicate emotions. I told my friends in other classes that my professor uses memes and they all wanted to join my class all of a sudden.
We then learned about proving things false by disproving. How do we disprove statement S? Just prove ¬S.  We learned about sequences how to disprove them. The proper way to disprove a statement is:  
  • First make sure to negate it correctly
  • Then prove the negated statement
  • Draw examples to obtain intuition


We were shown invalid ways of proofs which were for humor purposes. After that we were introduced to limits. I have learned about limits in MAT137 so I have an idea about them and the epsilon-delta proof. I understood what was taught.


There was no tutorial this week.

Sunday, 12 October 2014

Week 5 - Term Test 1

~~~~~~WEEK 5~~~~~~

Today's outline:

  • proof using contrapositive
  • proof using contradiction
  • proof for existence 
  • proof about a sequence

We had our midterm exam this week. It was my first exam in UofT so I was nervous before the exam. The past exam that was given to us helped me out by getting some knowledge on what kind of questions come in the exam.  My test was okay because I know I got some of the answers wrong. I liked the “keep calm and carry on” right after the test. It made my day better.



It was the first time for me to study something new right after a test so I was very exhausted and tired. I was not fully attentive in class and ended up taking this picture:



We started the class off with learning about contrapositives and contradictions. I learned that contrapositives are a way or proving statements. Moreover, sometimes using the contrapositive to prove is easier than the normal way. I understood this concept but I think I should practice using this a bit more before I can fully understand it. We then went onto learning about contradiction and my mind was zoned out from then onwards. There were a lot of people talking around me and a person in front of me was playing online FIFA.

The tutorial this week was easy and I understood how to attempt proof questions. I think I did well on the quiz.


Looking forward to the long weekend!

Thursday, 9 October 2014

Week 4 - Folding Exercise


~~~~~~WEEK 4~~~~~~

Today's outline:

  • Bi-implications
  • Transitivity
  • Mix Quantifiers 
  • Proofs
  • Problem solving session


This week we started off class with practice questions to review the previous lecture. I found this helpful because it got me involved in class immediately and for me personally the best way I study is by being involved in class and it helps me staying awake and interested in class.

We started by learning about Bi-implications which I found easy to understand. The negation of bi-implication is a bit tricky but I managed to do it after I went over the notes. We then learned about transitivity. I found transitivity easy but it took me time to understand the Venn diagrams but I managed to understand them as well. We then learned about mixed quantifiers. It took time to understand but I managed to. I like the question because it was funny.




However I did not manage to understand the mathematical examples that were given to us because the professor was going too fast at the time. I learned about proofs and how they are important for science. As a future computer scientist I should believe nothing until it is proven. A proof is an argument that convinces someone who is logical, careful, and precise. We first understand why something is true, and then we use a proof to share our understanding with others, to save them time and effort. Proofs can only be made with understanding.


I liked the real life proof example because I think I can understand much more when it refers to English rather than symbolic language.

We then did a folding exercise to learn about problem solving. We were asked to fold a piece of paper in a certain way and count the bends and which direction they are in. We looked for patterns in bends to determine what could be the amount of bends for ‘n’ bends. This exercise was done in a group and the group idea was good because all of us helped each other out. We used ‘V’ and ‘ᴧ’ to represent the bends but I used binary codes to represent them because it was easier to read. We managed to figure out a solution for the pattern in the bends but we realized we wrote it all backwards but we still understood the concept.

The tutorial this week was easy and I managed to do the quiz without any problem. I had revised my laws from week 3’s lecture and managed to do both the quiz and the tutorial without any problem.  However, I did find the negation of “Every dog has its days, or perhaps its cat.” I found that tough and got help from a friend to help me understand.

I will look forward to attending office hours because there is a CSC165 Term test is next week.