SlideShare una empresa de Scribd logo
1 de 26
Rushdi Shams, Dept of CSE, KUET, Bangladesh 1
Knowledge Representation
Propositional Logic
Artificial Intelligence
Version 2.0
There are 10 types of people in this world- who understand binary
and who do not understand binary
Rushdi Shams, Dept of CSE, KUET, Bangladesh 2
Propositional Logic
Rushdi Shams, Dept of CSE, KUET, Bangladesh 3
Introduction
 Need formal notation to represent knowledge,
allowing automated inference and problem solving.
 One popular choice is use of logic.
 Propositional logic is the simplest.
 Symbols represent facts: P, Q, etc..
 These are joined by logical connectives (and, or,
implication) e.g., P Λ Q; Q R
 Given some statements in the logic we can deduce new
facts (e.g., from above deduce R)
Rushdi Shams, Dept of CSE, KUET, Bangladesh 4
Syntactic Properties of
Propositional Logic
 If S is a sentence, S is a sentence (negation)
 If S1 and S2 are sentences, S1 S2 is a sentence
(conjunction)
 If S1 and S2 are sentences, S1 S2 is a sentence
(disjunction)
 If S1 and S2 are sentences, S1 S2 is a sentence
(implication)
 If S1 and S2 are sentences, S1 S2 is a sentence
(bi-conditional)
Rushdi Shams, Dept of CSE, KUET, Bangladesh 5
Semantic Properties of
Propositional Logic
S is true iff S is false
S1 S2 is true iff S1 is true and S2 is true
S1 S2 is true iff S1is true or S2 is true
S1 S2 is true iff S1 is false or S2 is true
i.e., is false iff S1 is true and S2 is false
S1 S2 is true iff S1 S2 is true and
S2 S1 is true
Rushdi Shams, Dept of CSE, KUET, Bangladesh 6
Truth Table for Connectives
Rushdi Shams, Dept of CSE, KUET, Bangladesh 7
Model of a Formula
 If the value of the formula X holds 1 for the
assignment A, then the assignment A is called model
for formula X.
 That means, all assignments for which the formula X
is true are models of it.
Rushdi Shams, Dept of CSE, KUET, Bangladesh 8
Model of a Formula
Rushdi Shams, Dept of CSE, KUET, Bangladesh 9
Model of a Formula:
Can you do it?
Rushdi Shams, Dept of CSE, KUET, Bangladesh 10
Satisfiable Formulas
 If there exist at least one model of a formula then the
formula is called satisfiable.
 The value of the formula is true for at least one
assignment. It plays no rule how many models the
formula has.
Rushdi Shams, Dept of CSE, KUET, Bangladesh 11
Satisfiable Formulas
Rushdi Shams, Dept of CSE, KUET, Bangladesh 12
Valid Formulas
 A formula is called valid (or tautology) if all
assignments are models of this formula.
 The value of the formula is true for all assignments. If
a tautology is part of a more complex formula then
you could replace it by the value 1.
Rushdi Shams, Dept of CSE, KUET, Bangladesh 13
Valid Formulas
Rushdi Shams, Dept of CSE, KUET, Bangladesh 14
Unsatisfiable Formulas
 A formula is unsatisfiable if none of its
assignment is true in no models
Rushdi Shams, Dept of CSE, KUET, Bangladesh 15
Logical equivalence
 Two sentences are logically equivalent iff true in same models: α ≡ ß
iff α╞ β and β╞ α
Rushdi Shams, Dept of CSE, KUET, Bangladesh 16
Deduction: Rule of Inference
1. Either cat fur was found at the scene of the crime, or dog fur was
found at the scene of the crime. (Premise)
 C v D
Rushdi Shams, Dept of CSE, KUET, Bangladesh 17
Deduction: Rule of Inference
2. If dog fur was found at the scene of the crime, then officer
Thompson had an allergy attack. (Premise)
 D → A
Rushdi Shams, Dept of CSE, KUET, Bangladesh 18
Deduction: Rule of Inference
3. If cat fur was found at the scene of the crime, then Macavity is
responsible for the crime. (Premise)
 C → M
Rushdi Shams, Dept of CSE, KUET, Bangladesh 19
Deduction: Rule of Inference
4. Officer Thompson did not have an allergy attack. (Premise)
 ¬ A
