SlideShare une entreprise Scribd logo
1  sur  28
Discrete Mathematics
 Propositional Logic
        Harshit Kumar




Slides borrowed from Wong Chung Hoi of CUHK
Agenda
•   Proposition (Statement)
•   Logic Operators
•   Logical formula
•   Problems
    – Proofing formula
    – Constructing formula from truth table
    – Simplifying formula
Proposition (Statement)
• A sentence that is either TURE or FALSE
   –   1 + 1 = 2.
   –   1 + 1 = 3.
   –   Let’s end the tutorial now.
   –   This tutorial is boring.
   –   Wake up and listen to me!
   –   There are no aliens.
   –   x > 0.
   –   He is handsome.        ?
• Tautology – proposition that is always true
• Contradiction – proposition that is always false
He has courage!
                 ?
This man has courage!
I love bowling!
You are doing it wrong!
                                      ?
Your way of pretending to be a penguin is wrong!
Agenda
•   Proposition (Statement)
•   Logic Operators
•   Logical formula
•   Problems
    – Proofing formula
    – Constructing formula from truth table
    – Simplifying formula
Logic Operators
• Let p and q be a proposition.
• Operators:
  – Negation
  – Conjunction
  – Disjunction
  – Conditional
  – Bi-conditional
Negation (NOT)
• Negation (NOT)
  – Flip the truth value.




• Example:
  – p: My car is blue.      ¬p: My car is not blue.
  – p: Peter is good.       ¬p: Peter is not good.
  – p: 10 > 15.             ¬p: 10 < 15 or 10 = 15
p: 49% different is a lot
¬p: 49% different is not a lot
p: Elephants are larger than the moon

¬p: Elephants are smaller than or equal size to the moon
Conjunction (AND)
• Conjunction (AND)
  – True only when p and q are True




• Example:
  – Quiz one is easy and quiz two is difficult.
  – Peter is so handsome and smart.
  – Peter is so handsome and Peter is so smart.
Disjunction (OR)
• Disjunction (OR)
  – True when either p or q or both are true.




• Example
  – I will go with my sister or I will go with my brother.
Exclusive Or (XOR)
• Exclusive Or (XOR)
  – True only when either p or q is true but not both




• Example
  – Tomorrow is Thursday or tomorrow is Friday.
Conditional (If … then …)
• Conditional (If… then…)
   – “If p then q” can only be disproved to be false when p
     really happens but q doesn’t.
   – p is sufficient condition q.
   – q is necessary condition p.
   – “p if q” = “if q then p”
   – “p only if q” = “if p then q”

• Example
   – If tomorrow is hot, I will go swimming.
     (If tomorrow is cold, you can’t disprove the statement.)
Bi-Conditional (If and only if)
• Bi-Conditional (If and only if)
   – “p if and only if q” can only be disproved when p
     happens but not q or vice versa.
   – p (q) is necessary and sufficient condition for q (p)
   –

• Example:
   – A computer program is correct
     if and only if it produces correct
     answer for all possible sets of
     input data
Agenda
•   Proposition (Statement)
•   Logic Operators
•   Logical formula
•   Problems
    – Proofing formula
    – Constructing formula from truth table
    – Simplifying formula
Logical Formula
• Distribution Laws:



• De Morgan’s Laws:



• Absorption Laws:
Agenda
•   Proposition (Statement)
•   Logic Operators
•   Logical formula
•   Problems
    – Proofing formula
    – Constructing formula from truth table
    – Simplifying formula
Proofing logical equivalent 1
• By truth table
• E.g. Show that            De Morgan’s law
Proofing logical equivalent 2
• By logical rules
• E.g. Show that



                     De Morgan’s Law

                     De Morgan’s Law
Constructing Formula 1
• By using only
• Find the logical formula for
   1. Truth table
   2. When will this formula
      be True?
   3. Simplify



• Exercise: Try to construct an logical formula for
             ,       ,
Constructing Formula 2
• Find the logical formula for
  1. Truth table
  2. When will this formula be True?
  3. Simplify




