Thursday, 25 September 2014

Week 3 Slog - Galex Wong

Week 3 SLOG

The third week of CSC165 got very challenging because it required clear concept about logic and mathematical expressions, which are the essential foundations of the course. The lecture this week covered a lot of materials, this included the use of conjunctions. disjunctions, negations. truth tables and finally manipulation laws. Although the lectures in the beginning two weeks introduced and covered some of the first 3 topics, this week's lecture was much more in depth and mathematical. At first, I found it very challenging to quickly adapt to the mathematical statements Prof Zhang presented. For example, if R(x): Car x is red and F(x): Car x is a Ferrari, using R(x) or F(x) is already sufficient to present "Car x is red or a Ferrari. Fortunately, the lecture used a lot of pictures of different cars to present the case and I was able to quickly understand specifically how the predicates worked. After lecturing on about conjunction and disjunction, Prof Zhang told an amusing joke:

"A logician’s wife is having a baby. The doctor immediately hands the newborn to the dad.
His wife asks impatiently: “So, is it a boy or a girl?”
The logician replies: “Yes.” "

Not only did I enjoyed this part of the class most, I found it really helpful when incorporating humor into the lecture as I was able to quickly understand fully how disjunction works (satisfying either of the conditions will make the statement true).

The next part of the lecture moved to negating predicates and quantifiers. At first, my understanding for negation was not very solid as I still didn't understand why the negation for "for all" is "there exist". Furthermore, I found negating "and" and "or" statements difficult. Yet, by going through the exercises shown on the slides and working with my peers, I was able to overcome my problems by visualizing Venn diagrams. 

The final part of the lecture covered truth tables and laws formed through the use of truth tables. While at first I thought Venn diagrams can help us visualize all conditions, Prof Zhang showed the flaw of such technique by displaying how the visualization method fails when the number of predicates increases. Hence, constructing truth tables were necessary for computer scientists. As a student who enjoys mathematics, I find it very enjoyable when professor showed us how we can come up with logical proofs with the assist of truth tables, such as De Morgan's Law. I hope through this lecture I will be able to identify other laws and solve various complex mathematical problems in the future.


Wednesday, 17 September 2014

Week 1 SLOG - Galex Wong (1001307864)

Week 1 & 2 CSC 165 Fall 2014:

Slog 1:

It is never an easy task to focus and participate fully on a 3 hour mathematics and computer science lecture at night. However, after taking part in the course CSC165 for two weeks, I realized that doing so in this course is rather an easy and enjoyable process as the course constantly presents interesting problems that challenges me. For instance, the street car drama in lecture 1 is one real life problem that I found particularly interesting, as I would have concluded that it is impossible to determine the ages of the three children in the scenario if I did not notice the important parts of the conversation between the two characters and how it relates to mathematics (The problem appeared unsolvable at first because there were 3 unknown variables but only 1 equation.).

The first two weeks of lectures transformed my understanding and perception of mathematics completely, as I started to realize mathematics is much more than computation and drills. It is in fact a language and a series of logical expressions that is able to precisely depict statements and conditions. As our lecturer professor Zhang explained in lecture 1, there is a stark contrast between natural language and mathematical language. While natural languages can be ambiguous, mathematical language demands clarity and precision, which is why mathematicians introduces phrases like "for all", "there exists", "continuous, open, closed" etc. Lecture 1 continued on introducing the ideas of quantifiers, which are expressions that connect properties of elements to properties of sets. For example, "all cars are red" and "all female employee earn less than $55,000". At first, I found it confusing to prove/ disprove universal and existential quantification. Yet, as I applied the problem to real life scenarios, such as the table of salaries presented in lecture 1's PowerPoint, I overcame the challenge and understood that to verify universal and falsify existential quantification, one must prove that every element of the domain satisfies (verify for all)/ do not satisfy (falsify for some) the quantification. In contrast, to falsify universal and verify existential quantification, one only needs to give a single counter example (falsify for all)/ example (verify for some). Hence, universal and existential quantifiers are "anti- symmetrical".

The second week of lecture followed up on quantifiers and introduced how to verify and falsify quantification with Venn Diagrams. In the beginning, I found it very difficult to understand the why simply placing a "X" in region P is sufficient to verify "For all x in P, x is in Q" (The Venn diagram was drawn with regions P and Q interlocking in a universe). However, I was able pass the challenge by carefully translating the mathematical statement into English and asking my peers if I grasped the correct concept. Then, professor Zhang introduced us how to show quantifiers as sets. For instance, "All employees earn over $42,000" can be simply expressed as E is a subset of O, where E: set of all employees and O: set of employees who earn over $42,000. Once again, since there are many new symbols introduced, writing these statements was challenging at first but I was able to succeed by translating the symbols step by step. Afterwards, we learnt about differentiating statements and sentences and using predicates to present statements. A mathematical statement is one that can be evaluated true or false and the object in it must be quantified, whereas a sentence is not quantified nor cannot be evaluated. I found it particularly interesting to use predicates to illustrate statements as it is a precise and neat way to present properties. For example, to say "all male employees earn less than $55,000" . All we have to do is define L: employees who earn less than  $55,000 and write "For all x belong to M, L(x)". Finally, we looked at "If, Then" statements. It was fascinating to see how our everyday language associates closely with P => Q statements, for instance, in the statement "I will dance only when I'm drunk", I have learnt to identify which part of the statement is the antecedent (I will dance) and consequent (I'm drunk). Initially, I found contrapositive statements and vacuous truth hard to understand. However, the ideas behind the two concepts became easy to understand once I illustrated a truth table and see that P is always false when Q is false and if P is false, we are unable to falsify the given statement, hence the statement is true.

All in all, by the end of the lecture, we have learnt how to present English statements in mathematical statements using predicates, symbols and implications. These ideas are homologous to my other course MAT137 and I hope that understanding these ideas will help me succeed in both courses!