CSE 20: Discrete Mathematics Truth Tables For Basic Logical Connectives .

1y ago
12 Views
1 Downloads
1.33 MB
8 Pages
Last View : Today
Last Download : 3m ago
Upload by : Jewel Payne
Transcription

2 Today’s Topics: Propositional logic CSE 20: Discrete Mathematics for Computer Science Truth tables for basic logical connectives 1. not, and, or, xor, implies ! 2. 3. Truth table for new/made-up connectives “Step-by-step” truth tables for complex propositional formulas Prof. Miles Jones 3 4 Logical connectives 1. Truth table for basic logical connectives not, and, or, xor, implies math Java/C ! and p q p && q ! or p q p q ! xor p q p q ! not p !p ! If/then, ! If implies p q and only if, iff p q ! We will use the math notation

5 Logical connectives: Operator precedence Operator Precedence (not) 1 (and) 2 (or) 3 (implies) 4 (iff) 5 Truth tables: AND p F F T T ! As with programming, it is good practice to use parenthesis for clarity Truth tables: AND p F F T T q F T F T p q F F F T Is it: A. B. C. D. E. F,F,F,F F,T,T,T T,T,T,F F,F,F,T None/More/Other I’m interested in seeing if this makes intuitive sense to you – can you explain why each output makes sense, using example sentences? q F T F T p q ? ? ? ? Is it: A. B. C. D. E. F,F,F,F F,T,T,T T,T,T,F F,F,F,T None/More/Other I’m interested in seeing if this makes intuitive sense to you – can you explain why each output makes sense, using example sentences? Truth tables: AND OR p F F T T p F F T T q F T F T p q F F F T q F T F T p q F T T T I’m interested in seeing if this makes intuitive sense to you – can you explain why each output makes sense, using example sentences?

9 10 OR is tricky in English OR p Implies ! p XOR q p OR q p q p XOR q F F F F F F F T T F T T T F T T F T T T T F T T Birthday party host: “Do you want some cake OR icecream?” YOU CAN HAVE BOTH (imagine it is rude to have nothing) q implies q ! if p then q ! q when p ! q if p !p Diner breakfast special: “Pancake, two eggs and bacon XOR sausage.” YOU MUST PICK EXACTLY ONE 11 What does it mean: IMPLIES ! I say: “If you win the 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 am I a liar? A. B. C. D. E. You won the lottery and got an A You won the lottery and got a B You did not win the lottery and got an A You did not win the lottery and got a B None/More/Other 12 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. B. C. D. E. You stayed home studying Friday and you did not have fun. You stayed home studying Friday and you had fun. You went to the party Friday and did not have fun. You went to the party Friday and you had fun None/More/Other

Truth tables: IMPLIES p F F T T q F T F T p q D. T, F, F, T F, T, T, T F, F, F, T F, T, T, F E. None/more/other A. B. C. I’m interested in seeing if this makes intuitive sense to you – can you explain why each output makes sense, using example sentences? Truth tables: IMPLIES p F F T T q F T F T p q T T F T D. T, F, F, T F, T, T, T F, F, F, T F, T, T, F E. None/more/other A. B. C. I’m interested in seeing if this makes intuitive sense to you – can you explain why each output makes sense, using example sentences? 16 Truth tables: IMPLIES p F F T T q F T F T p q T T F T T, F, F, T F, T, T, T F, F, F, T F, T, T, F None/more/other A false statement implies anything!!!!!!! Implies ! p I hit my thumb with a hammer thumb hurts ! p q If I hit my thumb with a hammer then my thumb hurts. ! q my p F F T T q F T F T p q T T F T

17 18 Making our own connective: AtLeastOneOfTheseThree ALOOTT(p,q,r) 2. Truth table for new/madeup connectives ! Let’s 9 rows, 4 columns p OR q F F F T T T F T T T T 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 20 p q p OR q F F F F T T T F T T T T 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 N variables ! 2N rows C. 7 rows, 4 columns (ignoring header row) D. 8 rows, 4 columns E. q F ! Let’s 19 Making our own connective: AtLeastOneOfTheseThree ALOOTT(p,q,r) p Making our own connective: AtLeastOneOfTheseThree ALOOTT(p,q,r) p q r F F F F F T F T F F T T T F F T F T T T F T T T ALOOTT(p,q,r) Homework