• Exercise: Verify the above
  formula.
Constructing Formula 3
• Find the logical formula for
  1. Truth table
  2. When is this formula True?
Constructing Formula 3
3. Simplify

                               De Morgan’s law


                               Distribution Laws


                               Distribution Laws



                               Distribution Laws



                               De Morgan’s law
Simplifying Formula
• Simplify
                           De Morgan’s law

                           Distribution Laws
Summary
•   What is proposition?
•   Common logical operator.
•   Proving Equivalent of formula.
•   Constructing formula from truth table.
•   Simplifying formula.

Contenu connexe

Tendances

Aralin 12 iba t ibang anyo ng pamilihan
Aralin 12 iba t ibang anyo ng pamilihanAralin 12 iba t ibang anyo ng pamilihan
Aralin 12 iba t ibang anyo ng pamilihanRivera Arnel
 
Hindi Ako Magiging Adik ni Manny Ledesma GRADE 9
Hindi Ako Magiging Adik ni Manny Ledesma GRADE 9Hindi Ako Magiging Adik ni Manny Ledesma GRADE 9
Hindi Ako Magiging Adik ni Manny Ledesma GRADE 9Janelle Langcauon
 
Pantikan sa cambodia
Pantikan sa cambodiaPantikan sa cambodia
Pantikan sa cambodiashadeebahim
 
INFINITIVES.pptx
INFINITIVES.pptxINFINITIVES.pptx
INFINITIVES.pptxChrisAncero
 
Kahulugan ng ekonomiks
Kahulugan ng ekonomiksKahulugan ng ekonomiks
Kahulugan ng ekonomiksCaitor Marie
 
Alamat ng paruparo
Alamat ng paruparoAlamat ng paruparo
Alamat ng paruparobetchee
 
Takipsilim sa Dyakarta
Takipsilim sa DyakartaTakipsilim sa Dyakarta
Takipsilim sa DyakartaAlbert Doroteo
 
How odin lost his eye story sequence
How odin lost his eye story sequenceHow odin lost his eye story sequence
How odin lost his eye story sequenceXak Sheng
 
Using conditional-in-expressing-arguments
Using conditional-in-expressing-argumentsUsing conditional-in-expressing-arguments
Using conditional-in-expressing-argumentsJohnSmith5397
 
K-TO-12 GRADE 8 FILIPINO Unang Markahan
K-TO-12 GRADE 8 FILIPINO Unang Markahan K-TO-12 GRADE 8 FILIPINO Unang Markahan
K-TO-12 GRADE 8 FILIPINO Unang Markahan Joel Soliveres
 

Tendances (20)

Mga Pang-ugnay at Mga Uri Nito
Mga Pang-ugnay at Mga Uri NitoMga Pang-ugnay at Mga Uri Nito
Mga Pang-ugnay at Mga Uri Nito
 
Review sa filipino
Review sa filipinoReview sa filipino
Review sa filipino
 
9 modals
9 modals9 modals
9 modals
 
Dula
DulaDula
Dula
 
Ekonomiks lm yunit 4 (2)
Ekonomiks lm yunit 4 (2)Ekonomiks lm yunit 4 (2)
Ekonomiks lm yunit 4 (2)
 
Aralin 12 iba t ibang anyo ng pamilihan
Aralin 12 iba t ibang anyo ng pamilihanAralin 12 iba t ibang anyo ng pamilihan
Aralin 12 iba t ibang anyo ng pamilihan
 
Kay estella zeehandelaar
Kay estella zeehandelaarKay estella zeehandelaar
Kay estella zeehandelaar
 
Hindi Ako Magiging Adik ni Manny Ledesma GRADE 9
Hindi Ako Magiging Adik ni Manny Ledesma GRADE 9Hindi Ako Magiging Adik ni Manny Ledesma GRADE 9
Hindi Ako Magiging Adik ni Manny Ledesma GRADE 9
 
Pantikan sa cambodia
Pantikan sa cambodiaPantikan sa cambodia
Pantikan sa cambodia
 
