220 likes | 769 Views
Conditional Statements. Lecture 3 Section 1.2 Mon, Jan 22, 2007. 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 .
E N D
Conditional Statements Lecture 3 Section 1.2 Mon, Jan 22, 2007
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.
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.
Example: Conditional Statements • “If it is Wednesday, then Discrete Math meets today.” • This statement is true • if Discrete Math meets today (whether or not it is Wednesday), and • if it is not Wednesday (whether or not Discrete Math meets today). • It is false only if it is Wednesday and Discrete Math does not meet today.
The Contrapositive • The contrapositive of pq is qp. • The statements pqandqp are logically equivalent.
qp pq pq qp The Converse and the Inverse • The converse of pq is qp. • The inverse of pq is pq.
converses qp pq converses pq qp The Converse and the Inverse • The converse of pq is qp. • The inverse of pq is pq.
converses qp pq inverses inverses converses pq qp The Converse and the Inverse • The converse of pq is qp. • The inverse of pq is pq.
converses qp pq inverses inverses contra positives converses pq qp The Converse and the Inverse • The converse of pq is qp. • The inverse of pq is pq.
The Biconditional • The statement p qis the biconditionalof p and q. • p q is logically equivalent to (p q) (q p).
Exclusive-Or • The statement p q is the exclusive-or of p and q. • p q is defined by
Exclusive-Or • p q means “one or the other, but not both.” • p q is logically equivalent to (pq) (qp) • p q is also logically equivalent to (p q) • p q is also logically equivalent to (pq) (p q)
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).
The NAND Operator • p| q is defined by
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).
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).
The NOR Operator • p q is defined by
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).