Sunday, October 12, 2014

Negation in the test!

Hi there dearest readers!
Hope everything is ok with you guys...

This week we had our midterm, I don't think I went bad in it, but there was a question in the test, if I'm not mistaken question 2, in which we had to negate a mathematical sentence, that for me was very confusing.

And it was not just negating, in that symbolic sentence we had to negate just the predicate.

Something like:

\forall \!\,\in \!\, X , \forall \!\,y \in \!\, X \exists \!\,z \in \!\, X, x X y = z

And in the exercise we had to negate just the predicate. So:

x X y = z

And my problem was, how can I negate a multiplication? In the test I just thought, ok, so it must be the division.

Researching for this post, I remembered a thing, so basic. That the "and" operator is a way of representing multiplication, so basically:

x X y = z      =      ((x \and \!\, y) \Rightarrow \!\, z)

Translating the implication by its and/or form we arrive at:

(¬ (x \and \!\, y)  \or \!\, z)

Negating this sentence by De Morgan's law we arrive at:

¬ ( (x \and \!\, y) \and \!\, ¬ z )

I think that is the negation of the first sentence, I just thought that would be interesting to present something in this form to its derivation. Please, if my calculations, or logic are wrong, comment! 

Wednesday, October 1, 2014

Negations, Converses and Contrapositives

Hi there, dear reader! Hope everything is all right!

When I was in my University back in Brazil, I was never introduced to the concepts of Converses and Contrapositives in formal logic systems. I think the concept of changing a thing on just on perspective quite nice, much more nice, when such thing its not a literal negation.

Processing Negation:

Let's suppose the following statement is true:

\forall \!\,\in \!\, X | P(x) \Rightarrow \!\, Q(x)

Then the Negation of that statement is:

 \neg \!\,(\forall \!\,\in \!\, X | P(x) \Rightarrow \!\, Q(x))

The quantifier is changed and the negation go inwards:

 \exists \!\,\in \!\, X | \neg \!\,(P(x) \Rightarrow \!\, Q(x))

Then, in order to complete the process of negation we have to convert the implication to its and/or form which becomes:

 \exists \!\,\in \!\, X | \neg \!\,(\neg \!\,P(x) \or \!\, Q(x))

Finally we arrive at the negation of the following sentence:

\exists \!\,\in \!\, X | P(x) \and \!\, \neg \!\,Q(x))

That is, of course the negation of the first sentence!

One easy way to discover if a sentence is a Converse, Contrapositive or the Negation of some sentence is to look for the quantifier. If the quantifier is UNCHANGED then it is the Converse or the Contrapositive, since its properties, just change the relationship between implications, ands or ors.

The Contrapositive of the first sentence would be:

\forall \!\,\in \!\, X | \neg \!\,Q(x) \Rightarrow \!\, \neg \!\,P(x)

And the Converse of the first sentence would be:

\forall \!\,\in \!\, X | Q(x) \Rightarrow \!\, P(x)

In some sense, you can say that these sentences derived from the original represent some kind contradiction in relation to the first one but NOT its negative perspective. I just thought this would be a nice addition to the blog.

Hope everyone like it!


Thursday, September 18, 2014

Quantifiers

I really like quantifiers... Past week we studied in class lots of quantifiers, (∃ and \forall \!\,), it was really cool! Again, it is strange to me seeing this kind of logic strictly connected to math, but well almost every single concept that we apply to programming is also strictly connected to math. 

The professor this week also passed to us some exercises in which we had to do that involved some or symbolic or natural language logic sentences with quantifiers, just to give you reader an example things such as:

"All three python programs don't pass all three test suits"

so, translating:

"\forall \!\, x | x pass ∃ some y" 
where x python programs and y test suits.

And at the end of the exercise set, there was some Venn Diagram exercises that confounded me, but it was fun, I really enjoyed it!


Let's hope for the best!

Hello!

I hope everything is alright with everybody who's reading this!

In this first post about the CSC165 class and its subjects I would like to say two key things: Firstly my impression as a third year student of the professor Danny Heap in me, and secondly how I fell doing "reasoning" for the third time.

Well, my impression in Professor Heap is quite good, I like professors who instead of making you believe that something is true just say: "you don`t believe in me? That's perfectly ok, go, and test in your preferred python compiler". He makes us discover things by ourselves, even in class, with the short time that he have to teach us something. So I really hope that he continues to teach indefinitely.

Regarding the courses I already done, I would like to give an explanation. When I was 16 (I don't know exactly), I entered a technician course in "programming and the development of systems" at my home town in Brazil, and in that course I had a great idea about programming logic and its way of thinking, and at that time the teaching I had just superficially talked about math in general. The second course that I had in the area was when I was in the first semester of my actual undergraduate course, "technologist in systems for internet" also in Brazil. However it is good to say that I never had to much math experience while doing both courses.

And now with the expertise of professor Heap plus my math perspective, I think I'll have a much more profound and enhanced learning experience. Lets hope for the best!