INFINITIVES.pptx
INFINITIVES.pptxINFINITIVES.pptx
INFINITIVES.pptx
 
ACTIVITY SHEET SA TULA
ACTIVITY SHEET SA TULAACTIVITY SHEET SA TULA
ACTIVITY SHEET SA TULA
 
Kahulugan ng ekonomiks
Kahulugan ng ekonomiksKahulugan ng ekonomiks
Kahulugan ng ekonomiks
 
Gamit ng modal
Gamit ng modalGamit ng modal
Gamit ng modal
 
Alamat ng paruparo
Alamat ng paruparoAlamat ng paruparo
Alamat ng paruparo
 
Tula elemento uri atbp
Tula elemento uri atbpTula elemento uri atbp
Tula elemento uri atbp
 
Takipsilim sa Dyakarta
Takipsilim sa DyakartaTakipsilim sa Dyakarta
Takipsilim sa Dyakarta
 
How odin lost his eye story sequence
How odin lost his eye story sequenceHow odin lost his eye story sequence
How odin lost his eye story sequence
 
Using conditional-in-expressing-arguments
Using conditional-in-expressing-argumentsUsing conditional-in-expressing-arguments
Using conditional-in-expressing-arguments
 
K-TO-12 GRADE 8 FILIPINO Unang Markahan
K-TO-12 GRADE 8 FILIPINO Unang Markahan K-TO-12 GRADE 8 FILIPINO Unang Markahan
K-TO-12 GRADE 8 FILIPINO Unang Markahan
 
Akasya-O-Kalabasa.pptx
Akasya-O-Kalabasa.pptxAkasya-O-Kalabasa.pptx
Akasya-O-Kalabasa.pptx
 

En vedette

Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligencemailmerk
 
Discrete maths tutorials
Discrete maths tutorialsDiscrete maths tutorials
Discrete maths tutorialsDIT University
 
Logical Operators in Brief with examples
Logical Operators in Brief with examplesLogical Operators in Brief with examples
Logical Operators in Brief with examplesMujtaBa Khan
 
Logic (slides)
Logic (slides)Logic (slides)
Logic (slides)IIUM
 
Mathematical Logic Part 2
Mathematical Logic Part 2Mathematical Logic Part 2
Mathematical Logic Part 2blaircomp2003
 
Syntax and semantics of propositional logic
Syntax and semantics of propositional logicSyntax and semantics of propositional logic
Syntax and semantics of propositional logicJanet Stemwedel
 
Chapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound StatementsChapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound Statementsguestd166eb5
 
Discrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional LogicDiscrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional LogicUniversity of Potsdam
 
Nsu module 01-logic-final
Nsu module 01-logic-finalNsu module 01-logic-final
Nsu module 01-logic-finalSOURAV
 
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
 
Translating English to Propositional Logic
Translating English to Propositional LogicTranslating English to Propositional Logic
Translating English to Propositional LogicJanet Stemwedel
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheLeslie Samuel
 

En vedette (16)

Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligence
 
Discrete maths tutorials
Discrete maths tutorialsDiscrete maths tutorials
Discrete maths tutorials
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Logical Operators in Brief with examples
Logical Operators in Brief with examplesLogical Operators in Brief with examples
Logical Operators in Brief with examples
 
Logic (slides)
Logic (slides)Logic (slides)
Logic (slides)
 
Mathematical Logic Part 2
Mathematical Logic Part 2Mathematical Logic Part 2
Mathematical Logic Part 2
 
Syntax and semantics of propositional logic
Syntax and semantics of propositional logicSyntax and semantics of propositional logic
Syntax and semantics of propositional logic
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Chapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound StatementsChapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound Statements
 
Discrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional LogicDiscrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional Logic
 
Logic
LogicLogic
Logic
 
Nsu module 01-logic-final
Nsu module 01-logic-finalNsu module 01-logic-final
Nsu module 01-logic-final
 
Logical Connectors
Logical ConnectorsLogical Connectors
Logical Connectors
 
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 د. خالد بكرو
 