Rushdi Shams, Dept of CSE, KUET, Bangladesh 20
Deduction: Rule of Inference
5. Dog fur was not found at the scene of the crime. (Follows from 2
D → A and 4. ¬ A). When is ¬ A true? When A is false- right?
Now, take a look at the implication truth table. Find what is the
value of D when A is false and D → A is true
 ¬ D
Rushdi Shams, Dept of CSE, KUET, Bangladesh 21
Rules for Inference:
Modus Tollens
 If given α → β
and we know ¬β
Then ¬α
Rushdi Shams, Dept of CSE, KUET, Bangladesh 22
Deduction: Rule of Inference
6. Cat fur was found at the scene of the crime. (Follows from 1
C v D and 5 ¬ D). When is ¬ D true? When D is false- right?
Now, take a look at the OR truth table. Find what is the value of
C when D is false and C V D is true
 C
Rushdi Shams, Dept of CSE, KUET, Bangladesh 23
Rules for Inference:
Disjunctive Syllogism
 If given α v β
and we know ¬α
then β
 If given α v β
and we know ¬β
then α
Rushdi Shams, Dept of CSE, KUET, Bangladesh 24
Deduction: Rule of Inference
7. Macavity is responsible for the crime. (Conclusion. Follows from
3 C → M and 6 C). When is C → M true given that C is true?
Take a look at the Implication truth table.
 M
Rushdi Shams, Dept of CSE, KUET, Bangladesh 25
Rules for Inference:
Modus Ponens
 If given α → β
and we know α
Then β
Rushdi Shams, Dept of CSE, KUET, Bangladesh 26
References
 Artificial Intelligence: A Modern Approach (2nd
Edition)
by Russell and Norvig
Chapter 7
 http://www.iep.utm.edu/p/prop-log.htm#H5

Más contenido relacionado

La actualidad más candente

Knowledge representation In Artificial Intelligence
Knowledge representation In Artificial IntelligenceKnowledge representation In Artificial Intelligence
Knowledge representation In Artificial IntelligenceRamla Sheikh
 
L03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicL03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicManjula V
 
Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AIMegha Sharma
 
Knowledge representation in AI
Knowledge representation in AIKnowledge representation in AI
Knowledge representation in AIVishal Singh
 
Artificial intelligence- Logic Agents
Artificial intelligence- Logic AgentsArtificial intelligence- Logic Agents
Artificial intelligence- Logic AgentsNuruzzaman Milon
 
I.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AII.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AIvikas dhakane
 
Game Playing in Artificial Intelligence
Game Playing in Artificial IntelligenceGame Playing in Artificial Intelligence
Game Playing in Artificial Intelligencelordmwesh
 
Conceptual dependency
Conceptual dependencyConceptual dependency
Conceptual dependencyJismy .K.Jose
 
Problem solving agents
Problem solving agentsProblem solving agents
Problem solving agentsMegha Sharma
 
Inference in First-Order Logic
Inference in First-Order Logic Inference in First-Order Logic
Inference in First-Order Logic Junya Tanaka
 
Semantic nets in artificial intelligence
Semantic nets in artificial intelligenceSemantic nets in artificial intelligence
Semantic nets in artificial intelligenceharshita virwani
 
Informed search (heuristics)
Informed search (heuristics)Informed search (heuristics)
Informed search (heuristics)Bablu Shofi
 

La actualidad más candente (20)

Knowledge representation In Artificial Intelligence
Knowledge representation In Artificial IntelligenceKnowledge representation In Artificial Intelligence
Knowledge representation In Artificial Intelligence
 
L03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicL03 ai - knowledge representation using logic
L03 ai - knowledge representation using logic
 
First order logic
First order logicFirst order logic
First order logic
 
AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)
 
Problem Solving
Problem Solving Problem Solving
Problem Solving
 
Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AI
 
Knowledge representation in AI
Knowledge representation in AIKnowledge representation in AI
Knowledge representation in AI
 
Artificial intelligence- Logic Agents
Artificial intelligence- Logic AgentsArtificial intelligence- Logic Agents
Artificial intelligence- Logic Agents
 
I.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AII.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AI
 
First order logic
First order logicFirst order logic
First order logic
 
