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.
Published byModified over 5 years ago
Presentation on theme: "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."— Presentation transcript:
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!