Translating English to Propositional Logic
Translating English to Propositional LogicTranslating English to Propositional Logic
Translating English to Propositional Logic
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
 

Similaire à Logic

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
 
Knowledge representation and Predicate logic
Knowledge representation and Predicate logicKnowledge representation and Predicate logic
Knowledge representation and Predicate logicAmey Kerkar
 
unit1rulesofinference-170113152312.pdf
unit1rulesofinference-170113152312.pdfunit1rulesofinference-170113152312.pdf
unit1rulesofinference-170113152312.pdfBhanuCharan9
 
Unit 1 rules of inference
Unit 1  rules of inferenceUnit 1  rules of inference
Unit 1 rules of inferenceraksharao
 
lecture011712 (1).ppt
lecture011712 (1).pptlecture011712 (1).ppt
lecture011712 (1).pptabdulali6457
 
Logic in Predicate and Propositional Logic
Logic in Predicate and Propositional LogicLogic in Predicate and Propositional Logic
Logic in Predicate and Propositional LogicArchanaT32
 
Introduction iii
Introduction iiiIntroduction iii
Introduction iiichandsek666
 
- Logic - Module 1B - Logic and Propositions course lactur .pdf
- Logic - Module 1B - Logic and Propositions course lactur .pdf- Logic - Module 1B - Logic and Propositions course lactur .pdf
- Logic - Module 1B - Logic and Propositions course lactur .pdfMehdiHassan67
 
DisMath-lecture-2-Logic-and-Proofs-08032022-115009am.pptx
DisMath-lecture-2-Logic-and-Proofs-08032022-115009am.pptxDisMath-lecture-2-Logic-and-Proofs-08032022-115009am.pptx
DisMath-lecture-2-Logic-and-Proofs-08032022-115009am.pptxAdeel Saifee
 
Knowledge based agent
Knowledge based agentKnowledge based agent
Knowledge based agentShiwani Gupta
 
AI NOTES ppt 4.pdf
AI NOTES ppt 4.pdfAI NOTES ppt 4.pdf
AI NOTES ppt 4.pdfARMANVERMA7
 
MFCS PPT.pdf
MFCS PPT.pdfMFCS PPT.pdf
MFCS PPT.pdfjayarao21
 

Similaire à Logic (20)

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
 
Knowledge representation and Predicate logic
Knowledge representation and Predicate logicKnowledge representation and Predicate logic
Knowledge representation and Predicate logic
 
unit1rulesofinference-170113152312.pdf
unit1rulesofinference-170113152312.pdfunit1rulesofinference-170113152312.pdf
unit1rulesofinference-170113152312.pdf
 
Unit 1 rules of inference
Unit 1  rules of inferenceUnit 1  rules of inference
Unit 1 rules of inference
 
lecture011712 (1).ppt
lecture011712 (1).pptlecture011712 (1).ppt
lecture011712 (1).ppt
 
Logic in Predicate and Propositional Logic
Logic in Predicate and Propositional LogicLogic in Predicate and Propositional Logic
Logic in Predicate and Propositional Logic
 
Introduction iii
Introduction iiiIntroduction iii
Introduction iii
 
1019Lec1.ppt
1019Lec1.ppt1019Lec1.ppt
1019Lec1.ppt
 
Logic
LogicLogic
Logic
 
4535092.ppt
4535092.ppt4535092.ppt
4535092.ppt
 
02-boolean.ppt
02-boolean.ppt02-boolean.ppt
02-boolean.ppt
 
Logic.ppt
Logic.pptLogic.ppt
Logic.ppt
 
DM 1.pptx
DM 1.pptxDM 1.pptx
DM 1.pptx
 
- Logic - Module 1B - Logic and Propositions course lactur .pdf
- Logic - Module 1B - Logic and Propositions course lactur .pdf- Logic - Module 1B - Logic and Propositions course lactur .pdf
- Logic - Module 1B - Logic and Propositions course lactur .pdf
 