Game Playing in Artificial Intelligence
Game Playing in Artificial IntelligenceGame Playing in Artificial Intelligence
Game Playing in Artificial Intelligence
 
AI: Logic in AI
AI: Logic in AIAI: Logic in AI
AI: Logic in AI
 
Planning
PlanningPlanning
Planning
 
Semantic Networks
Semantic NetworksSemantic Networks
Semantic Networks
 
AI Lecture 4 (informed search and exploration)
AI Lecture 4 (informed search and exploration)AI Lecture 4 (informed search and exploration)
AI Lecture 4 (informed search and exploration)
 
Conceptual dependency
Conceptual dependencyConceptual dependency
Conceptual dependency
 
Problem solving agents
Problem solving agentsProblem solving agents
Problem solving agents
 
Inference in First-Order Logic
Inference in First-Order Logic Inference in First-Order Logic
Inference in First-Order Logic
 
Semantic nets in artificial intelligence
Semantic nets in artificial intelligenceSemantic nets in artificial intelligence
Semantic nets in artificial intelligence
 
Informed search (heuristics)
Informed search (heuristics)Informed search (heuristics)
Informed search (heuristics)
 

Destacado

Propositional logic & inference
Propositional logic & inferencePropositional logic & inference
Propositional logic & inferenceSlideshare
 
Syntax and semantics of propositional logic
Syntax and semantics of propositional logicSyntax and semantics of propositional logic
Syntax and semantics of propositional logicJanet Stemwedel
 
Propositional logic sneha-mam
Propositional logic sneha-mam Propositional logic sneha-mam
Propositional logic sneha-mam nitesh9353
 
Propositional And First-Order Logic
Propositional And First-Order LogicPropositional And First-Order Logic
Propositional And First-Order Logicankush_kumar
 
Logic (slides)
Logic (slides)Logic (slides)
Logic (slides)IIUM
 
Predicate Logic
Predicate LogicPredicate Logic
Predicate Logicgiki67
 
03 - Predicate logic
03 - Predicate logic03 - Predicate logic
03 - Predicate logicTudor Girba
 
Propositional logic for Beginners
Propositional logic for BeginnersPropositional logic for Beginners
Propositional logic for Beginnerskianryan
 
#3 formal methods – propositional logic
#3 formal methods – propositional logic#3 formal methods – propositional logic
#3 formal methods – propositional logicSharif Omar Salem
 
L1 l2 l3 introduction to machine translation
L1 l2 l3  introduction to machine translationL1 l2 l3  introduction to machine translation
L1 l2 l3 introduction to machine translationRushdi Shams
 
Probabilistic logic
Probabilistic logicProbabilistic logic
Probabilistic logicRushdi Shams
 
L13 why software fails
L13  why software failsL13  why software fails
L13 why software failsRushdi Shams
 
Knowledge representation
Knowledge representationKnowledge representation
Knowledge representationRushdi Shams
 
Lecture 5, 6 and 7 cpu scheduling
Lecture 5, 6 and 7  cpu schedulingLecture 5, 6 and 7  cpu scheduling
Lecture 5, 6 and 7 cpu schedulingRushdi Shams
 

Destacado (20)

Propositional logic & inference
Propositional logic & inferencePropositional logic & inference
Propositional logic & inference
 
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
 
Propositional logic sneha-mam
Propositional logic sneha-mam Propositional logic sneha-mam
Propositional logic sneha-mam
 
Propositional And First-Order Logic
Propositional And First-Order LogicPropositional And First-Order Logic
Propositional And First-Order Logic
 
Logic (slides)
Logic (slides)Logic (slides)
Logic (slides)
 
Predicate Logic
Predicate LogicPredicate Logic
Predicate Logic
 
03 - Predicate logic
03 - Predicate logic03 - Predicate logic
03 - Predicate logic
 
Propositional logic for Beginners
Propositional logic for BeginnersPropositional logic for Beginners
Propositional logic for Beginners
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Logic part1
Logic part1Logic part1
Logic part1
 
#3 formal methods – propositional logic
#3 formal methods – propositional logic#3 formal methods – propositional logic
#3 formal methods – propositional logic
 
