This is the midterm paper. if some questions are favourable for you follow me.
Follow me on youtube: https://www.youtube.com/channel/UCP8iyUsyciJJc0o5sj0X3tA
2. Q# 01
¬(p→q) is logically equivalent to p↔¬q?
p q ¬q p↔q ¬(p↔q) (p↔¬q)
T T F T F F
T F T F T T
F T F F T T
F F T T F F
They are logically equivalent.
3. Q#02
(p→q) ᴠ(p→r) is logically equivalent to p→(qvr)
or not?
P q r p→q p→r (p→q) v (p→r) qᴠr p→(qᴠr)
T T T T T T T T
T T F T F T T T
T F T F T T T T
T F F F F F F F
F T T T T T T T
F T F T T T T T
F F T T T T T T
F F F T T T F T
These are logically equivalent.
4. Q# 03
Matrix operations,
Let, 1 0 1 1
M= 1 1 0 0
0 1 1 1
0 0
1 1
N= 1 0
1 1
(a)
(i) M AND NT
NT
=
0+0+1+1 1+0+1+1 1+0+1+1 1+0+1+1
M AND NT
= 0+0+0+0 1+1+0+0 1+0+0+0 1+1+0+0
0+0+1+1 0+1+1+1 0+0+1+1 0+1+1+1
5. 2 3 3 3
M AND NT
= 0 2 1 2
2 3 2 3
(ii) M OR NT
M OR NT
=
1+0 0+1 1+1 1+1
= 1+0 1+1 0+0 0+1
0 1 1 1
1 1 2 2
= 1 2 0 1
0 1 1 1
6. (iii) NOT M (iv) NOT N
M= N=
0 1 0 0 1 1
NOT M= 0 0 1 1 NOT N= 0 0
1 0 0 0 0 1
0 0
(b) Evaluate (4N)T
T
(4N)T
= 4
0 4 4 4
0 4 0 4
=
8. Q# 4 Use truth tables to verify the following are logically
equivalent.
(A) p→q = ¬p ᴠ q
p q ¬p p→q ¬p v q
T T F T T
T F F F F
F T T T T
F F T T F
It is equivalent.
(B) ¬(p→q) = pᴧ¬q
p q ¬q p→q ¬(p→q) pᴧ¬q
T T F T F F
T F T F T T
F T F T F F
F F T T F F
They are equivalent.
9. (c) Check whether these are equivalent.
p→(q→r) and (p→q) →r.
p q r q→r p→(q→r) (p→q) (p→q) →r
T T T T T T T
T T F F F T F
T F T T T F T
T F F T T F T
F T T T T T T
F T F F F T F
F F T T T T T
F F F T T T F
They are not equivalent.
10. (d) Check whether these are logically equivalent.
p→(qᴠr), (pᴧ¬q) →r, (pᴧ¬r) →q
p q r ¬q ¬r qᴠr pᴧ¬q pᴧ¬r p→(qᴠr) (pᴧ¬q)→r (pᴧ¬r)→q
T T T F F T F F T T T
T T F F T T F T T T T
T F T T F T T F T T T
T F F T T F T T F F F
F T T F F T F F T T T
F T F F T T F F T T T
F F T T F T F F T T T
F F F T T F F F T T T
These are Logically equal.
11. Q#05) Write converse, inverse, and contrapositive of
each of the following.
(a) If P is a square, then P is rectangular?
Solution:
Let,
‘Q’ be ‘P’ is a square and ‘R’ be ‘P’ is a rectangle,
Then we have:
Q→R
= ¬QᴠR
= ¬(¬QᴠR)
= Qᴧ¬R
This, proves P is a square and not a rectangle.
Contrapositive:
¬R→¬Q
If, P is not a rectangle,
then, P is not a square.
12. Converse:
R→Q
If, P is a rectangle,
then, P is a square.
Inverse:
¬Q→¬R
If, P is not a square,
then, P is not a rectangle.
(b) If n is prime, then n is odd or n is 2?
Solution:
Let, ‘Q’ be ‘n’ prime
‘R’ be ‘n’ odd or ‘n’ is 2.
Then we have,
Q→R
= ¬QᴠR
= ¬(¬QᴠR)
= Qᴧ¬R
13. If, we negate ‘R’ we have,
¬ (n is odd ᴠ n is 2)
= ¬ (n is odd) ᴧ¬ (n is 2)
Which translates to ‘n’ is even and ‘n’ is not 2.
Converse:
If ‘n’ is odd or ‘n’ is 2
then ‘n’ is prime.
Inverse:
If ‘n’ is not prime,
then ’n’ is not odd and ‘n’ is not 2.
Contrapositive:
If ‘n’ is not odd and not 2,
then ‘n’ is not prime.
14. (c) If n is divisible by 6, then n is divisible by 2 and
is divisible by 3.
Solution:
Let,
‘Q’ be ‘n’ and ‘R’ be ‘n’ is 2 or n 3.
Then we have,
Q→R
= ¬QᴠR
= ¬(¬QᴠR)
= Q ᴧ ¬R
Converse:
If ‘n’ is divisible by 2 and ‘n’ is divisible by 3,
then ‘n’ is divisible by 6.
Inverse:
If ‘n’ is not divisible by 6,
then ‘n’ is not divisible by 2 or ‘n’ is not
divisible by 3.
15. Contrapositive:
If ‘n’ is not divisible by 2 and ‘n’ is not
divisible by 3,
then ‘n’ is not divisible by 6.
(d) If Ch. Allah Ditta is Aslam father, then Ch. Noor Khan
is his uncle and Salima Bibi is his aunt?
Let,
‘Q’ be Ch. Allah Ditta is Aslam’s father and ‘R’ be
Noor Khan is his uncle and Salima Bibi is his aunt.
Thus, as before,
¬(Q→R) = Qᴧ¬R
If we negate ‘R’, we have
¬ (Noor Khan is his uncle and Salima Bibi is his aunt)
¬ (Noor Khan is his uncle) ᴠ (Salima Bibi is his aunt)
Which translate Ch Noor Khan is not his uncle or Salima
Bibi is not his aunt.
16. Converse:
If Ch. Noor Khan is his uncle and Salima is
aunt, then Ch. Allah Ditta is Aslam’s father.
Inverse:
If Ch. Allah Ditta is Aslam’s father, then Noor
Khan is not his uncle or Salima Bibi is not his aunt.
Contrapositive:
If Noor Khan is not Aslam’s uncle or
Salima is not his aunt then Ch. Allah Ditta is not his
father.