Discrete Structures
Instructor:
Engr Fahad Khalil Paracha
SubmittedBy:
Abdul Quddoos (BCSF19BM039)
UNIVERSITY OF SARGODHA
SUB CAMPUS BHAKKAR
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.
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.
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
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
(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
=
(c) Evaluate MN
M= N=
2 1
MN= 1 1
3 2
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.
(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.
(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.
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.
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
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.
(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.
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.
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.

More Related Content

DOCX
Truth table a.r
DOCX
Exercise 1
PPT
Logic&proof
PPTX
Logic - Logical Propositions
PDF
Discrete Structures lecture 2
PPTX
Truth table
PDF
Logic (slides)
PPT
Logic (PROPOSITIONS)
Truth table a.r
Exercise 1
Logic&proof
Logic - Logical Propositions
Discrete Structures lecture 2
Truth table
Logic (slides)
Logic (PROPOSITIONS)

What's hot (17)

PPTX
LECTURE 2: PROPOSITIONAL EQUIVALENCES
PPTX
PPTX
Mathematical Logic
PPTX
Arguments and methods of proof
PDF
Mathematical Logic
PPT
Mathematical Logic - Part 1
PPT
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
PPT
Truth tables
PPTX
Discrete math Truth Table
PDF
Chapter 1 Logic of Compound Statements
PPTX
3 computing truth tables
DOCX
PPTX
Method of direct proof
PPTX
Logic, contrapositive, converse, Discrete Mathematics, conjunction, negation
PPTX
Logic (LESSON) - Truth Table, Negation, Conjunction, Dis junction,
PPTX
Discrete Mathematics - Propositional Logic
PPT
Prpositional2
LECTURE 2: PROPOSITIONAL EQUIVALENCES
Mathematical Logic
Arguments and methods of proof
Mathematical Logic
Mathematical Logic - Part 1
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Truth tables
Discrete math Truth Table
Chapter 1 Logic of Compound Statements
3 computing truth tables
Method of direct proof
Logic, contrapositive, converse, Discrete Mathematics, conjunction, negation
Logic (LESSON) - Truth Table, Negation, Conjunction, Dis junction,
Discrete Mathematics - Propositional Logic
Prpositional2
Ad

Similar to Discrete Structures (20)

PDF
Maths teachers guide For freshman course.pdf
PDF
Logic and proof
PDF
Discrete mathematic question answers
PPT
IT1101 Mathematics for Computing II 2001
DOCX
Algorithmic foundations.docx
PDF
Fundamentals of logic 1
PPT
CS202Ch1.ppt
PDF
Solutions Manual for Mathematical Proofs A Transition to Advanced Mathematics...
DOCX
Logic worksheet
PDF
slides slides slides slides discrete mat
PDF
Notes discrete math
PDF
Lecture notes in_discrete_mathematics
PPT
Mathematical foundations of computer science
PDF
Logical equivalence, laws of logic
PPTX
DIShshshhshwhwhhCRETE-MATHEMATICS-_2.pptx
PPT
Discrete mathematics by sadat sumon
PPTX
Discreate Truth tables and laws of logic
PPTX
The logic
PPTX
CMSC 56 | Lecture 2: Propositional Equivalences
PDF
Introduction to Discrete Mathematics and computer science Theory
Maths teachers guide For freshman course.pdf
Logic and proof
Discrete mathematic question answers
IT1101 Mathematics for Computing II 2001
Algorithmic foundations.docx
Fundamentals of logic 1
CS202Ch1.ppt
Solutions Manual for Mathematical Proofs A Transition to Advanced Mathematics...
Logic worksheet
slides slides slides slides discrete mat
Notes discrete math
Lecture notes in_discrete_mathematics
Mathematical foundations of computer science
Logical equivalence, laws of logic
DIShshshhshwhwhhCRETE-MATHEMATICS-_2.pptx
Discrete mathematics by sadat sumon
Discreate Truth tables and laws of logic
The logic
CMSC 56 | Lecture 2: Propositional Equivalences
Introduction to Discrete Mathematics and computer science Theory
Ad

Recently uploaded (20)

DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PDF
Hazard Identification & Risk Assessment .pdf
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
Trump Administration's workforce development strategy
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PPTX
Virtual and Augmented Reality in Current Scenario
PPTX
Share_Module_2_Power_conflict_and_negotiation.pptx
PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PPTX
20th Century Theater, Methods, History.pptx
PDF
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PDF
FORM 1 BIOLOGY MIND MAPS and their schemes
PPTX
Computer Architecture Input Output Memory.pptx
PPTX
History, Philosophy and sociology of education (1).pptx
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PDF
Empowerment Technology for Senior High School Guide
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
Hazard Identification & Risk Assessment .pdf
Weekly quiz Compilation Jan -July 25.pdf
Trump Administration's workforce development strategy
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
Chinmaya Tiranga quiz Grand Finale.pdf
Virtual and Augmented Reality in Current Scenario
Share_Module_2_Power_conflict_and_negotiation.pptx
What if we spent less time fighting change, and more time building what’s rig...
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
20th Century Theater, Methods, History.pptx
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
Paper A Mock Exam 9_ Attempt review.pdf.
Practical Manual AGRO-233 Principles and Practices of Natural Farming
FORM 1 BIOLOGY MIND MAPS and their schemes
Computer Architecture Input Output Memory.pptx
History, Philosophy and sociology of education (1).pptx
LDMMIA Reiki Yoga Finals Review Spring Summer
Empowerment Technology for Senior High School Guide

Discrete Structures

  • 1. Discrete Structures Instructor: Engr Fahad Khalil Paracha SubmittedBy: Abdul Quddoos (BCSF19BM039) UNIVERSITY OF SARGODHA SUB CAMPUS BHAKKAR
  • 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 =
  • 7. (c) Evaluate MN M= N= 2 1 MN= 1 1 3 2
  • 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.