21 22 Truth table for (p q) p 3. “Step-by-step” truth tables for complex propositional formulas p q F F F T T F T T p q p 23 24 Truth table for (p q) p p q p q F F F p (p q) p (p q) p Truth table for (p q) p p q p q p T F F T T T T F T T T T F F T F F F T T T T T T F (p q) p

25 26 Truth table for (p q) p p q p q p F F T T F T T T F T T (p q) p Truth table for q (p q) p q q p q T F F T F F T T F T F F T F F F T F T F F T F F T T F T T 27 28 Truth table for pORq p q p F F T F T T T q (p q) pORq Truth table for p q p q T F F T T T T F T T T F F F T F F F T F T T T F T p q p p q is logically equivalent to p q!!!!!

29 All possible truth tables for two variables p q 1 F F T T T T T T F T F T 2 T T T F p 3 T T F T 4 T T F F q 5 T F T T 6 T F T F 7 T F F T 8 T F F F q p 9 10 11 12 13 14 15 16 F T T T F T F T F T T F F T F F F F T T F F T F F F F T F F F F

Truth tables for basic logical connectives ! not, and, or, xor, implies 2. Truth table for new/made-up connectives 3. "Step-by-step" truth tables for complex propositional formulas 2 1. Truth table for basic logical connectives 3 not, and, or, xor, implies Logical connectives math Java/C !and p q p && q

Related Documents:

92 vipul sharma it 93 rishabh jain cse 94 manik arora cse 95 nishant bhardwaj cse . 96 rajit shrivastava it 97 shivansh gaur cse 98 harsh singh cse 99 shreyanshi raj cse 100 rahul bedi cse 101 pallavi anand cse 102 divya cse 103 nihal raj it 104 kanak

cse-148 kuriakose jijo george n t george cse-149 kusum joshi ramesh chandra joshi cse-150 m mithun bose n k mohandasan cse-151 madhuri yadav rajbir yadav cse-152 malini shukla r s sharma cse-153 manisha khattar sunil kumar khattar cse-154 m

CSE 1400 Applied Discrete Mathematics cross-listed with MTH 2051 Discrete Mathematics (3 credits). Topics include: positional . applications in business, engineering, mathematics, the social and physical sciences and many other fields. Students study discrete, finite and countably infinite structures: logic and proofs, sets, nam- .

What is Discrete Mathematics? Discrete mathematics is the part of mathematics devoted to the study of discrete (as opposed to continuous) objects. Calculus deals with continuous objects and is not part of discrete mathematics. Examples of discrete objects: integers, distinct paths to travel from point A

Discrete Mathematics is the part of Mathematics devoted to study of Discrete (Disinct or not connected objects ) Discrete Mathematics is the study of mathematical structures that are fundamentally discrete rather than continuous . As we know Discrete Mathematics is a back

2.1 Sampling and discrete time systems 10 Discrete time systems are systems whose inputs and outputs are discrete time signals. Due to this interplay of continuous and discrete components, we can observe two discrete time systems in Figure 2, i.e., systems whose input and output are both discrete time signals.

6 POWER ELECTRONICS SEGMENTS INCLUDED IN THIS REPORT By device type SiC Silicon GaN-on-Si Diodes (discrete or rectifier bridge) MOSFET (discrete or module) IGBT (discrete or module) Thyristors (discrete) Bipolar (discrete or module) Power management Power HEMT (discrete, SiP, SoC) Diodes (discrete or hybrid module)

Grade 2 Writing and Language Student At-Home Activity Packet 3 Flip to see the Grade 2 Writing and Language activities included in this packet! This At-Home Activity Packet is organized as a series of journal entries. Each entry has two parts. In part 1, the student writes in response to a prompt. In part 2, the student completes a Language Handbook lesson and practices the skill in the .