Javatpoint Logo
Javatpoint Logo

Conditional and BiConditional Statements

Conditional Statement

Let p and q are two statements then "if p then q" is a compound statement, denoted by p→ q and referred as a conditional statement, or implication. The implication p→ q is false only when p is true, and q is false; otherwise, it is always true. In this implication, p is called the hypothesis (or antecedent) and q is called the conclusion (or consequent).

p q p → q
T T T
T F F
F T T
F F T

For Example: The followings are conditional statements.

  1. If a = b and b = c, then a = c.
  2. If I get money, then I will purchase a computer.

Variations in Conditional Statement

Contrapositive: The proposition ~q→~p is called contrapositive of p →q.

Converse: The proposition q→p is called the converse of p →q.

Inverse: The proposition ~p→~q is called the inverse of p →q.

Example1: Show that p →q and its contrapositive ~q→~p are logically equivalent.

Solution: Construct the truth table for both the propositions:

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, the values in both cases are same, hence both propositions are equivalent.

Example2: Show that proposition q→p, and ~p→~q is not equivalent to p →q.

Solution: Construct the truth table for all the above propositions:

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

As, the values of p →q in a table is not equal to q→p and ~p→~q as in fig. So both of them are not equal to p →q, but they are themselves logically equivalent.

BiConditional Statement

If p and q are two statements then "p if and only if q" is a compound statement, denoted as p ↔ q and referred as a biconditional statement or an equivalence. The equivalence p ↔ q is true only when both p and q are true or when both p and q are false.

p q p ↔ q
T T T
T F F
F T F
F F T

For Example: (i) Two lines are parallel if and only if they have the same slope.
(ii) You will pass the exam if and only if you will work hard.

Example: Prove that p ↔ q is equivalent to (p →q) ∧(q→p).

Solution: Construct the truth table for both the propositions:

p q p ↔ q
T T T
T F F
F T F
F F T

p q p →q q→p (p →q)∧(q→p)
T T T T T
T F F T F
F T T F F
F F T T T

Since, the truth tables are the same, hence they are logically equivalent. Hence Proved.

Principle of Duality

Two formulas A1 and A2 are said to be duals of each other if either one can be obtained from the other by replacing ∧ (AND) by ∨ (OR) by ∧ (AND). Also if the formula contains T (True) or F (False), then we replace T by F and F by T to obtain the dual.

Note1: The two connectives ∧ and ∨ are called dual of each other.
2. Like AND and OR, ↑ (NAND) and ↓ (NOR) are dual of each other.
3. If any formula of the proposition is valid, then it's dual of each other.

Equivalence of Propositions

Two propositions are said to be logically equivalent if they have exactly the same truth values under all circumstances.

The table1 contains the fundamental logical equivalent expressions:

Laws of the algebra of propositions

Idempotent laws (i) p ∨ p≅p (ii) p ∧ p≅p
Associative laws (i) (p ∨ q) ∨ r ≅ p∨ (q ∨ r) (ii) (p ∧ q) ∧ r ≅ p ∧ (q ∧ r)
Commutative laws (i) p ∨ q ≅ q ∨ p (ii) p ∧ q ≅ q ∧ p
Distributive laws (i) p ∨ (q ∧ r) ≅ (p ∨ q) ∧ (p ∨ r) (ii) p ∧ (q ∨ r) ≅ (p ∧ q) ∨ (p ∧ r)
Identity laws (i)p ∨ F ≅ p
(iv) p ∧ F≅F
(ii) p ∧ T≅ p
(iii) p ∨ T ≅ T
Involution laws (i) ¬¬p ≅ p
Complement laws (i) p ∨ ¬p ≅ T (ii) p ∧ ¬p ≅ T
DeMorgan's laws: (i) ¬(p ∨ q) ≅ ¬p ∧ ¬q (ii) ¬(p ∧ q) ≅¬p ∨ ¬q

Example: Consider the following propositions

Are they equivalent?

Solution: Construct the truth table for both

p q ~p ~q ~p∨∼q p∧q ~(p∧q)
T T F F F T F
T F F T T F T
F T T F T F T
F F T T T F T





Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


B.Tech / MCA