SlideShare una empresa de Scribd logo
1 de 22
Propositional
Logic
V.Saranya
AP/CSE
Sri Vidya College of Engineering and
Technology,
Virudhunagar
Definition
• a branch of symbolic logic dealing with
propositions (proposal, scheme, plan) as units
and with their combinations and the
connectives that relate them.
Syntax
• Defines the allowable sentences.
• Atomic Sentence:
– Consist of single proposition symbol.
– Either TRUE or FALSE
• Rules:
– Uppercase names used for symbols P,O,R
– Names are arbitrary (uninformed or random)
»Example:
»W[1,3]  Wumpus in [1,3]
Complex sentences
• Constructed from simple sentences.
• Using logical connectives.
 ...and [conjunction]
 ...or [disjunction]
...implies [implication / conditional]
..(if & only if)is equivalent [bi-conditional]
 ...not [negation]
BNF (Backus Naur Form)
• Grammar of sentences in propositional logic
Sentence  Atomic Sentence | complex sentence
Atomic sentence  True|False|Symbol
Symbol  P, Q,R
Complex Sentence  ¬ sentence
|Sentence ˄ Sentence
|Sentence ˄ Sentence
|Sentence  Sentence
|Sentence  Sentence
• Every sentence constructed with binary
connectives must be enclosed in parenthesis
((A ˄B) C)  right form
A ˄B C  wrong one
Multiplication has higher precedence than addition
Order of precedence is
, ˄,V,  and 
(i) A ˄ B ˄ Cread as (A ˄B) ˄ C (or) A ˄(B ˄ C)
(ii) ¬ P ˄Q˄ RS
((¬ P) ˄(Q˄ R))S
Semantics
• Defines the rules.
• Model fixes truth vales true or false for every
propositional symbol.
• Semantics  specify how to compute the
truth of sentences formed with each of 5
connectives.
• Ex; (Wumpus World)
M1= { P1,2 = False, P2,2 = False, P3,1= True}
• Atomic sentences are easy
– True is true in every model
– False is false in every model.
• Complex Sentence
– Using “ Truth Table”
Example 1:
• Evaluate the sentence
¬ P1,2 ˄(P2,2 ˄ P3,1)  (True ˄ (False ˄ True)
Result= True
Example 2:
5 is even implies sam is smart
This sentence will be true if sam is smart
P => Q is only FALSE when the Premise(p)
is TRUE AND Consequence(Q) is FALSE.
P => Q is always TRUE when the Premise(P)
is FALSE OR the Consequence(Q) is TRUE.
Example 3:
• B1,1  (P1,2 ˄P2,1)
– B1,1 means breeze in [1,1]
– P1,2 means pit in [1,2]
– P2,1 means pit in [2,1]
– So False  False
Now
Result : True
Example 3:
• B1,1 (P1,2 ˄P2,1)
• The result is true
• But incomplete (violate the rules of
wumpus world)
A Simple Knowledge Base
• Take Pits alone
• i,j  values
• Let Pi,j be true if there is a pit in [i,j]
• Let Bi,j be true if there is a breeze in [i,j]
KB
1. There is no pit in [1,1]
 R1 : ¬P1,1
2. A square is breeze if and only if there is a pit
in a neighboring square.
 R2 : B1,1  (P1,2 ˄P2,1)
 R3 : B2,1  (P1,1 ˄P1,2 ˄P3,1)
3. The above 2 sentences are true in all wumpus
world. Now after visiting 2 squares
 R4 : ¬B1,1
 R5 : B2,1
• KB consists of R1 to R5 Consider the all
above in 5 single sentences
 R1 ˄ R2 ˄ R3 ˄ R4 ˄ R5
Concluded that all 5 sentences are
True
Inference(conclusion, assumption..)
• Used to decide whether α is true in every
model in which KB is true.
Example: Wumpus World
B1,2 , B2,1 , P1,1 , P2,2 , P3,1, P1,2 , P2,1
So totally 27=128 models are possible
Truth table for the given KB
From the table KB is true if R1 through R5 is true
 in all 3 rows P1,2 is false so there is no pit in
[1,2].
There may be or may not be pit in [2,2]
Truth Table Enumeration Algorithm
• Here TT  truth table
• This enumeration algorithm is sound and
complete because it works for any KB and
alpha and always terminates.
• Complexity:
– Time complexity  O(2 power n)
– Space complexity  O(n)
n symbols
Equivalence
• 2 sentences are logically true in the same set of models then P  Q.
• Also P ˄Q and Q ˄ P are logically equivalence
Validity
• A sentence is valid if it is true in all the models
Example:
• P ˄ ¬P is valid.
• Valid is also know as tautologies.
Satisfiability
• A sentence is true if it is true in some model.
A sentence is satisfiable if it is true in some model
e.g., A  B, C
A sentence is unsatisfiable if it is true in no models
e.g., A  A
• Validity and satisfiability are connected.
• α is valid if α is satisfiable.
• α is valid if ¬α is unsatisfiable.
• ¬α is satisfiable if ¬α is not valid

Más contenido relacionado

La actualidad más candente

Unit I discrete mathematics lecture notes
Unit I  discrete mathematics lecture notesUnit I  discrete mathematics lecture notes
Unit I discrete mathematics lecture notesGIRIM8
 
Lec 02 logical eq (Discrete Mathematics)
Lec 02   logical eq (Discrete Mathematics)Lec 02   logical eq (Discrete Mathematics)
Lec 02 logical eq (Discrete Mathematics)Naosher Md. Zakariyar
 
Proofs by contraposition
Proofs by contrapositionProofs by contraposition
Proofs by contrapositionAbdur Rehman
 
Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)SHUBHAM KUMAR GUPTA
 
