SlideShare a Scribd company logo
1 of 27
Discrete Structures
BSCS (3 Credit Hour)
Lecture # 02
Truth tables
 Truth tables for:
~ p  q
~ p  (q  ~ r)
(p  q)  ~ (p  q)
Truth table for the statement form ~ p  q
p q ~p ~ p  q
T T F F
T F F F
F T T T
F F T F
Truth table for ~ p  (q  ~ r)
p q r ~ r q  ~ r ~ p ~ p  (q  ~ r)
T T T F T F F
T T F T T F F
T F T F F F F
T F F T T F F
F T T F T T T
F T F T T T T
F F T F F T F
F F F T T T T
Truth table for (p  q)  ~ (p  q)
p q p  q p  q ~ (pq) (p  q)  ~ (p  q)
T T T T F F
T F T F T T
F T T F T T
F F F F T F
Double Negative Property ~(~p)  p
p ~p ~(~p)
T F T
F T F
Example:
 “It is not true that I am not happy”
 Prove it double negation property for the above
statement ~ (~p)  p
 Solution:
Let p = “I am happy”
Then ~p = “I am not happy”
and ~(~ p) = “It is not true that I am not happy”
Since ~ (~p)  p
Hence the given statement is equivalent to:
“I am happy”
~ (p  q) and ~p  ~q are not logically
equivalent
~ (p  q) and ~p  ~q are not logically
equivalent
p q ~p ~q p  q ~(pq) ~p  ~q
T T F F T F F
T F F T F T F
F T T F F T F
F F T T F T T
DE MORGAN’S LAWS:
 The negation of an and statement is logically
equivalent to the or statement in which each
component is negated.
Symbolically: ~(p  q)  ~p  ~q.
 The negation of an or statement is logically
equivalent to the and statement in which each
component is negated.
Symbolically: ~(p  q)  ~p  ~q.
Truth Table for ~(p  q)  ~p  ~q
Truth Table for ~(p  q)  ~p  ~q
p q ~p ~q p  q ~(p  q) ~p  ~q
T T F F T F F
T F F T T F F
F T T F T F F
F F T T F T T
Application of De morgan’s Law using
statements:
 Give negations for each of the following
statements:
The fan is slow or it is very hot.
Akram is unfit and Saleem is injured.
 Solution: ?
Application of De morgan’s Law using
statements:
 Give negations for each of the following
statements:
The fan is slow or it is very hot.
Akram is unfit and Saleem is injured.
 Solution:
The fan is not slow and it is not very hot.
Akram is not unfit or Saleem is not injured.
Exercise:
Associative Law
 Are the statements (p  q)  r  p  (q  r) logically
equivalent?
 Are the statements (p  q)  r  p  (q  r) logically
equivalent?
TAUTOLOGY:
 A tautology is a statement form that is always true
regardless of the truth values of the statement
variables.
 A tautology is represented by the symbol “T”..
 EXAMPLE:
The statement form p  ~ p is tautology
p  ~p  t
p ~ p p  ~ p
T F T
F T T
CONTRADICTION:
 A contradiction is a statement form that is always
false regardless of the truth values of the statement
variables.
 A contradiction is represented by the symbol “c”.
 Note:
So if we have to prove that a given statement form is
CONTRADICTION we will make the truth table for
the statement form and if in the column of the given
statement form all the entries are F ,then we say that
statement form is contradiction.
EXAMPLE:
 The statement form p  ~ p is a contradiction.
 Since in the last column in the truth table we have F
in all the entries so is a contradiction
p  ~p c
p ~ p p  ~ p
T F F
F T F
REMARKS:
 Most statements are neither tautologies nor
contradictions.
 The negation of a tautology is a contradiction and vice
versa.
LOGICAL EQUIVALENCE INVOLVING
TAUTOLOGY
 Show that p  t  p
 Since in the above table the entries in the first and
last columns are identical so we have the
corresponding statement forms are Logically
Equivalent that is
p  t  p
p t p  t
T T T
F T F
LOGICAL EQUIVALENCE INVOLVING
CONTRADICTION
 Show that p  c  c
 Same truth values in the indicated columns so pc 
c
p c p  c
T F F
F F F
EXERCISE:
 Use truth table to show that (p  q)  (~p  (p  ~q))
is a tautology.
 Use truth table to show that (p  ~q)  (~p  q) is a
