Friday, September 26, 2014

Weeks 2 & 3 - Implication, Conjunction, Disjunction, Negation. Good Thing There's Truth Tables!


Just another way of saying “if/then”, “and”, “or”, “not”. I have to say, implication was the most challenging. It's the odd one out of the group and I always have to think of it in terms of the other three. We all grew up saying “ands”, “nots” and “ors” but who grows up making implications all the time? This helps me translate it into something I am familiar with. Some of you might not agree, but “don't knock it unless you've tried it”. Or is it “don't knock it if you haven't tried it”? I was really surprised to see this broken down to “if you've knocked it” it implies “you've tried it”. Seems like an odd way of thinking. I had to decipher this problem using Venn diagrams, sets, and complements before I was convinced. And then I realized that the two “nots” in the original sentence created a contra-positive to the final translation. I'll have to remember to look at the lecture notes the next time I get stuck on a problem like that. I'm sure they'll help with completing the assignment.

Negating expressions is not bad. The concept seems fairly straightforward. Negation ties in very well with verifying and falsifying universal and existential quantification. Conjunction and disjunction was like a repeat of the first two weeks of statistics which I am also taking this semester. Actually, most of the stuff about sets was contained in there as well. Of course we are taking a much more abstract approach. Have you noticed that on Assignment 1 we only had one problem with numbers and the rest was translating stuff to and from English? For the most part these three alone are not a problem but when you combine them with implication and make longer expressions it gets very confusing, even with Venn diagrams.

Thank goodness we have the mighty truth table! I can draw straight lines no problem, I have a ruler! But circles freehand are not a walk in the park. Truth tables are great for breaking down those larger problems into the smallest operation to the point where all you have to do is think yes or no, true or false, on or off. Yes I know, like a computer. With Venn diagrams you almost had to solve the entire expression for every single region just to know whether it was occupied or not. I look forward to doing more work with truth tables and I'll have to keep Venn diagrams in my back pocket (I doubt they're going to ask us whether Al makes more than $60,000 on a test).

Tuesday, September 16, 2014

Week 1 - Introduction, Precision, Quantifiers


The introduction to this course shed some light on a number of interesting points such as the significance of ambiguity and precision when traversing back and forth between informal English to logical expressions and then to computer code.  One could say that this is very much a communications course in mathematics.

Ambiguity can be very frustrating particularly for Comp. Sci. students and I guess students in general.  Even the slightest obscurity in the course information and Piazza (our course forum) lights up with questions.  Those of you who are also taking CSC148 this semester know what I’m talking about.  But it’s not all bad.  For one thing it does add humor to our lives.  I definitely had to stop and think for a minute after reading those “double meaning headlines” in our lecture notes.

To illustrate the problem solving aspect of the course we went through a fun exercise about the man on the streetcar with three kids of unknown age.  The problem solving procedure that was presented seemed pretty standard to what’s been drilled into us since elementary school but I was able to take away a couple important points.  The first would be to keep a log of all the mistakes and dead-ends encountered through the process of solving the problem.  I think this is a great idea to help track all the silly syntax errors that you make when programming.  This way you can avoid stupid mistakes on programming exams and midterms.  The second point relates to the exercise we did in class and that is useful information can sometimes be hidden within things that appear to be useless. 

We were also introduced to set operations in Python and how they relate to universal and existential claims.  I found this part to be somewhat tricky, as it required us to translate English sentences (mathematical statements) into logical python code.  It then got even trickier when we started adding negation operators and tried to translate the code back into English to explain what a function does.  It didn’t help that I had not previously seen some of the set operations used in class.   This statement was particularly frustrating: “{x in S2 for x in S1}”.  I had to test this in the lab before I fully understood what those functions meant.  Did you know that this statement returns a set of True or False or Both?  I didn’t.  But it makes sense since we are using those with the any( ) and all ( ) functions.