Method of direct proof
Method of direct proofMethod of direct proof
Method of direct proofAbdur Rehman
 
Discrete Math Presentation(Rules of Inference)
Discrete Math Presentation(Rules of Inference)Discrete Math Presentation(Rules of Inference)
Discrete Math Presentation(Rules of Inference)Ikhtiar Khan Sohan
 
Propositional logic
Propositional logicPropositional logic
Propositional logicRushdi Shams
 
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 And First-Order Logic
Propositional And First-Order LogicPropositional And First-Order Logic
Propositional And First-Order Logicankush_kumar
 
Discrete Structures lecture 2
 Discrete Structures lecture 2 Discrete Structures lecture 2
Discrete Structures lecture 2Ali Usman
 
Jarrar: Propositional Logic Inference Methods
Jarrar: Propositional Logic Inference MethodsJarrar: Propositional Logic Inference Methods
Jarrar: Propositional Logic Inference MethodsMustafa Jarrar
 

La actualidad más candente (20)

Unit I discrete mathematics lecture notes
Unit I  discrete mathematics lecture notesUnit I  discrete mathematics lecture notes
Unit I discrete mathematics lecture notes
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Lec 02 logical eq (Discrete Mathematics)
Lec 02   logical eq (Discrete Mathematics)Lec 02   logical eq (Discrete Mathematics)
Lec 02 logical eq (Discrete Mathematics)
 
Proofs by contraposition
Proofs by contrapositionProofs by contraposition
Proofs by contraposition
 
Proof By Contradictions
Proof By ContradictionsProof By Contradictions
Proof By Contradictions
 
Discrete Math Lecture 03: Methods of Proof
Discrete Math Lecture 03: Methods of ProofDiscrete Math Lecture 03: Methods of Proof
Discrete Math Lecture 03: Methods of Proof
 
Propositional Logic and Pridicate logic
Propositional Logic and Pridicate logicPropositional Logic and Pridicate logic
Propositional Logic and Pridicate logic
 
Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)
 
Method of direct proof
Method of direct proofMethod of direct proof
Method of direct proof
 
Discrete Math Presentation(Rules of Inference)
Discrete Math Presentation(Rules of Inference)Discrete Math Presentation(Rules of Inference)
Discrete Math Presentation(Rules of Inference)
 
Discrete math Truth Table
Discrete math Truth TableDiscrete math Truth Table
Discrete math Truth Table
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Syntax and semantics of propositional logic
Syntax and semantics of propositional logicSyntax and semantics of propositional logic
Syntax and semantics of propositional logic
 
Propositional And First-Order Logic
Propositional And First-Order LogicPropositional And First-Order Logic
Propositional And First-Order Logic
 
Discrete Structures lecture 2
 Discrete Structures lecture 2 Discrete Structures lecture 2