contradiction.
INEQUALITIES AND DEMORGAN’S LAWS
 Use De-Morgan’s Laws to write the negation of
-1 < x  4
-1 < x  4 means x > –1 and x  4
By DeMorgan’s Law, the negation is:
Which is equivalent to: x  –1 or x > 4
LAWS OF LOGIC
 Given any statement variables p, q and r, a tautology
t and a contradiction c, the following logical
equivalences hold:
 Commutative Laws: p  q  q  p
p  q  q  p
 Associative Laws: (p  q)  r  p  (q  r)
(p  q)  r  p  (q  r)
 Distributive Law: p  (q  r)  (p  q)  (p  r)
p  (q  r)  (p  q)  (p  r)
 Identity Laws: p  t  p
p  c  p
 Negation Laws: p  ~ p  t
p  ~ p  c
 Double Negation Law: ~ (~p)  p
 Idempotent Laws: p  p  p
p  p  p
 De Morgan’s Laws: ~(p  q)  ~p  ~q
~(p  q)  ~p  ~q
 Universal Bound Law: p  t  t
p  c  c
 Absorptions Laws: p  (p  q)  p
p  (p  q)  p
 Negation of t and c: ~ t  c
~ c  t

More Related Content

Similar to Discreate Truth tables and laws of logic

Chapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound StatementsChapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound Statementsguestd166eb5
 
Logic and proof
Logic and proofLogic and proof
Logic and proofSuresh Ram
 
Assignement of discrete mathematics
Assignement of discrete mathematicsAssignement of discrete mathematics
Assignement of discrete mathematicsSyed Umair
 
Assignement of discrete mathematics
Assignement of discrete mathematicsAssignement of discrete mathematics
Assignement of discrete mathematicsSyed Umair
 
Propositional logic by shawan
Propositional logic by shawanPropositional logic by shawan
Propositional logic by shawanTouhidul Shawan
 
Nature of Logic.pptx
Nature of Logic.pptxNature of Logic.pptx
Nature of Logic.pptxMath101BSCA1C
 
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
 
logicproof-141212042039-conversion-gate01.pdf
logicproof-141212042039-conversion-gate01.pdflogicproof-141212042039-conversion-gate01.pdf
logicproof-141212042039-conversion-gate01.pdfPradeeshSAI
 
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
 
UNIT-III-PPT.pptx
UNIT-III-PPT.pptxUNIT-III-PPT.pptx
UNIT-III-PPT.pptxDakshBaveja
 
Phase 1 task 2 - schwappach
Phase 1   task 2 - schwappachPhase 1   task 2 - schwappach
Phase 1 task 2 - schwappachLoren Schwappach
 
MFCS PPT.pdf
MFCS PPT.pdfMFCS PPT.pdf
MFCS PPT.pdfjayarao21
 

Similar to Discreate Truth tables and laws of logic (20)

Chapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound StatementsChapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound Statements
 
Truth table analysis
Truth table analysisTruth table analysis
Truth table analysis
 
Logic and proof
Logic and proofLogic and proof
Logic and proof
 
CS202Ch1.ppt
CS202Ch1.pptCS202Ch1.ppt
CS202Ch1.ppt
 
Assignement of discrete mathematics
Assignement of discrete mathematicsAssignement of discrete mathematics
Assignement of discrete mathematics
 
Assignement of discrete mathematics
Assignement of discrete mathematicsAssignement of discrete mathematics
Assignement of discrete mathematics
 
Discrete mathematics
Discrete mathematicsDiscrete mathematics
Discrete mathematics
 
Propositional logic by shawan
Propositional logic by shawanPropositional logic by shawan
Propositional logic by shawan
 
logic_lec4.ppt
logic_lec4.pptlogic_lec4.ppt
logic_lec4.ppt
 
Nature of Logic.pptx
Nature of Logic.pptxNature of Logic.pptx
Nature of Logic.pptx
 
Formal Logic - Lesson 5 - Logical Equivalence
Formal Logic - Lesson 5 - Logical EquivalenceFormal Logic - Lesson 5 - Logical Equivalence
Formal Logic - Lesson 5 - Logical Equivalence
 
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
 
logicproof-141212042039-conversion-gate01.pdf
logicproof-141212042039-conversion-gate01.pdflogicproof-141212042039-conversion-gate01.pdf
logicproof-141212042039-conversion-gate01.pdf
 
