Understanding Logical Connectives in Discrete Mathematics
Explore the world of propositional logic and truth tables in discrete mathematics through a peer-instruction approach. Learn about basic logical connectives, new connectives, complex formulas, operator precedence, and the nuances of implication (implies) with engaging examples. Delve into scenarios analyzing the truth behind statements involving implications. Enhance your understanding of logical operations with practical comparisons and real-life situations.
Download Presentation
Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
E N D
Presentation Transcript
Creative Commons License CSE 20 Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative Commons Attribution- NonCommercial-ShareAlike 4.0 International License. Based on a work at http://peerinstruction4cs.org. Permissions beyond the scope of this license may be available at http://peerinstruction4cs.org.
2 Today s Topics: Propositional logic Truth tables for basic logical connectives not, and, or, xor, implies Truth table for new/made-up connectives Step-by-step truth tables for complex propositional formulas 1. 2. 3.
3 1. Truth table for basic logical connectives not, and, or, xor, implies
4 Logical connectives math p q p q p q p p q p q Java/C++ p && q p || q p ^ q !p and or xor not If/then, implies If and only if, iff We will use the math notation
5 Logical connectives: Operator precedence Operator Precedence 1 2 3 4 5 (not) (and) (or) (implies) (iff) As with programming, it is good practice to use parenthesis for clarity
6 OR is tricky in English OR XOR p F F T T q F T F T p XOR q F T T F p F F T T q F T F T p OR q F T T T Birthday party host: Do you want some cake OR ice- cream? YOU CAN HAVE BOTH (imagine it is rude to have nothing) Diner breakfast special: Pancake, two eggs and bacon XOR sausage. YOU MUST PICK EXACTLY ONE
7 What does it mean: IMPLIES Prof Lee says: If you win the CA state lottery between now and the end of quarter, you will get an A+ in this class. 4 months later under which of the following scenarios is Prof. Lee a liar? A. You won the lottery and got an A+ B. You won the lottery and got a B+ C. You did not win the lottery and got an A+ D. You did not win the lottery and got a B+ E. None/More/Other
8 What does it mean: IMPLIES Your roommate: If you come to my party Friday, you will have fun Under which of the following scenarios is your roommate a liar? A. You stayed home studying Friday and you did not have fun. B. You stayed home studying Friday and you had fun. C. You went to the party Friday and did not have fun. D. You went to the party Friday and you had fun. E. None/More/Other
Truth tables: IMPLIES A. T, F, F, T B. F, T, T, T C. F, F, F, T D. F, T, T, F None/more/other p F F T T q F T F T p q E. I m interested in seeing if this makes intuitive sense to you can you explain why each output makes sense, using example sentences?
10 2. Truth table for new/made- up connectives
11 Making our own connective: AtLeastOneOfTheseThree ALOOTT(p,q,r) p q p OR q F F F F T T T F T T T T Let s make a truth table for ALOOTT. How many rows and columns should be in our truth table (ignoring header row)? A. 5 rows, 4 columns B. 6 rows, 4 columns C. 7 rows, 4 columns D. 8 rows, 4 columns E. 9 rows, 4 columns
12 Making our own connective: AtLeastOneOfTheseThree ALOOTT(p,q,r) p q r ALOOTT(p,q,r) F F F F F T F T F Homework F T T T F F T F T T T F T T T
13 3. Step-by-step truth tables for complex propositional formulas
14 Truth table for (p q) p p F F T T q F T F T p p q (p q) p