Generally, Conditional statements are the if-then statement in which p is called a hypothesis(or antecedent or premise) and q is called a conclusion( or consequence). Conditional Statements symbolized by p, q. A Conditional statement p -> q is false when p is true and q is false, and true otherwise.
What are propositions?
A proposition is a declarative statement that is either true or false, but not both.
Examples:
- Delhi is the capital of India
- 1 + 1 = 2
- 2 + 2 = 4
Let p and q are propositions.
- The conditional statement p -> q is the proposition “if p, then q”.
- The conditional statement p -> q is false when p is true and q is false and true in all other cases.
By the following table, we can identify the values of implications:
p
|
q
|
p -> q
|
T
|
T
|
T
|
T
|
F
|
F
|
F
|
T
|
T
|
F
|
F
|
T
|
Variety of terminology is used to express p -> q
- ” if p then q
- “if p, q “
- “q if p”
- “q when p”
- “q unless p”
- “p implies q”
- “p only if q”
- “q whenever p”
- “q follows from p”
Conditional statements are also called implications. The statement is an implication p -> q is called its hypothesis, and q the conclusion.
Example: Let p be the statement “Maria learn Java Programming ” and q is the statement “Maria will find a good job”. Express the statement p -> q as a statement in English?
Solution:
“If Maria learns java programming, then she will find a good job”.
or
“Maria will find a good job when she learns java programming.”
Converse, Contrapositive, and Inverse
We can form some new conditional statements starting with a conditional statement p -> q.
- The converse of p -> q is the proposition q -> p.
- The contrapositive of p -> q is the proposition ~q -> ~p.
- The inverse of p -> q is the proposition ~p -> ~q.
By the following table, we can identify the values of Converse, Contrapositive, and Inverse:
p
|
q
|
~p
|
~q
|
p -> q
|
~q -> ~p
|
T
|
T
|
F
|
F
|
T
|
T
|
T
|
F
|
F
|
T
|
F
|
F
|
F
|
T
|
T
|
F
|
T
|
T
|
F
|
F
|
T
|
T
|
T
|
T
|
Note: The contrapositive always has the same truth value as p -> q. When two compound propositions always have the same truth value we call them equivalent, so conditional statement and its contrapositive are equivalent. The converse and the inverse of a conditional statement are also equivalent.
Example 1: Show that p -> q and its contrapositive ~q -> ~p are logically equivalent.
Solution:
p
|
q
|
~p
|
~q
|
p -> q
|
~q -> ~p
|
T
|
T
|
F
|
F
|
T
|
T
|
T
|
F
|
F
|
T
|
F
|
F
|
F
|
T
|
T
|
F
|
T
|
T
|
F
|
F
|
T
|
T
|
T
|
T
|
As p ->q is equal to ~q -> ~p, hence both propositions are equivalent.
Example 2: Show that proposition q -> p, and ~p -> ~q is not equivalent to p -> q.
Solution:
p
|
q
|
~p
|
~q
|
p -> q
|
q -> p
|
~p -> ~q
|
T
|
T
|
F
|
F
|
T
|
T
|
T
|
T
|
F
|
F
|
T
|
F
|
T
|
T
|
F
|
T
|
T
|
F
|
T
|
F
|
F
|
F
|
F
|
T
|
T
|
T
|
T
|
T
|
In this case, p -> q is not equal to q -> p and ~p -> ~q, hence they are not equal to p -> q but they themselves are equal.
Example 3: What is contrapositive, the converse, and the inverse of the conditional statement “The home team wins whenever it is raining.”?
Solution:
Because “q whenever p” is one way to express conditional statements p -> q.
Original sentence:
“If it is raining, then the home team wins”.
- Contrapositive: “If the home team does not win, then it is not raining.”
- Converse: “If the home team wins, then it is raining.”
- Inverse: “If it is not raining, then the home team does not win.”
Example 4: What are contrapositive, the converse, and the inverse of the conditional statement “If the picture is a triangle, then it has three sides.”?
Solution:
- Contrapositive: “If the picture doesn’t have three sides, then it is not a triangle.”
- Converse: “If the picture has three sides, then it is a triangle.”
- Inverse: “If the picture is not a triangle, then it doesn’t have three sides.”
Biconditional or Equivalence
- We now introduce another way to combine propositions that express that two propositions have the same truth values.
- Let p and q be propositions.
- The biconditional statement p <-> q is the propositions “p if and only if q”
- The biconditional statement p <-> q is true when p and q have the same truth values and is false otherwise.
- Biconditional statements are also called bi-implications.
- There are some common way to express p<->q
- “p is necessary and sufficient for q”
- “if p then q, and conversely”
- “p if q”.
By the following table, we can identify the values of Biconditional:
p
|
q
|
p <-> q
|
T
|
T
|
T
|
T
|
F
|
F
|
F
|
T
|
F
|
F
|
F
|
T
|
Example: What is the Biconditional of these following sentences. Let p be the statement” You can take the flight” and let q be the statement “You buy a ticket.”
Solution:
p <-> q is “You can take the flight if and only if you buy a ticket”
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape,
GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out -
check it out now!
Last Updated :
19 Jan, 2021
Like Article
Save Article