Processing math: 100%

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 easy
switch = 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.

No comments:

Post a Comment