DisMath-lecture-2-Logic-and-Proofs-08032022-115009am.pptx
DisMath-lecture-2-Logic-and-Proofs-08032022-115009am.pptxDisMath-lecture-2-Logic-and-Proofs-08032022-115009am.pptx
DisMath-lecture-2-Logic-and-Proofs-08032022-115009am.pptx
 
PropositionalLogic.ppt
PropositionalLogic.pptPropositionalLogic.ppt
PropositionalLogic.ppt
 
Knowledge based agent
Knowledge based agentKnowledge based agent
Knowledge based agent
 
AI NOTES ppt 4.pdf
AI NOTES ppt 4.pdfAI NOTES ppt 4.pdf
AI NOTES ppt 4.pdf
 
Logic agent
Logic agentLogic agent
Logic agent
 
MFCS PPT.pdf
MFCS PPT.pdfMFCS PPT.pdf
MFCS PPT.pdf
 

Plus de H K

Assignment4
Assignment4Assignment4
Assignment4H K
 
Assignment3
Assignment3Assignment3
Assignment3H K
 
Induction
InductionInduction
InductionH K
 
Solution3
Solution3Solution3
Solution3H K
 
Solution2
Solution2Solution2
Solution2H K
 
Mid-
Mid-Mid-
Mid-H K
 
Assignment4
Assignment4Assignment4
Assignment4H K
 
Assignment4
Assignment4Assignment4
Assignment4H K
 
Dm assignment3
Dm assignment3Dm assignment3
Dm assignment3H K
 
Proof
ProofProof
ProofH K
 
Resolution
ResolutionResolution
ResolutionH K
 
Assignment description
Assignment descriptionAssignment description
Assignment descriptionH K
 
Dm assignment2
Dm assignment2Dm assignment2
Dm assignment2H K
 
Set
SetSet
SetH K
 
Dm assignment1
Dm assignment1Dm assignment1
Dm assignment1H K
 
Introduction
IntroductionIntroduction
IntroductionH K
 
Assignment 2 sol
Assignment 2 solAssignment 2 sol
Assignment 2 solH K
 
Assignment sw solution
Assignment sw solutionAssignment sw solution
Assignment sw solutionH K
 
Violinphoenix
ViolinphoenixViolinphoenix
ViolinphoenixH K
 
Ie project
Ie projectIe project
Ie projectH K
 

Plus de H K (20)

Assignment4
Assignment4Assignment4
Assignment4
 
Assignment3
Assignment3Assignment3
Assignment3
 
Induction
InductionInduction
Induction
 
Solution3
Solution3Solution3
Solution3
 
Solution2
Solution2Solution2
Solution2
 
Mid-
Mid-Mid-
Mid-
 
Assignment4
Assignment4Assignment4
Assignment4
 
Assignment4
Assignment4Assignment4
Assignment4
 
Dm assignment3
Dm assignment3Dm assignment3
Dm assignment3
 
Proof
ProofProof
Proof
 
Resolution
ResolutionResolution
Resolution
 
Assignment description
Assignment descriptionAssignment description
Assignment description
 
Dm assignment2
Dm assignment2Dm assignment2
Dm assignment2
 
Set
SetSet
Set
 
Dm assignment1
Dm assignment1Dm assignment1
Dm assignment1
 
Introduction
IntroductionIntroduction
Introduction
 
Assignment 2 sol
Assignment 2 solAssignment 2 sol
Assignment 2 sol
 
Assignment sw solution
Assignment sw solutionAssignment sw solution
Assignment sw solution
 
Violinphoenix
ViolinphoenixViolinphoenix
Violinphoenix
 
Ie project
Ie projectIe project
Ie project
 

Dernier

mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
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
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
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
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
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
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 

Dernier (20)

mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
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
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
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
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
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
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 