Discrete Structures lecture 2
 
Logic 2
Logic 2Logic 2
Logic 2
 
Recursion DM
Recursion DMRecursion DM
Recursion DM
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Proof by contradiction
Proof by contradictionProof by contradiction
Proof by contradiction
 
Jarrar: Propositional Logic Inference Methods
Jarrar: Propositional Logic Inference MethodsJarrar: Propositional Logic Inference Methods
Jarrar: Propositional Logic Inference Methods
 

Similar a Propositional logic & inference

Lecture 4 representation with logic
Lecture 4   representation with logicLecture 4   representation with logic
Lecture 4 representation with logicVajira Thambawita
 
predicateLogic.ppt
predicateLogic.pptpredicateLogic.ppt
predicateLogic.pptMUZAMILALI48
 
Introduction to Logic Spring 2007 Introduction to Discrete Structures.ppt
Introduction to Logic Spring 2007 Introduction to Discrete Structures.pptIntroduction to Logic Spring 2007 Introduction to Discrete Structures.ppt
Introduction to Logic Spring 2007 Introduction to Discrete Structures.pptyaniarianneyani
 
6.c-CMPS 403-F19-Session 6-Resolution.pdf
6.c-CMPS 403-F19-Session 6-Resolution.pdf6.c-CMPS 403-F19-Session 6-Resolution.pdf
6.c-CMPS 403-F19-Session 6-Resolution.pdfAmirMohamedNabilSale
 
Cs6503 theory of computation book notes
Cs6503 theory of computation book notesCs6503 theory of computation book notes
Cs6503 theory of computation book notesappasami
 
Discrete mathematics suraj ppt
Discrete mathematics suraj pptDiscrete mathematics suraj ppt
Discrete mathematics suraj pptAshiskumarDash2
 
Inductive definitions
Inductive definitionsInductive definitions
Inductive definitionslorcap
 
Top school in delhi ncr
Top school in delhi ncrTop school in delhi ncr
Top school in delhi ncrEdhole.com
 
Jarrar.lecture notes.aai.2011s.ch7.p logic
Jarrar.lecture notes.aai.2011s.ch7.p logicJarrar.lecture notes.aai.2011s.ch7.p logic
Jarrar.lecture notes.aai.2011s.ch7.p logicPalGov
 

Similar a Propositional logic & inference (20)

10a.ppt
10a.ppt10a.ppt
10a.ppt
 
Logic agent
Logic agentLogic agent
Logic agent
 
Logic
LogicLogic
Logic
 
Lecture 4 representation with logic
Lecture 4   representation with logicLecture 4   representation with logic
Lecture 4 representation with logic
 
Logic.ppt
Logic.pptLogic.ppt
Logic.ppt
 
AI-Unit4.ppt
AI-Unit4.pptAI-Unit4.ppt
AI-Unit4.ppt
 
predicateLogic.ppt
predicateLogic.pptpredicateLogic.ppt
predicateLogic.ppt
 
Logic
LogicLogic
Logic
 
PropositionalLogic.ppt
PropositionalLogic.pptPropositionalLogic.ppt
PropositionalLogic.ppt
 
Introduction to Logic Spring 2007 Introduction to Discrete Structures.ppt
Introduction to Logic Spring 2007 Introduction to Discrete Structures.pptIntroduction to Logic Spring 2007 Introduction to Discrete Structures.ppt
Introduction to Logic Spring 2007 Introduction to Discrete Structures.ppt
 
6.c-CMPS 403-F19-Session 6-Resolution.pdf
6.c-CMPS 403-F19-Session 6-Resolution.pdf6.c-CMPS 403-F19-Session 6-Resolution.pdf
6.c-CMPS 403-F19-Session 6-Resolution.pdf
 
Cs6503 theory of computation book notes
Cs6503 theory of computation book notesCs6503 theory of computation book notes
Cs6503 theory of computation book notes
 
Unit i
Unit iUnit i
Unit i
 
Logic
LogicLogic
Logic
 
Discrete mathematics suraj ppt
Discrete mathematics suraj pptDiscrete mathematics suraj ppt
Discrete mathematics suraj ppt
 
Inductive definitions
Inductive definitionsInductive definitions
Inductive definitions
 
