Saturday, September 27, 2014

Week 3: Conjunction, Disjunction, Negation, Implication

The third week of class, the topic we focused on was still the language of math. We learned about different ways to express sets, using conjunctions and disjunctions. Learning this new method means we have more freedom to express what we want to, choosing the appropriate method to do so.

Conjunction is the"action or an instance of two or more events or things occurring at the same point in time or space". To express it in words, it means "and". It means an overlap of events, which is the same as the intersection between 2 or more sets.

Disjunction is combining 2 statements by saying at least one is true. In terms of sets, it can be represented by the union of 2 events.

Our next big topic was negations; negation means "not." We learned the method to negate a statement: the negation sign should apply to the smallest part of the expression. To negate something, we separate it into categories. For a universal quantifier, we negate it with one counter example. For an existential quantification, however, we would need to negate it with a universal quantification. We would need to push the negation sign inside, layer by layer, to make it apply to the smallest part. We also learned about the importance of scope. Everything that happens in scope, stays in scope.

Next, we learned the truth tables. These tables consisted of the possible outputs of all the predicates. However many predicates there are, there are 2^n rows to the table. Truth tables can be used to evaluate expressions involving predicates and implications, as well as for determining satisfiability. Satisfiability can only be satisfied if not all the possible outcomes are the same. Furthermore, truth tables can be used for proving equivalence: if all the outcomes turn out to be the same for every row, we can say these 2 statements are equivalent.
 

Wednesday, September 17, 2014

Precision and Quantifier

The past two weeks of class we covered some basic understanding of the logical thinking we need in order to succeed at Computer Science.

First off, we started with precision- just how precise do we need to be for a computer to understand us? What's a good balance? How do we "translate" human language into one computers can comprehend? We learned to run some basic code in Python and how to simplify code. I feel that even though simplified code might be saving space and more efficient, they are harder to understand by someone looking at the code for the first time. To debug a code, having a long string of logical argument may slow down progress. I find that reading code such as "return any([x not in S2 for x in S1])" takes more energy and requires more thinking to understand, as opposed to a "if-then" statement. To work on this, I will review the notes often and practice more questions.

The second topic we covered in class was Quantifiers. While the real world application of quantifiers is broad and I've come into contact with it quite a lot, I've never thought about it in such detail as we did in class. We learned how to prove/disprove statements, whether it be universal quantifiers or existential quantifiers. In the second week of classes, we evaluated the claims the quantifiers made- with python programs. This required logical thinking and determining the outcome.

Lastly, we learned about sentences and statements, as well as implications. We should take care the distinction between sentences and statements, as we need to identify them. For implications, cause and effect is a main concern. I had some troubles differentiating between some questions the "P" and "Q". This will require more work and more practice.