Saturday, 30 November 2013

Week 10 & Week 11

In week 10, the university was closed Monday and Tuesday, and there was a term test on Wednesday, so we did not learn any new material this week. I found the term test was difficult: I feel that I need to practice more examples using recursion, as this is where my weakness was in the test.

In week 11, we covered how to go about hiding attributes in python and the built-in-function property (which uses a getter, setter, deleter, and docstring) used to give nuanced access (like making an attribute read-only). We also talked about equivalence and functions that reduce. I felt fairly confident about the material covered this week, although it might have helped if we were practiced these concepts in an exercise.

Wednesday, 13 November 2013

Week 8 & Week 9

In week 8, we covered binary search trees. These are binary trees that have a left node which contains  values smaller than the node, and a right node which contains values larger than the node. This is interesting because it makes searching the tree more easy since either the left or right subtree can be ignored based on the value which we are searching for. I felt fairly confident about binary search trees after learning about them. We also started to talk about running time analysis: big-oh. Big-oh is a way of describing an algorithm's performance: it is the algorithm's behaviour when given large input sizes.  Big-oh does not depend on the constant: for instance O(7lgn) and O(3lgn) are both described as having the algorithm O(lgn), because when given large input sizes, the effect of the constant (7 vs 3) is less. I also felt fairly confident about big-oh.

In week 9, we continued talking about big-oh. Big-oh is upper-bound and thus the algorithms in big-oh can be shown as subsets in a hierarchy. At around this time, we have also been learning about big-oh in CSC165, which made it easier to learn about. This week, we also covered selection sort, merge sort, and quick sort. I am a visual learner, and seeing Dr. Heap do the demonstrations of the sorts with the coffee cups helped me learn how each of these sorts work. We also performed running time analysis on these sorts. I felt fairly confident about the material covered this week as well.