Download presentation
Presentation is loading. Please wait.
Published byMargaretMargaret Hardy Modified over 8 years ago
1
Conditional Statements Lecture 2 Section 1.2 Fri, Jan 20, 2006
2
The Conditional A conditional statement is a statement of the form p q p is the hypothesis. q is the conclusion. Read p q as “p implies q.” The idea is that the truth of p implies the truth of q.
3
Truth Table for the Conditional p q is true if p is false or q is true. p q is false if p is true and q is false. pq p q TTT TFF FTT FFT
4
Example: Conditional Statements “If it is raining, then I am carrying an umbrella.” This statement is true when I am carrying an umbrella (whether or not it is raining), and when it is not raining (whether or not I am carrying an umbrella). It is false only if it is raining and I am not carrying an umbrella.
5
The Contrapositive The contrapositive of p q is q p. The statements p q and q p are logically equivalent.
6
The Converse and the Inverse The converse of p q is q p. The inverse of p q is p q. p qp q q pq p p qp q q pq p converses inverses contrapositives
7
Is this logical?
8
The Biconditional The statement p q is the biconditional of p and q. p q is logically equivalent to (p q) (q p). pq p q TTT TFF FTF FFT
9
Exclusive-Or The statement p q is the exclusive-or of p and q. p q is defined by pq p q TTF TFT FTT FFF
10
Exclusive-Or p q means “one or the other, but not both.” p q is logically equivalent to (p q) (q p) p q is also logically equivalent to (p q) p q is also logically equivalent to (p q) (q p)
11
The NAND Operator The statement p | q means not both p and q. The operator | is also called the Scheffer stroke or NAND. NAND stands for “Not AND.” p | q is logically equivalent to (p q).
12
The NAND Operator p | q is defined by pqp | q TTF TFT FTT FFT
13
The NAND Operator The three basic operators may be defined in terms of NAND. p p | p. p q (p | q) | (p | q). p q (p | p) | (q | q).
14
The NOR Operator The statement p q means neither p nor q. The operator is also called the Pierce arrow or NOR. NOR stands for “Not OR.” p q is logically equivalent to (p q).
15
The NOR Operator p q is defined by pq p q TTF TFF FTF FFT
16
The NOR Operator The three basic operators may be defined in terms of NOR. p p p. p q (p q) (p q). p q (p p) (q q).
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.