Sie sind auf Seite 1von 9

Three Conditional Statement

1. The proposition q → p is called the converse of p → q.


2. The contrapositive of p → q is the proposition ¬q →¬p.
3. The proposition ¬p →¬q is called the inverse of p → q.

We will see that of these three conditional statements formed


from p → q, only the contrapositive always has the same truth
value as p → q.
The Truth Table for the The Truth Table for contrapositive of
Conditional statement p p → q.
→ q.
p q ¬p ¬q ¬q → ¬p
p q p→q
T T
T T
T F
T F
F T F T

F F F F

The Truth Table for inverse of p → q.


The Truth Table for
converse of p → q.
q p q→p p q ¬p ¬q ¬p → ¬q
T T T T
T F T F
F T F T
F F F F
Three Conditional Statement

Example:
What are the contrapositive, the converse, and the inverse
of the conditional statement “The home team wins
whenever it is raining?”
Compound Proposition

6. Let p and q be propositions. The biconditional


statement p ↔ q is the proposition “p if and
only if q.”
The Truth Table for the The biconditional
Conditional statement
p↔q.
statement p ↔ q is true
p q p↔q
when p and q have the
T T
same truth values, and is
T F
false otherwise.
F T
F F
Compound Proposition

Common ways to express p ↔ q:


“p is necessary and sufficient for q”
“if p then q, and conversely”
“p iff q.”
Example.
Let p be the statement “You can take the flight,”
and let q be the statement “You buy a ticket.”
Express the statement ↔ .
Exercises:

1. Let p and q be the propositions “Swimming at the New Jersey shore


is allowed” and “Sharks have been spotted near the shore,”
respectively. Express each of these compound propositions as an
English sentence.
a. ¬q
b. p∧q
c. ¬p ∨ q
d. p →¬q
e. ¬q → p
f. ¬p →¬q
g. p ↔¬q
h. ¬p ∧ (p∨ ¬q)
Exercises

3. Let p and q be the propositions


p : It is below freezing.
q : It is snowing.
Write these propositions using p and q and logical connectives (including negations).
a. It is below freezing and snowing.
b. It is below freezing but not snowing.
c. It is not below freezing and it is not snowing.
d. It is either snowing or below freezing (or both).
e. If it is below freezing, it is also snowing.
f. Either it is below freezing or it is snowing, but it is not snowing if it is below freezing.
g. That it is below freezing is necessary and sufficient for it to be snowing.
Exercises

5. Determine whether these biconditionals are true or false.


a. 2 + 2 = 4 if and only if 1 + 1 = 2.
b. 1 + 1 = 2 if and only if 2 + 3 = 4.
c. 1 + 1 = 3 if and only if monkeys can fly.
d. 0 > 1 if and only if 2 > 1.
Exercises

7. What is the value of x after each of these statements is


encountered in a computer program, if x = 1 before the statement
is reached?
a) if x + 2 = 3 then x := x + 1
b) if (x + 1 = 3) OR (2x + 2 = 3) then x := x + 1
c) if (2x + 3 = 5) AND (3x + 4 = 7) then x := x + 1
d) if (x + 1 = 2) XOR (x + 2 = 3) then x := x + 1
e) if x < 2 then x := x + 1

Das könnte Ihnen auch gefallen