Friday, September 19, 2014

Week 1

    I've never had a real blog, nevertheless an academic one, so I suppose this is somewhat of a new experience for me. I expect this to be interesting and hopefully enjoyable since I do like writing. So anyways, welcome to my CSC165 SLOG! My first entry will be on Week 1 of the course.

    So right now, I can only remember a handful of the topics I learned last week from the lectures and course notes. These topics include sets, universal quantification, and existential quantification. Firstly, I had only touched upon sets a bit during high school, but I quickly understood the concept of sets, subsets and elements. But all of a sudden my lecturer, Danny Heap, pulled out functions like this:

def q2(S1, S2) :
''' (set, set) -> bool
Return whether ...
'''
return all({x in S2 for x in S1})

    Mind you, I hadn't learned functions yet in CSC108 so hopefully you can understand my confusion. He asked the class to write a comment for each function and I wrote nothing because I didn't know what the heck I was looking at. But thankfully I went home, went through my notes and Danny's annotations, and quickly understood what the terms "all", "not all", "not any", and "any" indicated In a function.

return all({x in S2 for x in S1}) means that every element of S1 is an element of S2.
return not all({x in S2 for x in S1}) means that some elements of S1 are not elements of S2.
return any({x in S2 for x in S1}) means that some elements of S1 are elements of S2.
return not any({x in S2 for x in S1}) means that no elements of S1 are elements of S2.

    It's actually very simple and straightforward. But then the Venn diagrams came...Typically, I am a decent visual learner, but I can't really grasp the reasoning behind putting an X and O in certain sections of a Venn diagram that represents the relationship between 2 sets. I suppose I will have to ask for help soon if I still can't figure it out.

    Next, I learned about universal and existential quantification. These were quite easy concepts to understand, although I understood them much more AFTER quiz 1 (which I found to be quite easy but knowing me, I probably made a careless mistake. I'll be waiting for my failing mark!). One of the main differences between the two is probably the symbols associated with each of them. Universally quantified statements can be expressed with the "for all" symbol which is the turned A, or ∀, and existentially-quantified statements can be expressed with the "there exists" symbol, ∃.
 
    In my notes, I defined the two quantification types as such:
UNIVERSAL QUANTIFICATION: a claim being made about all the objects being considered (i.e. in our "universe"). For example, "Every employee makes at least 30,000."

EXISTENTIAL QUANTIFICATION: a claim about the existence of one or more elements of a domain with some property. For example, "Some employees make at least 30,000." Here, I can see that not all elements are specified to have the same property because of the word "some".

    I know that if I were to disprove a universally-quantified statement, I would need only one counter-example, but if I were to prove it, I would need to consider every element in the domain or "universe". For an existential-quantified statement, it's vice versa. To prove it, I would need to provide only one example, but to disprove it I would need to show that every element is a counter-example. Hopefully, I don't get confused on a test! :(

    And on a side note, I like symbols so when I started seeing all of these foreign symbols in the course notes, they immediately peaked my interest. I'm still learning, but I think I already know the basics like union, intersection, for all, there exists and whatnot.

    And on another side note, I can't help but compare this course to CSC108. My classmates and I noted that CSC165 requires much more thinking than CSC108 and because of that, I like CSC108 better. I find coding fun and being able to code my own functions feels more of an accomplishment than if I were to learn material from CSC165. However, I find both courses to be interesting with CSC165 being more tricky. I definitely need to practice and study excessively in this course.

    So I think this is enough, or at least I hope it's enough, for today! Overall, I feel somewhat confident about  the first week's material. For sure, I need to tackle those Venn diagrams and study everything more deeply, but I don't expect it to be too difficult. Week 2's material is starting to hurt my brain though, but I'll write about that for next week's entry! Thanks for reading!!

No comments:

Post a Comment