SlideShare a Scribd company logo
1 of 16
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

What's hot

Arguments and methods of proof
Arguments and methods of proofArguments and methods of proof
Arguments and methods of proofRobert Geofroy
 
Mathematical Logic - Part 1
Mathematical Logic - Part 1Mathematical Logic - Part 1
Mathematical Logic - Part 1blaircomp2003
 
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكروDiscrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكروDr. Khaled Bakro
 
Truth tables
Truth tablesTruth tables
Truth tableswalkerlj
 
Chapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound StatementsChapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound Statementsguestd166eb5
 
Method of direct proof
Method of direct proofMethod of direct proof
Method of direct proofAbdur Rehman
 
Logic, contrapositive, converse, Discrete Mathematics, conjunction, negation
Logic, contrapositive, converse, Discrete Mathematics, conjunction, negationLogic, contrapositive, converse, Discrete Mathematics, conjunction, negation
Logic, contrapositive, converse, Discrete Mathematics, conjunction, negationZaidAly1
 
Logic (LESSON) - Truth Table, Negation, Conjunction, Dis junction,
Logic (LESSON) - Truth Table, Negation, Conjunction, Dis junction, Logic (LESSON) - Truth Table, Negation, Conjunction, Dis junction,
Logic (LESSON) - Truth Table, Negation, Conjunction, Dis junction, Ria Micor
 
Discrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional LogicDiscrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional LogicUniversity of Potsdam
 

What's hot (17)

LECTURE 2: PROPOSITIONAL EQUIVALENCES
LECTURE 2: PROPOSITIONAL EQUIVALENCESLECTURE 2: PROPOSITIONAL EQUIVALENCES
LECTURE 2: PROPOSITIONAL EQUIVALENCES
 
Truth table
Truth tableTruth table
Truth table
 
Mathematical Logic
Mathematical LogicMathematical Logic
Mathematical Logic
 
Arguments and methods of proof
Arguments and methods of proofArguments and methods of proof
Arguments and methods of proof
 
Mathematical Logic
Mathematical LogicMathematical Logic
Mathematical Logic
 
Mathematical Logic - Part 1
Mathematical Logic - Part 1Mathematical Logic - Part 1
Mathematical Logic - Part 1
 
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكروDiscrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
 
Truth tables
Truth tablesTruth tables
Truth tables
 
Discrete math Truth Table
Discrete math Truth TableDiscrete math Truth Table
Discrete math Truth Table
 
Chapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound StatementsChapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound Statements
 
3 computing truth tables
3   computing truth tables3   computing truth tables
3 computing truth tables
 
LOGIC
LOGICLOGIC
LOGIC
 
Method of direct proof
Method of direct proofMethod of direct proof
Method of direct proof
 
Logic, contrapositive, converse, Discrete Mathematics, conjunction, negation
Logic, contrapositive, converse, Discrete Mathematics, conjunction, negationLogic, contrapositive, converse, Discrete Mathematics, conjunction, negation
Logic, contrapositive, converse, Discrete Mathematics, conjunction, negation
 
Logic (LESSON) - Truth Table, Negation, Conjunction, Dis junction,
Logic (LESSON) - Truth Table, Negation, Conjunction, Dis junction, Logic (LESSON) - Truth Table, Negation, Conjunction, Dis junction,
Logic (LESSON) - Truth Table, Negation, Conjunction, Dis junction,
 
Discrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional LogicDiscrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional Logic
 
Prpositional2
Prpositional2Prpositional2
Prpositional2
 

Similar to Discrete Structures

Logic and proof
Logic and proofLogic and proof
Logic and proofSuresh Ram
 
UNIT-III-PPT.pptx
UNIT-III-PPT.pptxUNIT-III-PPT.pptx
UNIT-III-PPT.pptxDakshBaveja
 
Math 189 Exam 1 Solutions
Math 189 Exam 1 SolutionsMath 189 Exam 1 Solutions
Math 189 Exam 1 SolutionsTyler Murphy
 
Truth, deduction, computation lecture 6
Truth, deduction, computation   lecture 6Truth, deduction, computation   lecture 6
Truth, deduction, computation lecture 6Vlad Patryshev
 
Laws of Logic in Discrete Structures and their applications
Laws of Logic in Discrete Structures and their applicationsLaws of Logic in Discrete Structures and their applications
Laws of Logic in Discrete Structures and their applicationsZenLooper
 
Discrete mathematic question answers
Discrete mathematic question answersDiscrete mathematic question answers
Discrete mathematic question answersSamet öztoprak
 
logic, preposition etc
logic, preposition etclogic, preposition etc
logic, preposition etcAbdur Rehman
 
Lecture_3_Chapter_1_Lesson_1.2.pptx
Lecture_3_Chapter_1_Lesson_1.2.pptxLecture_3_Chapter_1_Lesson_1.2.pptx
Lecture_3_Chapter_1_Lesson_1.2.pptxHomer53
 