Per3 logika&amp;pembuktian
Per3 logika&amp;pembuktianPer3 logika&amp;pembuktian
Per3 logika&amp;pembuktian
 
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&proof
Logic&proofLogic&proof
Logic&proof
 
Mathematical Logic
Mathematical LogicMathematical Logic
Mathematical Logic
 
UNIT-III-PPT.pptx
UNIT-III-PPT.pptxUNIT-III-PPT.pptx
UNIT-III-PPT.pptx
 
Phase 1 task 2 - schwappach
Phase 1   task 2 - schwappachPhase 1   task 2 - schwappach
Phase 1 task 2 - schwappach
 
MFCS PPT.pdf
MFCS PPT.pdfMFCS PPT.pdf
MFCS PPT.pdf
 

More from ZenLooper

Managing External Environment and Organizational Culture.pdf
Managing External Environment and Organizational Culture.pdfManaging External Environment and Organizational Culture.pdf
Managing External Environment and Organizational Culture.pdfZenLooper
 
Planning Work Activities and their benefits.pdf
Planning Work Activities and their benefits.pdfPlanning Work Activities and their benefits.pdf
Planning Work Activities and their benefits.pdfZenLooper
 
Managers as Decision Makersstoiiiiii.pdf
Managers as Decision Makersstoiiiiii.pdfManagers as Decision Makersstoiiiiii.pdf
Managers as Decision Makersstoiiiiii.pdfZenLooper
 
rules of inference in discrete structures
rules of inference in discrete structuresrules of inference in discrete structures
rules of inference in discrete structuresZenLooper
 
Arguments in discreate structures and stuff
Arguments in discreate structures and stuffArguments in discreate structures and stuff
Arguments in discreate structures and stuffZenLooper
 
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 structures and their introduction
discrete structures and their introductiondiscrete structures and their introduction
discrete structures and their introductionZenLooper
 

More from ZenLooper (7)

Managing External Environment and Organizational Culture.pdf
Managing External Environment and Organizational Culture.pdfManaging External Environment and Organizational Culture.pdf
Managing External Environment and Organizational Culture.pdf
 
Planning Work Activities and their benefits.pdf
Planning Work Activities and their benefits.pdfPlanning Work Activities and their benefits.pdf
Planning Work Activities and their benefits.pdf
 
Managers as Decision Makersstoiiiiii.pdf
Managers as Decision Makersstoiiiiii.pdfManagers as Decision Makersstoiiiiii.pdf
Managers as Decision Makersstoiiiiii.pdf
 
rules of inference in discrete structures
rules of inference in discrete structuresrules of inference in discrete structures
rules of inference in discrete structures
 
Arguments in discreate structures and stuff
Arguments in discreate structures and stuffArguments in discreate structures and stuff
Arguments in discreate structures and stuff
 
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 structures and their introduction
discrete structures and their introductiondiscrete structures and their introduction
discrete structures and their introduction
 

Recently uploaded

Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxnelietumpap1
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 

Recently uploaded (20)

Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptx
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 

