Download presentation
Presentation is loading. Please wait.
Published byGavin Pilkington Modified over 9 years ago
1
CSE 20 DISCRETE MATH Prof. Shachar Lovett http://cseweb.ucsd.edu/classes/wi15/cse20-a/ Clicker frequency: CA
2
Todays topics Boolean logic: simplifications, derivation rules Sections 3.2-3.4 in Jenkyns, Stephenson
3
Simplifications Which of the following Boolean expressions is equivalent to A. B. C. D. E. None of the above / more than one of the above.
4
Simplifications Which of the following Boolean expressions is equivalent to A. B. C. D. E. None of the above / more than one of the above.
5
Simplifications DeMorgan’s Laws Identity Idempotence Commutativity Distributivity Absorption
6
Negation
7
Conditional operator JS p. 85 PQP Q TTT TFF FTT FFT
8
Conditional operator PQP Q ~(P ~Q) ~P v Q TTT TFF FTT FFT Antecedent aka hypothesis or assumption or “given” Consequent aka conclusion or goal
9
Contrapositive form P Q is equivalent to ~Q ~P How can we prove it? A. Compare truth tables B. Derive one from the other using simplification rules C. Both D. Neither
10
Contrapositive form Proof sequence: Formulas are equivalent in consecutive steps 1. ~Q ~P(given) 2. ~(~Q) (~P) (definition of ) 3. Q ~P(double negation) 4. ~P Q(commutativity) 5. P Q(definition of )
11
Contrapositive form What’s the contrapositive of the statement “If you know Java, then you know a programming language?” A. If you know a programming language, then you know Java. B. If you don’t know a programming language, then you don’t know Java. C. If you don’t know Java, then you don’t know a programming language. D. None of the above.
12
Implication JS p. 86 vs.
13
Implication JS p. 86 vs. What’s enough to make a conditional statement false? A.P being false. B.Q being false. C.P and Q both false. D.Either P or Q (or both) false. E.None of the above / more than one of the above.
14
What does it mean: IMPLIES 14 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
15
What does it mean: IMPLIES 15 Prof Lovett 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. Lovett 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
16
Implication Is P Q equivalent to Q P? A. Yes B. No
17
Implication Is P Q equivalent to Q P? A. Yes B. No PQP QQ P TTTT TFFT FTTF FFTT
18
Here is an example with the same form: If this shape is a square, then this shape is a rectangle. Therefore, if this shape is a rectangle, then this shape is a square. No! p→ q and q→p are the converse of each other. It is not safe to assume that if p→q is true, then q→p is also true! The converse could be true though…as in the equal sides/square example. If both p→q and q→p are true, then we say p↔q (“p iff q”). 18 Converse error
20
“If something is made out of wood, then it floats. Therefore, if she floats, then she is made out of wood [and therefore a witch!]” 20 Converse error
21
Contradictions Recall definition of IMPLIES If P is false, then P Q is true, doesn’t matter what Q is Example: If pigs can fly, then hell freezes over If 1+1=3 then 2+2=5 PQP Q TTT TFF FTT FFT
22
Next class Sets Read section 2.1 in Jenkyns, Stephenson
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.