Nature of Logic.pptx
Nature of Logic.pptxNature of Logic.pptx
Nature of Logic.pptxMath101BSCA1C
 
UGC NET Computer Science & Application book.pdf [Sample]
UGC NET Computer Science & Application book.pdf  [Sample]UGC NET Computer Science & Application book.pdf  [Sample]
UGC NET Computer Science & Application book.pdf [Sample]DIwakar Rajput
 
Maths teachers guide For freshman course.pdf
Maths teachers guide For freshman course.pdfMaths teachers guide For freshman course.pdf
Maths teachers guide For freshman course.pdfhabtamu292245
 
Solutions Manual for Mathematical Proofs A Transition to Advanced Mathematics...
Solutions Manual for Mathematical Proofs A Transition to Advanced Mathematics...Solutions Manual for Mathematical Proofs A Transition to Advanced Mathematics...
Solutions Manual for Mathematical Proofs A Transition to Advanced Mathematics...riven058
 
L4-IntroducClick to edit Master title styletion to logic.pptx
L4-IntroducClick to edit Master title styletion to logic.pptxL4-IntroducClick to edit Master title styletion to logic.pptx
L4-IntroducClick to edit Master title styletion to logic.pptxFahmiOlayah
 
Discrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part IDiscrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part IWongyos Keardsri
 
Discrete mathematics
Discrete mathematicsDiscrete mathematics
Discrete mathematicsM.Saber
 
CSE-203 Lec_1.pptx
CSE-203 Lec_1.pptxCSE-203 Lec_1.pptx
CSE-203 Lec_1.pptxMahdiHasan86
 

Similar to Discrete Structures (20)

Logic and proof
Logic and proofLogic and proof
Logic and proof
 
UNIT-III-PPT.pptx
UNIT-III-PPT.pptxUNIT-III-PPT.pptx
UNIT-III-PPT.pptx
 
Math 189 Exam 1 Solutions
Math 189 Exam 1 SolutionsMath 189 Exam 1 Solutions
Math 189 Exam 1 Solutions
 
Truth, deduction, computation lecture 6
Truth, deduction, computation   lecture 6Truth, deduction, computation   lecture 6
Truth, deduction, computation lecture 6
 
Laws of Logic in Discrete Structures and their applications
Laws of Logic in Discrete Structures and their applicationsLaws of Logic in Discrete Structures and their applications
Laws of Logic in Discrete Structures and their applications
 
Discrete mathematic question answers
Discrete mathematic question answersDiscrete mathematic question answers
Discrete mathematic question answers
 
logic, preposition etc
logic, preposition etclogic, preposition etc
logic, preposition etc
 
CS202Ch1.ppt
CS202Ch1.pptCS202Ch1.ppt
CS202Ch1.ppt
 
Lecture_3_Chapter_1_Lesson_1.2.pptx
Lecture_3_Chapter_1_Lesson_1.2.pptxLecture_3_Chapter_1_Lesson_1.2.pptx
Lecture_3_Chapter_1_Lesson_1.2.pptx
 
Nature of Logic.pptx
Nature of Logic.pptxNature of Logic.pptx
Nature of Logic.pptx
 
UGC NET Computer Science & Application book.pdf [Sample]
UGC NET Computer Science & Application book.pdf  [Sample]UGC NET Computer Science & Application book.pdf  [Sample]
UGC NET Computer Science & Application book.pdf [Sample]
 
Logic parti
Logic partiLogic parti
Logic parti
 
The logic
The logicThe logic
The logic
 
Maths teachers guide For freshman course.pdf
Maths teachers guide For freshman course.pdfMaths teachers guide For freshman course.pdf
Maths teachers guide For freshman course.pdf
 
Solutions Manual for Mathematical Proofs A Transition to Advanced Mathematics...
Solutions Manual for Mathematical Proofs A Transition to Advanced Mathematics...Solutions Manual for Mathematical Proofs A Transition to Advanced Mathematics...
Solutions Manual for Mathematical Proofs A Transition to Advanced Mathematics...
 
L4-IntroducClick to edit Master title styletion to logic.pptx
L4-IntroducClick to edit Master title styletion to logic.pptxL4-IntroducClick to edit Master title styletion to logic.pptx
L4-IntroducClick to edit Master title styletion to logic.pptx
 
Discrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part IDiscrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part I
 
Discrete mathematics
Discrete mathematicsDiscrete mathematics
Discrete mathematics
 
CSE-203 Lec_1.pptx
CSE-203 Lec_1.pptxCSE-203 Lec_1.pptx
CSE-203 Lec_1.pptx
 
Logic2.pptx
Logic2.pptxLogic2.pptx
Logic2.pptx
 

Recently uploaded

Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 

Recently uploaded (20)

Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 

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.