Top school in delhi ncr
Top school in delhi ncrTop school in delhi ncr
Top school in delhi ncr
 
Jarrar.lecture notes.aai.2011s.ch7.p logic
Jarrar.lecture notes.aai.2011s.ch7.p logicJarrar.lecture notes.aai.2011s.ch7.p logic
Jarrar.lecture notes.aai.2011s.ch7.p logic
 
m7-logic.ppt
m7-logic.pptm7-logic.ppt
m7-logic.ppt
 
l4.pptx
l4.pptxl4.pptx
l4.pptx
 

Más de Slideshare

Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010Slideshare
 
Report generation
Report generationReport generation
Report generationSlideshare
 
Security in Relational model
Security in Relational modelSecurity in Relational model
Security in Relational modelSlideshare
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship ModelSlideshare
 
Major issues in data mining
Major issues in data miningMajor issues in data mining
Major issues in data miningSlideshare
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessingSlideshare
 
What is in you
What is in youWhat is in you
What is in youSlideshare
 
Logical reasoning 21.1.13
Logical reasoning 21.1.13Logical reasoning 21.1.13
Logical reasoning 21.1.13Slideshare
 
Statistical learning
Statistical learningStatistical learning
Statistical learningSlideshare
 
Resolution(decision)
Resolution(decision)Resolution(decision)
Resolution(decision)Slideshare
 
Reinforcement learning 7313
Reinforcement learning 7313Reinforcement learning 7313
Reinforcement learning 7313Slideshare
 
Neural networks
Neural networksNeural networks
Neural networksSlideshare
 
Instance based learning
Instance based learningInstance based learning
Instance based learningSlideshare
 
Statistical learning
Statistical learningStatistical learning
Statistical learningSlideshare
 
Neural networks
Neural networksNeural networks
Neural networksSlideshare
 
Logical reasoning
Logical reasoning Logical reasoning
Logical reasoning Slideshare
 
Instance based learning
Instance based learningInstance based learning
Instance based learningSlideshare
 
Input & output devices
Input & output devicesInput & output devices
Input & output devicesSlideshare
 

Más de Slideshare (20)

Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010
 
Report generation
Report generationReport generation
Report generation
 
Trigger
TriggerTrigger
Trigger
 
Security in Relational model
Security in Relational modelSecurity in Relational model
Security in Relational model
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
OLAP
OLAPOLAP
OLAP
 
Major issues in data mining
Major issues in data miningMajor issues in data mining
Major issues in data mining
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
 
What is in you
What is in youWhat is in you
What is in you
 
Logical reasoning 21.1.13
Logical reasoning 21.1.13Logical reasoning 21.1.13
Logical reasoning 21.1.13
 
Statistical learning
Statistical learningStatistical learning
Statistical learning
 
Resolution(decision)
Resolution(decision)Resolution(decision)
Resolution(decision)
 
Reinforcement learning 7313
Reinforcement learning 7313Reinforcement learning 7313
Reinforcement learning 7313
 
Neural networks
Neural networksNeural networks
Neural networks
 
Instance based learning
Instance based learningInstance based learning
Instance based learning
 
Statistical learning
Statistical learningStatistical learning
Statistical learning
 
Neural networks
Neural networksNeural networks
Neural networks
 
Logical reasoning
Logical reasoning Logical reasoning
Logical reasoning
 
Instance based learning
Instance based learningInstance based learning
Instance based learning
 
Input & output devices
Input & output devicesInput & output devices
Input & output devices
 

Último

Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxUmeshTimilsina1
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 

Último (20)

Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 

