Friday, September 26, 2014

Week 2 & 3


    Well to start off, I feel a bit more overwhelmed than I did last week with the course material. I was familiar with the conjunction "and", disjunction "or", and negation since in CSC108 I did exercises about Boolean operators. A short and simple summary of this material includes:

1. In order for "P and Q" to be true, both P and Q must be true. For it to be false, either P, Q or both P and Q must be false. The symbol for "and" is ∧and is similar to another symbol, ∩ (intersection). 
2. In order for "P or Q" to be true, at least one of P or Q must be true. For the statement to be false, both P and Q must be false. The symbol for "or" is which is similar to another symbol, ∪(union). 
3. And lastly, to invert truth value we use the negation symbol, ¬. If P were true, the value of ¬ ¬P would be true.

    I also understand vacuous truth, equivalent and equal sets, tautology, satisfiability, and unsatisfiability, but some other concepts I still have questions about. Mainly, the converse of an implication and symbolic expressions confuse me.

    Firstly, I know what the definition of contrapositive and converse is, but I still fail to grasp why the converse of an implication is not the same as the implication. I feel like the answer is simpler, but my mind gets all jumbled especially when I start mixing causality with logic (which according to the course notes, shouldn't be done).

    Another thing I'm stuck on is the tutorial exercise for this week. I did the exercise by myself at home and I thought I had done it right, but when we took it up in class I had gotten everything completely wrong. It made a  bit more sense when my TA took up the exercise but I wish I had gotten more of a chance to practice and learn from my mistakes before the quiz. Even 5 minutes to look over the exercise would have made me feel a lot more comfortable with the material. I take back what I said last week, that I was excited to learn new symbols. I thought these symbols would be fun! :(

    Speaking of which, the quiz was quite easy I suppose. Even though I got the exercise questions all wrong, I think I answered the quiz question correctly...at least some it anyway. I realized that I'll definitely need to find more resources for me to practice translating English to symbolic expressions and vice versa because I find that the course notes only touch upon a fraction of what we really need to know in order to do well in this course. The notes are too general and I need to find practice sheets of some sort or a textbook to help me learn more in-depth.

    Anyways, I plan on forcing myself to go to the CS Help Aid Center (since when I tried to see my professor, there were quite a few people and not enough time until my next class). Also, I think the assignment due on Oct. 3 should help. Although my group members don't seem to know much more than me, I think talking about it with other people should help.
   
    And oh yes, midterms are coming in less than 2 weeks and I'm pooping my pants, but I plan on prioritizing this course since I'm struggling the most in it. After talking to my friends, I don't seem to be the only one struggling though. I guess we can all suffer together, yay!

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!!