L1 l2 l3 introduction to machine translation
L1 l2 l3  introduction to machine translationL1 l2 l3  introduction to machine translation
L1 l2 l3 introduction to machine translation
 
Probabilistic logic
Probabilistic logicProbabilistic logic
Probabilistic logic
 
L13 why software fails
L13  why software failsL13  why software fails
L13 why software fails
 
L15 fuzzy logic
L15  fuzzy logicL15  fuzzy logic
L15 fuzzy logic
 
Knowledge representation
Knowledge representationKnowledge representation
Knowledge representation
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Lecture 5, 6 and 7 cpu scheduling
Lecture 5, 6 and 7  cpu schedulingLecture 5, 6 and 7  cpu scheduling
Lecture 5, 6 and 7 cpu scheduling
 
Hum 200 w7
Hum 200 w7 Hum 200 w7
Hum 200 w7
 

Más de Rushdi Shams

Research Methodology and Tips on Better Research
Research Methodology and Tips on Better ResearchResearch Methodology and Tips on Better Research
Research Methodology and Tips on Better ResearchRushdi Shams
 
Common evaluation measures in NLP and IR
Common evaluation measures in NLP and IRCommon evaluation measures in NLP and IR
Common evaluation measures in NLP and IRRushdi Shams
 
Machine learning with nlp 101
Machine learning with nlp 101Machine learning with nlp 101
Machine learning with nlp 101Rushdi Shams
 
Semi-supervised classification for natural language processing
Semi-supervised classification for natural language processingSemi-supervised classification for natural language processing
Semi-supervised classification for natural language processingRushdi Shams
 
Natural Language Processing: Parsing
Natural Language Processing: ParsingNatural Language Processing: Parsing
Natural Language Processing: ParsingRushdi Shams
 
Types of machine translation
Types of machine translationTypes of machine translation
Types of machine translationRushdi Shams
 
Syntax and semantics
Syntax and semanticsSyntax and semantics
Syntax and semanticsRushdi Shams
 
Knowledge structure
Knowledge structureKnowledge structure
Knowledge structureRushdi Shams
 
L5 understanding hacking
L5  understanding hackingL5  understanding hacking
L5 understanding hackingRushdi Shams
 
L2 Intrusion Detection System (IDS)
L2  Intrusion Detection System (IDS)L2  Intrusion Detection System (IDS)
L2 Intrusion Detection System (IDS)Rushdi Shams
 
L2 l3 l4 software process models
L2 l3 l4  software process modelsL2 l3 l4  software process models
L2 l3 l4 software process modelsRushdi Shams
 
L1 overview of software engineering
L1  overview of software engineeringL1  overview of software engineering
L1 overview of software engineeringRushdi Shams
 
Lecture 14,15 and 16 file systems
Lecture 14,15 and 16  file systemsLecture 14,15 and 16  file systems
Lecture 14,15 and 16 file systemsRushdi Shams
 
Lecture 11,12 and 13 deadlocks
Lecture 11,12 and 13  deadlocksLecture 11,12 and 13  deadlocks
Lecture 11,12 and 13 deadlocksRushdi Shams
 
Lecture 7, 8, 9 and 10 Inter Process Communication (IPC) in Operating Systems
Lecture 7, 8, 9 and 10  Inter Process Communication (IPC) in Operating SystemsLecture 7, 8, 9 and 10  Inter Process Communication (IPC) in Operating Systems
Lecture 7, 8, 9 and 10 Inter Process Communication (IPC) in Operating SystemsRushdi Shams
 
Lecture 1 and 2 processes
Lecture 1 and 2  processesLecture 1 and 2  processes
Lecture 1 and 2 processesRushdi Shams
 

Más de Rushdi Shams (20)

Research Methodology and Tips on Better Research
Research Methodology and Tips on Better ResearchResearch Methodology and Tips on Better Research
Research Methodology and Tips on Better Research
 
Common evaluation measures in NLP and IR
Common evaluation measures in NLP and IRCommon evaluation measures in NLP and IR
Common evaluation measures in NLP and IR
 
Machine learning with nlp 101
Machine learning with nlp 101Machine learning with nlp 101
Machine learning with nlp 101
 
Semi-supervised classification for natural language processing
Semi-supervised classification for natural language processingSemi-supervised classification for natural language processing
Semi-supervised classification for natural language processing
 
