Logic Leo Cheung
Stuff you need to know Logical equivalence Write logical formula from truth table De Morgan’s Law Contrapositive If and only if Modus Ponens, Modus Tollens Quantifier
Logically equivalence Two statement is logically equivalence if they have the same truth value in every situation
Logically equivalence ? FFFTFF FTTFFF TFTTTT TTTFFF So they are logically equivalence
De Morgan’s Law
What is ? ▫ What is ? ▫ De Morgan’s Law
Contrapositive What is the contrapositive of ▫If I do not understand the course materials, I go to tutorial. ▫Sons of Li Ka Shing are all rich. ▫
Contrapositive Answers ▫If I don’t go to tutorial, I understand the course materials. ▫If one is not rich, he is not son of Li Ka Shing. ▫
If and only if p if q p only if q p if and only if q Are they the same? ▫P if and only if Q ▫P = Q ▫~P if and only if ~Q They are all the same.
Playing with if Are they the same? 1.If it rains, I will stay 2.It does not rain or I will stay 3.If I do not stay, it does not rain How about the followings? 4.If it does not rain, I do not stay 5.If I stay, it rains 6.It rains and I do not stay 1 = 2 = 3 4 = 5 ≠ 1 6 is negation of 1 1 = 2 = 3
Modus Ponens If you know… ▫If p then q ▫p is true Conclusion: q is true
If you skip csc2110 lecture, you will fail the course. And you really skip csc2110 lecture. Conclusion? Modus Ponens You will fail the course.
Modus Tollens If you know… ▫If p then q ▫q is false Conclusion: p is false
Modus Tollens If a figure is a quadrilateral, then the sum of its interior angles is 360 degree. The sum of the interior angle of a figure is not 360 degree. Conclusion? The figure is not a quadrilateral.
Are they true? Given ▫If Leo cheats in the exam, then Leo sits in the back row. ▫Leo sits in the back row Conclusion: Leo cheats in the exam. Wrong conclusion!
Are they true? Given ▫If interest rates are going up, stock market prices will go down. ▫Interest rates are not going up. Conclusion: Stock market prices will not go down. Wrong conclusion!
Argument Conclusion:
Argument Given That means must be false. Conclusion:
Exercises Textbook ▫1.1: ▫1.2: ▫1.3: ▫2.1: ▫2.2: 3(a,c) ▫2.3: ▫2.4: Answers can be found in the textbook.
END