Discreate Truth tables and laws of logic

  • 1. Discrete Structures BSCS (3 Credit Hour) Lecture # 02
  • 2. Truth tables  Truth tables for: ~ p  q ~ p  (q  ~ r) (p  q)  ~ (p  q)
  • 3. Truth table for the statement form ~ p  q p q ~p ~ p  q T T F F T F F F F T T T F F T F
  • 4. Truth table for ~ p  (q  ~ r) p q r ~ r q  ~ r ~ p ~ p  (q  ~ r) T T T F T F F T T F T T F F T F T F F F F T F F T T F F F T T F T T T F T F T T T T F F T F F T F F F F T T T T
  • 5. Truth table for (p  q)  ~ (p  q) p q p  q p  q ~ (pq) (p  q)  ~ (p  q) T T T T F F T F T F T T F T T F T T F F F F T F
  • 6. Double Negative Property ~(~p)  p p ~p ~(~p) T F T F T F
  • 7. Example:  “It is not true that I am not happy”  Prove it double negation property for the above statement ~ (~p)  p  Solution: Let p = “I am happy” Then ~p = “I am not happy” and ~(~ p) = “It is not true that I am not happy” Since ~ (~p)  p Hence the given statement is equivalent to: “I am happy”
  • 8. ~ (p  q) and ~p  ~q are not logically equivalent
  • 9. ~ (p  q) and ~p  ~q are not logically equivalent p q ~p ~q p  q ~(pq) ~p  ~q T T F F T F F T F F T F T F F T T F F T F F F T T F T T
  • 10. DE MORGAN’S LAWS:  The negation of an and statement is logically equivalent to the or statement in which each component is negated. Symbolically: ~(p  q)  ~p  ~q.  The negation of an or statement is logically equivalent to the and statement in which each component is negated. Symbolically: ~(p  q)  ~p  ~q.
  • 11. Truth Table for ~(p  q)  ~p  ~q
  • 12. Truth Table for ~(p  q)  ~p  ~q p q ~p ~q p  q ~(p  q) ~p  ~q T T F F T F F T F F T T F F F T T F T F F F F T T F T T
  • 13. Application of De morgan’s Law using statements:  Give negations for each of the following statements: The fan is slow or it is very hot. Akram is unfit and Saleem is injured.  Solution: ?
  • 14. Application of De morgan’s Law using statements:  Give negations for each of the following statements: The fan is slow or it is very hot. Akram is unfit and Saleem is injured.  Solution: The fan is not slow and it is not very hot. Akram is not unfit or Saleem is not injured.
  • 15. Exercise: Associative Law  Are the statements (p  q)  r  p  (q  r) logically equivalent?  Are the statements (p  q)  r  p  (q  r) logically equivalent?
  • 16. TAUTOLOGY:  A tautology is a statement form that is always true regardless of the truth values of the statement variables.  A tautology is represented by the symbol “T”..  EXAMPLE: The statement form p  ~ p is tautology p  ~p  t p ~ p p  ~ p T F T F T T
  • 17. CONTRADICTION:  A contradiction is a statement form that is always false regardless of the truth values of the statement variables.  A contradiction is represented by the symbol “c”.  Note: So if we have to prove that a given statement form is CONTRADICTION we will make the truth table for the statement form and if in the column of the given statement form all the entries are F ,then we say that statement form is contradiction.
  • 18. EXAMPLE:  The statement form p  ~ p is a contradiction.  Since in the last column in the truth table we have F in all the entries so is a contradiction p  ~p c p ~ p p  ~ p T F F F T F
  • 19. REMARKS:  Most statements are neither tautologies nor contradictions.  The negation of a tautology is a contradiction and vice versa.
  • 20. LOGICAL EQUIVALENCE INVOLVING TAUTOLOGY  Show that p  t  p  Since in the above table the entries in the first and last columns are identical so we have the corresponding statement forms are Logically Equivalent that is p  t  p p t p  t T T T F T F
  • 21. LOGICAL EQUIVALENCE INVOLVING CONTRADICTION  Show that p  c  c  Same truth values in the indicated columns so pc  c p c p  c T F F F F F
  • 22. EXERCISE:  Use truth table to show that (p  q)  (~p  (p  ~q)) is a tautology.  Use truth table to show that (p  ~q)  (~p  q) is a contradiction.
  • 23. INEQUALITIES AND DEMORGAN’S LAWS  Use De-Morgan’s Laws to write the negation of -1 < x  4 -1 < x  4 means x > –1 and x  4 By DeMorgan’s Law, the negation is: Which is equivalent to: x  –1 or x > 4
  • 24. LAWS OF LOGIC  Given any statement variables p, q and r, a tautology t and a contradiction c, the following logical equivalences hold:  Commutative Laws: p  q  q  p p  q  q  p  Associative Laws: (p  q)  r  p  (q  r) (p  q)  r  p  (q  r)
  • 25.  Distributive Law: p  (q  r)  (p  q)  (p  r) p  (q  r)  (p  q)  (p  r)  Identity Laws: p  t  p p  c  p  Negation Laws: p  ~ p  t p  ~ p  c
  • 26.  Double Negation Law: ~ (~p)  p  Idempotent Laws: p  p  p p  p  p  De Morgan’s Laws: ~(p  q)  ~p  ~q ~(p  q)  ~p  ~q
  • 27.  Universal Bound Law: p  t  t p  c  c  Absorptions Laws: p  (p  q)  p p  (p  q)  p  Negation of t and c: ~ t  c ~ c  t