Natural Language Processing: Parsing
Natural Language Processing: ParsingNatural Language Processing: Parsing
Natural Language Processing: Parsing
 
Types of machine translation
Types of machine translationTypes of machine translation
Types of machine translation
 
Syntax and semantics
Syntax and semanticsSyntax and semantics
Syntax and semantics
 
Knowledge structure
Knowledge structureKnowledge structure
Knowledge structure
 
Belief function
Belief functionBelief function
Belief function
 
L5 understanding hacking
L5  understanding hackingL5  understanding hacking
L5 understanding hacking
 
L4 vpn
L4  vpnL4  vpn
L4 vpn
 
L3 defense
L3  defenseL3  defense
L3 defense
 
L2 Intrusion Detection System (IDS)
L2  Intrusion Detection System (IDS)L2  Intrusion Detection System (IDS)
L2 Intrusion Detection System (IDS)
 
L1 phishing
L1  phishingL1  phishing
L1 phishing
 
L2 l3 l4 software process models
L2 l3 l4  software process modelsL2 l3 l4  software process models
L2 l3 l4 software process models
 
L1 overview of software engineering
L1  overview of software engineeringL1  overview of software engineering
L1 overview of software engineering
 
Lecture 14,15 and 16 file systems
Lecture 14,15 and 16  file systemsLecture 14,15 and 16  file systems
Lecture 14,15 and 16 file systems
 
Lecture 11,12 and 13 deadlocks
Lecture 11,12 and 13  deadlocksLecture 11,12 and 13  deadlocks
Lecture 11,12 and 13 deadlocks
 
Lecture 7, 8, 9 and 10 Inter Process Communication (IPC) in Operating Systems
Lecture 7, 8, 9 and 10  Inter Process Communication (IPC) in Operating SystemsLecture 7, 8, 9 and 10  Inter Process Communication (IPC) in Operating Systems
Lecture 7, 8, 9 and 10 Inter Process Communication (IPC) in Operating Systems
 
Lecture 1 and 2 processes
Lecture 1 and 2  processesLecture 1 and 2  processes
Lecture 1 and 2 processes
 

Último

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
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
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
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
 
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
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
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
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...KokoStevan
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 

Último (20)

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
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
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
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
 
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
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
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
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 