Propositional logic & inference

  • 1. Propositional Logic V.Saranya AP/CSE Sri Vidya College of Engineering and Technology, Virudhunagar
  • 2. Definition • a branch of symbolic logic dealing with propositions (proposal, scheme, plan) as units and with their combinations and the connectives that relate them.
  • 3. Syntax • Defines the allowable sentences. • Atomic Sentence: – Consist of single proposition symbol. – Either TRUE or FALSE • Rules: – Uppercase names used for symbols P,O,R – Names are arbitrary (uninformed or random) »Example: »W[1,3]  Wumpus in [1,3]
  • 4. Complex sentences • Constructed from simple sentences. • Using logical connectives.  ...and [conjunction]  ...or [disjunction] ...implies [implication / conditional] ..(if & only if)is equivalent [bi-conditional]  ...not [negation]
  • 5. BNF (Backus Naur Form) • Grammar of sentences in propositional logic Sentence  Atomic Sentence | complex sentence Atomic sentence  True|False|Symbol Symbol  P, Q,R Complex Sentence  ¬ sentence |Sentence ˄ Sentence |Sentence ˄ Sentence |Sentence  Sentence |Sentence  Sentence
  • 6. • Every sentence constructed with binary connectives must be enclosed in parenthesis ((A ˄B) C)  right form A ˄B C  wrong one Multiplication has higher precedence than addition Order of precedence is , ˄,V,  and  (i) A ˄ B ˄ Cread as (A ˄B) ˄ C (or) A ˄(B ˄ C) (ii) ¬ P ˄Q˄ RS ((¬ P) ˄(Q˄ R))S
  • 7. Semantics • Defines the rules. • Model fixes truth vales true or false for every propositional symbol. • Semantics  specify how to compute the truth of sentences formed with each of 5 connectives. • Ex; (Wumpus World) M1= { P1,2 = False, P2,2 = False, P3,1= True}
  • 8. • Atomic sentences are easy – True is true in every model – False is false in every model. • Complex Sentence – Using “ Truth Table”
  • 9. Example 1: • Evaluate the sentence ¬ P1,2 ˄(P2,2 ˄ P3,1)  (True ˄ (False ˄ True) Result= True Example 2: 5 is even implies sam is smart This sentence will be true if sam is smart P => Q is only FALSE when the Premise(p) is TRUE AND Consequence(Q) is FALSE. P => Q is always TRUE when the Premise(P) is FALSE OR the Consequence(Q) is TRUE.
  • 10. Example 3: • B1,1  (P1,2 ˄P2,1) – B1,1 means breeze in [1,1] – P1,2 means pit in [1,2] – P2,1 means pit in [2,1] – So False  False Now Result : True Example 3: • B1,1 (P1,2 ˄P2,1) • The result is true • But incomplete (violate the rules of wumpus world)
  • 11. A Simple Knowledge Base • Take Pits alone • i,j  values • Let Pi,j be true if there is a pit in [i,j] • Let Bi,j be true if there is a breeze in [i,j]
  • 12. KB 1. There is no pit in [1,1]  R1 : ¬P1,1 2. A square is breeze if and only if there is a pit in a neighboring square.  R2 : B1,1  (P1,2 ˄P2,1)  R3 : B2,1  (P1,1 ˄P1,2 ˄P3,1) 3. The above 2 sentences are true in all wumpus world. Now after visiting 2 squares  R4 : ¬B1,1  R5 : B2,1
  • 13. • KB consists of R1 to R5 Consider the all above in 5 single sentences  R1 ˄ R2 ˄ R3 ˄ R4 ˄ R5 Concluded that all 5 sentences are True
  • 14. Inference(conclusion, assumption..) • Used to decide whether α is true in every model in which KB is true. Example: Wumpus World B1,2 , B2,1 , P1,1 , P2,2 , P3,1, P1,2 , P2,1 So totally 27=128 models are possible
  • 15. Truth table for the given KB
  • 16. From the table KB is true if R1 through R5 is true  in all 3 rows P1,2 is false so there is no pit in [1,2]. There may be or may not be pit in [2,2]
  • 18. • Here TT  truth table • This enumeration algorithm is sound and complete because it works for any KB and alpha and always terminates. • Complexity: – Time complexity  O(2 power n) – Space complexity  O(n) n symbols
  • 19. Equivalence • 2 sentences are logically true in the same set of models then P  Q. • Also P ˄Q and Q ˄ P are logically equivalence
  • 20. Validity • A sentence is valid if it is true in all the models Example: • P ˄ ¬P is valid. • Valid is also know as tautologies.
  • 21. Satisfiability • A sentence is true if it is true in some model. A sentence is satisfiable if it is true in some model e.g., A  B, C A sentence is unsatisfiable if it is true in no models e.g., A  A
  • 22. • Validity and satisfiability are connected. • α is valid if α is satisfiable. • α is valid if ¬α is unsatisfiable. • ¬α is satisfiable if ¬α is not valid