Processing math: 100%

Monday, 29 September 2014

Week 4 Miscellany

The person next to me in tutorial asked if associativity worked between conjunction and disjunction. For example:
P(QR)?(PQ)RAt first, I said "sure, why not?" not really thinking about it, but really, the two expressions mean different things.
P(QR)(PQ)(PR)(PQ)R(PR)(QR)Namely, the second one is true whenever R is true. As a truth table,
PQRP(QR)(PQ)RTTTTTTTFTTTFTTTTFFFFFTTFTFTFFFFFTFTFFFFFGood to know.

Sunday, 28 September 2014

Week 3

This past week focussed on conjunction, disjunction, negation, and implication. 

While I find conjunction and disjunction pretty straightforward, implication, in this context, doesn't come as readily. I learn best by writing things out and working through them, so that's what I'm going to do for implication.

The truth table for the implication PQ is:
PQPQTTTTFFFTTFFT As given in class, we also have PQ¬PQ
With the above we can check that the contrapositive is the same as the regular implication:
¬Q¬P¬¬Q¬PQ¬P¬PQ
Next, let's translate an equivalence into conjunction and disjunction, starting by splitting the bi-implication into two implications:
PQ(PQ)(QP(¬PQ)(¬QP)(¬P¬Q)(¬PP)(Q¬Q)(QP)(¬P¬Q)(PQ)What about the transitive property?
((PQ)(QR))(PR)(¬PQ)(¬QR)(¬PR)¬((¬PQ)(¬QR)(¬PR)¬(¬PQ)¬(¬QR)(¬PR)(P¬Q)(Q¬R)(¬PR)
as a truth table:
PQR(P¬Q)(Q¬R)(¬PR)(P¬Q)(Q¬R)(¬PR)TTTFFTTTTFFTFTTFTTFTTTFFTFFTFTTFFTTFTFFTTTFFTFFTTFFFFFTTSo it's a tautology. Great. (It would have been easier to just go straight to a truth table, but let's call it "good practice").

Finally, how does it look for P(QR)?
P(QR)¬P(¬QR)(¬P¬Q)R¬(PQ)R(PQ)R
That's all I can really think of right now. A lot of this stuff is easier to show by just writing up a truth table, but I learn better if I can think about things multiple ways. Also, a truth table would show that P(QR))(PR)(QR) but I haven't figured out how to get there by manipulating terms.




Monday, 15 September 2014

Let's be precise.

We're now a week into the course, and we've been talking a lot about sets and statements about sets. A lot of this has revolved around English language or Python statements about sets, such as 

     not all({x in S2 for x in S1})

And

      Some male employee earns over 42,000.


While discussing sets in a way any English speaker might understand is useful, it helps me, personally, to put such statements into the cold, precise language of math.

Towards this goal, we'll start off by introducing some terminology. Then we'll move to applying the terminology to statements encountered in class. Finally we'll end with a brief discussion of why this sort of thing is useful.

Terminology

We'll use the standard and to denote set union and intersection, respectively. In other words: 
xABxA or xB xABxA and xB
We'll also use ¯X to denote the complement of X (that is, not X), and to denote the empty set.

The Meat

With this terminology, it's not too hard to translate statements used in the course. We'll be talking about two sets, S1 and S2.
''all S1 in S2''S1S2=S1''some/any S1 in S2''S1S2''no/none S1 in S2''S1S2= Negating these is easyswitch = to and vice versa:
''not all S1 in S2''S1S2S1''not some/any S1 in S2''S1S2=''not no/none S1 in S2''S1S2 
Applied to the statement at the beginning, "Some male employee earns over $42,000", we have, with M as the set of male employees and O as the set of employees earning over $42,000, 
MO
This also allows us to evaluate nonsense like "Not some not male employees earn not more than $42,000":
¯M¯O=FL=
where we have used (keeping in mind that the complement means "not", in a sense) F as the set of female employees (assuming all non-male employees are female) and L as the set of employees earning less than $42,000. In plain language, we have the statement "No female employees earn less than $42,000". 

Finally, an added bonus is that this way of thinking makes Venn diagrams damn easy.
It's a lot easier to translate a statement like "some male employees earn more than $42,000" onto the diagram now. Let the set of male employees be S1 and the set of high earners be S2. Then we have S1S2. In other words, the middle region must be occupied.

If you have any questions/thoughts or see any errors, leave me a comment.