2. Conditional Statement
Let p and q be propositions. The conditional statement p โ ๐ is
the proposition "if p then q ."
The conditional statement ๐ฉ โ ๐ is false when p is true and q
is false, and true otherwise.
In the conditional statement p โ ๐, p is called the hypothesis
(or antecedent or premise) and q is called the conclusion (or
consequence).
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
Truth Table for the Conditional Statement
P Q P โ ๐
T T T
T F F
F T T
F F T
3. CONVERSE, CONTRAPOSITIVE,AND INVERSE
There are three related conditional statements ๐ โ ๐ that
occur so often that they have special names.
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
Name Symbol Definition
CONVERSE ๐ช โ ๐ The proposition ๐ช โ ๐ is called the
converse of ๐ฉ โ ๐.
CONTRAPOSITIVE ๏๐ โ ๏๐ The proposition ๏๐ โ ๏๐ is
called the contrapositive of ๐ฉ โ ๐.
INVERSE ๏๐ โ ๏๐ The proposition ๏๐ โ ๏๐ is called
the inverse of ๐ฉ โ ๐
4. CONVERSE
Let p and q be propositions. The proposition ๐ช โ ๐ is called
the converse of ๐ฉ โ ๐.
The conditional statement qโ ๐ is false when q is true and p
is false, and true otherwise.
๐ โ ๐ ๐๐๐๐s "if q then p"
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
Truth Table for the Conditional Statement (Converse)
Q P ๐ โ ๐ท
T T T
T F F
F T T
F F T
5. CONTRAPOSITIVE
Let p and q be propositions. The proposition ๏๐ โ ๏๐ is
called the contrapositive of ๐ฉ โ ๐.
๏๐ โ ๏๐ ๐๐๐๐s "if ๏๐ then ๏๐"
The conditional statement ๏๐ โ ๏๐ is false when ๏๐ is true
and ๏๐ is false, and true otherwise.
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
Truth Table for the Conditional Statement (Contrapositive)
Q P ๏๐ ๏๐ ๏๐ โ ๏๐
T T F F T
T F F T T
F T T F F
F F T T T
6. INVERSE
Let p and q be propositions. The proposition ๏๐ โ ๏๐ is
called the inverse of ๐ฉ โ ๐
๏๐โ ๏๐ ๐๐๐๐s "if ๏๐ then ๏q"
The conditional statement ๏๐ โ ๏๐ is false when ๏๐ is true
and ๏๐ is false, and true otherwise.
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
Truth Table for the Conditional Statement (Inverse)
P Q ๏๐ ๏๐ ๏๐ท โ ๏๐
T T F F T
T F F T T
F T T F F
F F T T T
7. Example 1: What are the 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 of the ways to express the
conditional statement p โ ๐ , the original statement can be rewritten as
"If it is raining, then the home team wins.โ
p q
p= It is raining
q= The home team wins
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
Name Symbol Convert Proposition into English Sentence
CONVERSE ๐ช โ ๐ If the home team wins, then it is raining.
๐ช p
CONTRAPOSITIVE ๏๐ โ ๏๐ If the home team does not win, then it is not raining.
๏๐ ๏๐
INVERSE ๏๐ โ ๏๐ If it is not raining, then the home team does not win.
๏๐ ๏๐
8. p= It is raining
q= The home team wins
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
English Sentence Bangla Meaning
The home team wins whenever it is
raining.
เฆฏเฆเฆจเฆ เฆฌเงเฆทเงเฆเฆฟ เฆนเฆฏเฆผ เฆนเฆนเงเฆฎ เฆทเงเฆเฆฟเฆฎ เฆเฆฏเฆผเฆผเง เฆนเฆฏเฆผเฅค
If it is raining, then the home team wins. เฆฏเฆฆเฆฟ เฆฌเงเฆทเงเฆเฆฟ เฆนเฆฏเฆผ, เฆคเงเฆนเฆฒเง เฆนเฆนเงเฆฎ เฆทเงเฆเฆฟเฆฎ เฆเฆเฆคเฆฒเฆฌเฅค
If the home team wins, then it is raining.
CONVERSE
๐ช โ ๐
เฆนเฆนเงเฆฎ เฆทเงเฆเฆฟเฆฎ เฆเฆเฆคเฆฒเง เฆฌเงเฆทเงเฆเฆฟ เฆนเฆฏเฆผเฅค
If the home team does not win, then it is
not raining.
CONTRAPOSITIVE
๏๐ โ ๏๐
เฆนเฆนเงเฆฎ เฆทเงเฆเฆฟเฆฎ เฆจเง เฆเฆเฆคเฆฒเง เฆฌเงเฆทเงเฆเฆฟ เฆนเฆฏเฆผ เฆจเงเฅค
If it is not raining, then the home team
does not win.
INVERSE
๏๐ โ ๏๐
เฆฌเงเฆทเงเฆเฆฟ เฆจเง เฆนเฆฒเง เฆนเฆนเงเฆฎ เฆทเงเฆเฆฟเฆฎ เฆเฆเฆคเฆฒเฆฌ เฆจเงเฅค
9. Tautology, Contradiction and Contingency
๏ฑ A compound proposition that is always true, no matter what the
true values of the proposition that occur in it , is called tautology.
๏ฑ A compound proposition that is always false is called
contradiction.
๏ฑ A compound proposition that is neither a tautology nor a
contradiction is called a contingency.
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
10. Logical Equivalence
Compound proposition that have the same true values in all
possible cases are called logically equivalent. The compound
propositions p and q are called logically equivalent if p ๏ซ q is a
tautology. The notation p โก q denotes that p and q are logically
equivalent.
Question: Show that ยฌ(๐ห ๐)โกยฌ๐โยฌQ
From the truth table we can say that, ยฌ(๐ห ๐)โก ยฌ๐โยฌ Q
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
11. Question: Show that ยฌ๐ทห ๐ธ โก ๐ท โ ๐ธ
P Q ยฌ๐ ยฌ๐ห ๐ ๐ โ ๐
T T F T T
T F F F F
F T T T T
F F T T T
From the truth table we can say that,
ยฌ๐ทห ๐ธ โก ๐ท โ ๐ธ
12. Question: Show that (Pโ๐ธ) โ (๐ทห ๐ธ)is a tautology
P Q (Pโ๐) (๐ห ๐) (Pโ๐) โ (๐ห ๐)
T T T T T
T F F T T
F T F T T
F F F F T
From the truth table we can say that, the true value of (Pโ๐ธ) โ
(๐ทห ๐ธ) is all true so it is tautology.
13. Question: Check whether (Pโ ๐ธ)โ(Qโ ๐น) โ (P โ ๐น)is tautologyor
not.
P Q R (Pโ ๐) (Pโ ๐ ) (๐ธ โ ๐ ) (Pโ ๐)โ(Qโ ๐ ) (Pโ ๐)โ(Qโ ๐ ) โ (P โ ๐ )
T T T T T T T T
T T F T F F F T
T F T F T T F T
T F F F F T F T
F T T T T T T T
F T F T T F F T
F F T T T T T T
F F F T T T T T
From the truth table we can say that, the true value of (Pโ๐) โ
(๐ห ๐) is all true so it is tautology.
14. Precedence of Logical Operators
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
Precedence of Logical Operators. P๏ซQ
Operator Operation Precedence
๏ Negation 1
๏ Conjunction 2
๏ Disjunction 3
โ Conditional 4
๏ซ Biconditional/ Bi-
implications
5
15. Question: How many rows appear in a truth table for
each of these compound propositions?
****Formula: Input=n, No. of rows=๐๐****
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
Question
Solutions
Input No. of
Input
(n)
No. of
rows
(๐๐
)
No. of columns
1. Pโ ๏P P 1 ๐๐
=2 3
Columns Heading: P, ๏P, Pโ ๏P
2. (P๏ ยฌ๐)โ(๐๏ ๐) P,Q 2 ๐๐
=4 6
Columns Heading: P, Q, ยฌ๐, (P๏ ยฌ๐), (๐๏ ๐), (P๏ ยฌ๐)โ(๐๏ ๐)
3. (P ๏ R)๏T ๏ซ (Q ๏ T) P,Q,R,T 4 ๐๐=16 8
Columns Heading: P,Q,R,T, (P ๏ R) ,(P ๏ R)๏T ), (Q ๏ T), (P ๏ R)๏T ๏ซ (Q ๏ T)
4. (P ๏ ๏R) ๏ (Q๏ ๏๐) P,Q,R,S 4 ๐๐=16 9
Columns Heading: P,Q,R,S, ๏R , ๏๐, (P ๏ ๏R) , (Q๏ ๏๐) , (P ๏ ๏R) ๏ (Q๏ ๏๐)
16. Construct Truth Table For (๐ท๏ยฌ๐ธ) โ (๐ทโ๐ธ)
Input Output
P Q ยฌ๐ธ (๐ท๏ยฌ๐ธ) (๐ทโ๐ธ) (๐ท๏ยฌ๐ธ) โ (๐ทโ๐ธ)
T T F T T T
T F T T F F
F T F F F T
F F T T F F
Prepared by Khairun Nahar,Assistant Professor,
Department of CSE, Comilla University
No. of Input=2, No. of rows=๐๐ = ๐
No. of Columns=6