Friday 26 September 2014

Week 3

An interesting topic we learned about this week was vacuous truths. This says that in an implication, if the antecedent is false, the implication is always true, regardless if the consequent is true or not. This was not intuitive to me and took me some time to understand. One example I thought explained it well is from Wikipedia: "For example, the statement "all cell phones in the room are turned off" may be true simply because there are no cell phones in the room. In this case, the statement "all cell phones in the room are turned on" would also be true, and vacuously so, as would the conjunction of the two: "all cell phones in the room are turned on and turned off"."

This week's tutorial exercise was much more difficult than last week's. The last questions in question 1 were especially tricky and took me a little thinking to fully understand, but the tutorial sessions definitely helped me clarify the problems I had. I had an easier time understanding question 2 after I came up with examples and checked to see if the examples worked in each direction. Thankfully, the quiz was much easier than expected, but I will have to do more practice problems like this in preparation for the midterm.

We had an interesting class on Friday. Instead of having a normal lecture, we were given an activity to do. The problem was to try and predict the sequence of ups and downs for a given number of times you fold a strip of paper in half. The problem can be solved by looking at the pattern using the first few folds. Using D for down and U for up.


Folds Sequence
1 D
2 UDD
3 UUDDUDD
4 UUDUUDDDUUDDUDD

The formula for this sequence would be to first take the previous sequence and mirror and flip it (the sequence backwards and D's become U's and vice-versa) and then append a 'D', and then append the previous sequence to the end. This could be done using recursion and I plan to implement it in Python when I have time.

We also received the first assignment this week. I managed to finish a majority of it without much trouble. I look forward to brushing up my Latex skills in order to format this thing correctly. Thanks for reading.

Thursday 18 September 2014

Week 1 & 2

This is the start of my SLOG to record my experiences in CSC165. This is also my first time writing a blog post.

It has only been two weeks since school started but I have gotten into school-mode faster than expected. Hopefully I will be able to keep up my study habits throughout the year and handle all of my courses.

In terms of CSC165, we've learned about things such as universal and existential claims. We also learned how to solve mathematical problems by following George Polya's four steps and were also given some puzzles to solve. The material has not been very difficult so far but interesting nonetheless. I am looking forward to learning about proofs and program run times. Something new I learned this week was set and list comprehension in Python. It is a very useful and concise way to generate sets in a single line while also being readable at the same time. For example, the following code returns the set of numbers in set S that are even:
 S = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}  
 {x for x in S if x % 2 == 0}
We also had our first tutorial and quiz this week which went well. The TA took up the problems on the problem set and helped clarify some of the problems I had. The quiz was very similar to the problems from the homework and I look forward to these tutorials in the future. Also, tutorials end 30 minutes early so that was a pleasant surprise.

I was looking through some of the SLOGs from my classmates and one that I found interesting was here: http://fmello.com/Blog/csc-165-slog-wk1. He provides a table with the definitions and examples for a few of the mathematical symbols we will be using in this course like the quantifiers and operators. This blog is also very nice to look at and designed very well and responsive, so hats off to whoever it is that wrote that blog!

I hope to benefit from writing these logs and maybe it will even inspire me to create a personal blog of my own.