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

More Related Content

PPTX
Knowledge representation In Artificial Intelligence
PDF
Artificial Intelligence (Complete Notes).pdf
PPTX
AI-09 Logic in AI
PPTX
Frames
PDF
IoT Physical Devices and End Points.pdf
PPTX
Forms of learning in ai
PPTX
Data Structures : hashing (1)
PPTX
Employee Management System
Knowledge representation In Artificial Intelligence
Artificial Intelligence (Complete Notes).pdf
AI-09 Logic in AI
Frames
IoT Physical Devices and End Points.pdf
Forms of learning in ai
Data Structures : hashing (1)
Employee Management System

What's hot (20)

PPT
Predicate logic_2(Artificial Intelligence)
PPTX
First order logic
PDF
I.BEST FIRST SEARCH IN AI
PDF
Artificial intelligence and first order logic
PPTX
Problem solving in Artificial Intelligence.pptx
PPTX
Knnowledge representation and logic lec 11 to lec 15
PPTX
Means End Analysis (MEA) in Artificial.pptx
PPTX
Semantic nets in artificial intelligence
PPTX
Planning in Artificial Intelligence
PPT
AI Lecture 3 (solving problems by searching)
PPTX
Knowledge representation and Predicate logic
PDF
Artificial Intelligence Chap.5 : Uncertainty
PPT
First order logic
PPTX
Predicate logic
PDF
Artificial Intelligence - Hill climbing.
PDF
Daa notes 3
PPT
AI Lecture 4 (informed search and exploration)
PPTX
Semantic Networks
PPTX
Artificial Intelligence Notes Unit 3
PPTX
Resolution method in AI.pptx
Predicate logic_2(Artificial Intelligence)
First order logic
I.BEST FIRST SEARCH IN AI
Artificial intelligence and first order logic
Problem solving in Artificial Intelligence.pptx
Knnowledge representation and logic lec 11 to lec 15
Means End Analysis (MEA) in Artificial.pptx
Semantic nets in artificial intelligence
Planning in Artificial Intelligence
AI Lecture 3 (solving problems by searching)
Knowledge representation and Predicate logic
Artificial Intelligence Chap.5 : Uncertainty
First order logic
Predicate logic
Artificial Intelligence - Hill climbing.
Daa notes 3
AI Lecture 4 (informed search and exploration)
Semantic Networks
Artificial Intelligence Notes Unit 3
Resolution method in AI.pptx
Ad

Viewers also liked (20)

PPTX
Propositional logic & inference
PPT
Syntax and semantics of propositional logic
PPTX
Propositional logic
PPTX
Propositional logic sneha-mam
PPT
Propositional And First-Order Logic
PDF
Logic (slides)
PPT
Predicate Logic
PDF
03 - Predicate logic
PPT
Propositional logic for Beginners
PPT
Propositional logic
PPTX
Logic part1
PPTX
#3 formal methods – propositional logic
PPT
Knowledge Representation in Artificial intelligence
PDF
L1 l2 l3 introduction to machine translation
PPTX
Probabilistic logic
PPT
L13 why software fails
PPT
L15 fuzzy logic
PPT
Knowledge representation
PPT
Propositional logic
PPT
Lecture 5, 6 and 7 cpu scheduling
Propositional logic & inference
Syntax and semantics of propositional logic
Propositional logic
Propositional logic sneha-mam
Propositional And First-Order Logic
Logic (slides)
Predicate Logic
03 - Predicate logic
Propositional logic for Beginners
Propositional logic
Logic part1
#3 formal methods – propositional logic
Knowledge Representation in Artificial intelligence
L1 l2 l3 introduction to machine translation
Probabilistic logic
L13 why software fails
L15 fuzzy logic
Knowledge representation
Propositional logic
Lecture 5, 6 and 7 cpu scheduling
Ad

More from Rushdi Shams (20)

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

Recently uploaded (20)

PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Business Ethics Teaching Materials for college
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Cell Types and Its function , kingdom of life
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
Pharma ospi slides which help in ospi learning
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
STATICS OF THE RIGID BODIES Hibbelers.pdf
Business Ethics Teaching Materials for college
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
VCE English Exam - Section C Student Revision Booklet
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Cell Types and Its function , kingdom of life
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Microbial disease of the cardiovascular and lymphatic systems
Supply Chain Operations Speaking Notes -ICLT Program
Final Presentation General Medicine 03-08-2024.pptx
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
102 student loan defaulters named and shamed – Is someone you know on the list?
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Pharma ospi slides which help in ospi learning
Abdominal Access Techniques with Prof. Dr. R K Mishra
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...

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