Logic

  • 1. Discrete Mathematics Propositional Logic Harshit Kumar Slides borrowed from Wong Chung Hoi of CUHK
  • 2. Agenda • Proposition (Statement) • Logic Operators • Logical formula • Problems – Proofing formula – Constructing formula from truth table – Simplifying formula
  • 3. Proposition (Statement) • A sentence that is either TURE or FALSE – 1 + 1 = 2. – 1 + 1 = 3. – Let’s end the tutorial now. – This tutorial is boring. – Wake up and listen to me! – There are no aliens. – x > 0. – He is handsome. ? • Tautology – proposition that is always true • Contradiction – proposition that is always false
  • 4. He has courage! ? This man has courage!
  • 6. You are doing it wrong! ? Your way of pretending to be a penguin is wrong!
  • 7. Agenda • Proposition (Statement) • Logic Operators • Logical formula • Problems – Proofing formula – Constructing formula from truth table – Simplifying formula
  • 8. Logic Operators • Let p and q be a proposition. • Operators: – Negation – Conjunction – Disjunction – Conditional – Bi-conditional
  • 9. Negation (NOT) • Negation (NOT) – Flip the truth value. • Example: – p: My car is blue. ¬p: My car is not blue. – p: Peter is good. ¬p: Peter is not good. – p: 10 > 15. ¬p: 10 < 15 or 10 = 15
  • 10.
  • 11. p: 49% different is a lot ¬p: 49% different is not a lot
  • 12. p: Elephants are larger than the moon ¬p: Elephants are smaller than or equal size to the moon
  • 13. Conjunction (AND) • Conjunction (AND) – True only when p and q are True • Example: – Quiz one is easy and quiz two is difficult. – Peter is so handsome and smart. – Peter is so handsome and Peter is so smart.
  • 14. Disjunction (OR) • Disjunction (OR) – True when either p or q or both are true. • Example – I will go with my sister or I will go with my brother.
  • 15. Exclusive Or (XOR) • Exclusive Or (XOR) – True only when either p or q is true but not both • Example – Tomorrow is Thursday or tomorrow is Friday.
  • 16. Conditional (If … then …) • Conditional (If… then…) – “If p then q” can only be disproved to be false when p really happens but q doesn’t. – p is sufficient condition q. – q is necessary condition p. – “p if q” = “if q then p” – “p only if q” = “if p then q” • Example – If tomorrow is hot, I will go swimming. (If tomorrow is cold, you can’t disprove the statement.)
  • 17. Bi-Conditional (If and only if) • Bi-Conditional (If and only if) – “p if and only if q” can only be disproved when p happens but not q or vice versa. – p (q) is necessary and sufficient condition for q (p) – • Example: – A computer program is correct if and only if it produces correct answer for all possible sets of input data
  • 18. Agenda • Proposition (Statement) • Logic Operators • Logical formula • Problems – Proofing formula – Constructing formula from truth table – Simplifying formula
  • 19. Logical Formula • Distribution Laws: • De Morgan’s Laws: • Absorption Laws:
  • 20. Agenda • Proposition (Statement) • Logic Operators • Logical formula • Problems – Proofing formula – Constructing formula from truth table – Simplifying formula
  • 21. Proofing logical equivalent 1 • By truth table • E.g. Show that De Morgan’s law
  • 22. Proofing logical equivalent 2 • By logical rules • E.g. Show that De Morgan’s Law De Morgan’s Law
  • 23. Constructing Formula 1 • By using only • Find the logical formula for 1. Truth table 2. When will this formula be True? 3. Simplify • Exercise: Try to construct an logical formula for , ,
  • 24. Constructing Formula 2 • Find the logical formula for 1. Truth table 2. When will this formula be True? 3. Simplify • Exercise: Verify the above formula.
  • 25. Constructing Formula 3 • Find the logical formula for 1. Truth table 2. When is this formula True?
  • 26. Constructing Formula 3 3. Simplify De Morgan’s law Distribution Laws Distribution Laws Distribution Laws De Morgan’s law
  • 27. Simplifying Formula • Simplify De Morgan’s law Distribution Laws
  • 28. Summary • What is proposition? • Common logical operator. • Proving Equivalent of formula. • Constructing formula from truth table. • Simplifying formula.