Tuesday, September 23, 2014

Week 2

In week 2, we learned about negation, disjunction, conjunction, intersection, contrapositive, implication, converse, and vacuous truth. 



I understood that implication was simply a statement: If P then Q, which P was the antecedent and Q was the consequent. Reading from left to right, this is one way/ direction. In converse/ other direction, the implication worked also because both P and Q were consistent. In inverse/contrapositive, the implication P => Q then became ~Q => ~P (~ is an alternative symbol of negation symbol)

For example:

Statement: If I walk around, then I am bored. (=>)
Converse: If I'm bored, then I walk around. (<=)
Contrapositive/Inverse: If I'm not walking around, then I'm not bored. (adding "not")

Moreover, vacuous truth simply meant that if we had an implication and there was no counterexample then it was true (no matter how ridiculous the implication statement was). 

For example: 

"If the sky turns red tomorrow then I will be the tallest man in the world."  (thanks to vacuous truth. This is true because there is no counterexample to this statement.)

























Tuesday, September 16, 2014

Week 1

At the first few lectures of first week of CSC165, I had to admit that I was kind of lost, not only because my native language WAS not english, but also because my brain couldn't get the logics that professor mentioned in lectures. I tried catching up and understanding different terminologies such as some, not some, all, not all, any, not any, counter example, qualifiers, universal claim(∀), existence claims(∃), and many others. By the end of first week, I found myself starting to understand the materials progressively as I was able to connect some topics from CSC165 to what I learned in CSC108.

For example: 

def q0(S1,S2):
    return not all{x in S2 for x in S1}

Here are some notes that I took in various lectures and tutorial:

"Some" means at least one or more.
"Not Some" can mean all or none (nothing).
"All" means everything.
"Not All" means anything more than 0.

any({...}) returns True if the set has one or more True elements
all ({...}) returns True if the set has True elements

I understood there were various methods that would help me when I drew venn diagrams.

All False -- > give one solution (counterexample)
All True --> give all solutions to prove the function 
Some False--> give all solutions to prove the function
Some True --> give one counterexample 

While drawing venn diagrams (four regions in total):
Cross - "X" means this region must be empty. 
Circle -"O" means this region must be occupied. 
Emptiness - "    " means this region doesn't matter.