Propositional logic

  • 1. Rushdi Shams, Dept of CSE, KUET, Bangladesh 1 Knowledge Representation Propositional Logic Artificial Intelligence Version 2.0 There are 10 types of people in this world- who understand binary and who do not understand binary
  • 2. Rushdi Shams, Dept of CSE, KUET, Bangladesh 2 Propositional Logic
  • 3. Rushdi Shams, Dept of CSE, KUET, Bangladesh 3 Introduction  Need formal notation to represent knowledge, allowing automated inference and problem solving.  One popular choice is use of logic.  Propositional logic is the simplest.  Symbols represent facts: P, Q, etc..  These are joined by logical connectives (and, or, implication) e.g., P Λ Q; Q R  Given some statements in the logic we can deduce new facts (e.g., from above deduce R)
  • 4. Rushdi Shams, Dept of CSE, KUET, Bangladesh 4 Syntactic Properties of Propositional Logic  If S is a sentence, S is a sentence (negation)  If S1 and S2 are sentences, S1 S2 is a sentence (conjunction)  If S1 and S2 are sentences, S1 S2 is a sentence (disjunction)  If S1 and S2 are sentences, S1 S2 is a sentence (implication)  If S1 and S2 are sentences, S1 S2 is a sentence (bi-conditional)
  • 5. Rushdi Shams, Dept of CSE, KUET, Bangladesh 5 Semantic Properties of Propositional Logic S is true iff S is false S1 S2 is true iff S1 is true and S2 is true S1 S2 is true iff S1is true or S2 is true S1 S2 is true iff S1 is false or S2 is true i.e., is false iff S1 is true and S2 is false S1 S2 is true iff S1 S2 is true and S2 S1 is true
  • 6. Rushdi Shams, Dept of CSE, KUET, Bangladesh 6 Truth Table for Connectives
  • 7. Rushdi Shams, Dept of CSE, KUET, Bangladesh 7 Model of a Formula  If the value of the formula X holds 1 for the assignment A, then the assignment A is called model for formula X.  That means, all assignments for which the formula X is true are models of it.
  • 8. Rushdi Shams, Dept of CSE, KUET, Bangladesh 8 Model of a Formula
  • 9. Rushdi Shams, Dept of CSE, KUET, Bangladesh 9 Model of a Formula: Can you do it?
  • 10. Rushdi Shams, Dept of CSE, KUET, Bangladesh 10 Satisfiable Formulas  If there exist at least one model of a formula then the formula is called satisfiable.  The value of the formula is true for at least one assignment. It plays no rule how many models the formula has.
  • 11. Rushdi Shams, Dept of CSE, KUET, Bangladesh 11 Satisfiable Formulas
  • 12. Rushdi Shams, Dept of CSE, KUET, Bangladesh 12 Valid Formulas  A formula is called valid (or tautology) if all assignments are models of this formula.  The value of the formula is true for all assignments. If a tautology is part of a more complex formula then you could replace it by the value 1.
  • 13. Rushdi Shams, Dept of CSE, KUET, Bangladesh 13 Valid Formulas
  • 14. Rushdi Shams, Dept of CSE, KUET, Bangladesh 14 Unsatisfiable Formulas  A formula is unsatisfiable if none of its assignment is true in no models
  • 15. Rushdi Shams, Dept of CSE, KUET, Bangladesh 15 Logical equivalence  Two sentences are logically equivalent iff true in same models: α ≡ ß iff α╞ β and β╞ α
  • 16. Rushdi Shams, Dept of CSE, KUET, Bangladesh 16 Deduction: Rule of Inference 1. Either cat fur was found at the scene of the crime, or dog fur was found at the scene of the crime. (Premise)  C v D
  • 17. Rushdi Shams, Dept of CSE, KUET, Bangladesh 17 Deduction: Rule of Inference 2. If dog fur was found at the scene of the crime, then officer Thompson had an allergy attack. (Premise)  D → A
  • 18. Rushdi Shams, Dept of CSE, KUET, Bangladesh 18 Deduction: Rule of Inference 3. If cat fur was found at the scene of the crime, then Macavity is responsible for the crime. (Premise)  C → M
  • 19. Rushdi Shams, Dept of CSE, KUET, Bangladesh 19 Deduction: Rule of Inference 4. Officer Thompson did not have an allergy attack. (Premise)  ¬ A
  • 20. Rushdi Shams, Dept of CSE, KUET, Bangladesh 20 Deduction: Rule of Inference 5. Dog fur was not found at the scene of the crime. (Follows from 2 D → A and 4. ¬ A). When is ¬ A true? When A is false- right? Now, take a look at the implication truth table. Find what is the value of D when A is false and D → A is true  ¬ D
  • 21. Rushdi Shams, Dept of CSE, KUET, Bangladesh 21 Rules for Inference: Modus Tollens  If given α → β and we know ¬β Then ¬α
  • 22. Rushdi Shams, Dept of CSE, KUET, Bangladesh 22 Deduction: Rule of Inference 6. Cat fur was found at the scene of the crime. (Follows from 1 C v D and 5 ¬ D). When is ¬ D true? When D is false- right? Now, take a look at the OR truth table. Find what is the value of C when D is false and C V D is true  C
  • 23. Rushdi Shams, Dept of CSE, KUET, Bangladesh 23 Rules for Inference: Disjunctive Syllogism  If given α v β and we know ¬α then β  If given α v β and we know ¬β then α
  • 24. Rushdi Shams, Dept of CSE, KUET, Bangladesh 24 Deduction: Rule of Inference 7. Macavity is responsible for the crime. (Conclusion. Follows from 3 C → M and 6 C). When is C → M true given that C is true? Take a look at the Implication truth table.  M
  • 25. Rushdi Shams, Dept of CSE, KUET, Bangladesh 25 Rules for Inference: Modus Ponens  If given α → β and we know α Then β
  • 26. Rushdi Shams, Dept of CSE, KUET, Bangladesh 26 References  Artificial Intelligence: A Modern Approach (2nd Edition) by Russell and Norvig Chapter 7  http://www.iep.utm.edu/p/prop-log.htm#H5