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

More Related Content

What's hot

L03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicL03 ai - knowledge representation using logic
L03 ai - knowledge representation using logic
Manjula V
 
Tutorial on Question Answering Systems
Tutorial on Question Answering Systems Tutorial on Question Answering Systems
Tutorial on Question Answering Systems
Saeedeh Shekarpour
 
BERT introduction
BERT introductionBERT introduction
BERT introduction
Hanwha System / ICT
 
5 csp
5 csp5 csp
5 csp
Mhd Sb
 
Language models
Language modelsLanguage models
Language models
Maryam Khordad
 
First order predicate logic (fopl)
First order predicate logic (fopl)First order predicate logic (fopl)
First order predicate logic (fopl)
chauhankapil
 
Inference in Bayesian Networks
Inference in Bayesian NetworksInference in Bayesian Networks
Inference in Bayesian Networks
guestfee8698
 
Knowledge representation and Predicate logic
Knowledge representation and Predicate logicKnowledge representation and Predicate logic
Knowledge representation and Predicate logic
Amey Kerkar
 
Unit4: Knowledge Representation
Unit4: Knowledge RepresentationUnit4: Knowledge Representation
Unit4: Knowledge Representation
Tekendra Nath Yogi
 
Syntax and semantics of propositional logic
Syntax and semantics of propositional logicSyntax and semantics of propositional logic
Syntax and semantics of propositional logic
Janet Stemwedel
 
Context Free Grammar
Context Free GrammarContext Free Grammar
Context Free Grammar
Akhil Kaushik
 
Class first order logic
Class first order logicClass first order logic
Class first order logic
chandsek666
 
Turing machines
Turing machinesTuring machines
Turing machines
surekamurali
 
Feature Engineering for NLP
Feature Engineering for NLPFeature Engineering for NLP
Feature Engineering for NLP
Bill Liu
 
Introduction to natural language processing
Introduction to natural language processingIntroduction to natural language processing
Introduction to natural language processing
Minh Pham
 
Recursive algorithms
Recursive algorithmsRecursive algorithms
Recursive algorithms
subhashchandra197
 
Ai lecture 10(unit03)
Ai lecture  10(unit03)Ai lecture  10(unit03)
Ai lecture 10(unit03)
vikas dhakane
 
1.3.2 non deterministic finite automaton
1.3.2 non deterministic finite automaton1.3.2 non deterministic finite automaton
1.3.2 non deterministic finite automaton
Sampath Kumar S
 
Theory of first order logic
Theory of first order logicTheory of first order logic
Theory of first order logic
Devaddd
 
Translating English to Propositional Logic
Translating English to Propositional LogicTranslating English to Propositional Logic
Translating English to Propositional Logic
Janet Stemwedel
 

What's hot (20)

L03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicL03 ai - knowledge representation using logic
L03 ai - knowledge representation using logic
 
Tutorial on Question Answering Systems
Tutorial on Question Answering Systems Tutorial on Question Answering Systems
Tutorial on Question Answering Systems
 
BERT introduction
BERT introductionBERT introduction
BERT introduction
 
5 csp
5 csp5 csp
5 csp
 
Language models
Language modelsLanguage models
Language models
 
First order predicate logic (fopl)
First order predicate logic (fopl)First order predicate logic (fopl)
First order predicate logic (fopl)
 
Inference in Bayesian Networks
Inference in Bayesian NetworksInference in Bayesian Networks
Inference in Bayesian Networks
 
Knowledge representation and Predicate logic
Knowledge representation and Predicate logicKnowledge representation and Predicate logic
Knowledge representation and Predicate logic
 
Unit4: Knowledge Representation
Unit4: Knowledge RepresentationUnit4: Knowledge Representation
Unit4: Knowledge Representation
 
Syntax and semantics of propositional logic
Syntax and semantics of propositional logicSyntax and semantics of propositional logic
Syntax and semantics of propositional logic
 
Context Free Grammar
Context Free GrammarContext Free Grammar
Context Free Grammar
 
Class first order logic
Class first order logicClass first order logic
Class first order logic
 
Turing machines
Turing machinesTuring machines
Turing machines
 
Feature Engineering for NLP
Feature Engineering for NLPFeature Engineering for NLP
Feature Engineering for NLP
 
Introduction to natural language processing
Introduction to natural language processingIntroduction to natural language processing
Introduction to natural language processing
 
Recursive algorithms
Recursive algorithmsRecursive algorithms
Recursive algorithms
 
Ai lecture 10(unit03)
Ai lecture  10(unit03)Ai lecture  10(unit03)
Ai lecture 10(unit03)
 
1.3.2 non deterministic finite automaton
1.3.2 non deterministic finite automaton1.3.2 non deterministic finite automaton
1.3.2 non deterministic finite automaton
 
Theory of first order logic
Theory of first order logicTheory of first order logic
Theory of first order logic
 
Translating English to Propositional Logic
Translating English to Propositional LogicTranslating English to Propositional Logic
Translating English to Propositional Logic
 

Similar to Propositional logic & inference

10a.ppt
10a.ppt10a.ppt
10a.ppt
sunil sharma
 
Logic agent
Logic agentLogic agent
Logic agent
Slideshare
 
Logic
LogicLogic
Logic
Yasir Khan
 
Lecture 4 representation with logic
Lecture 4   representation with logicLecture 4   representation with logic
Lecture 4 representation with logic
Vajira Thambawita
 
Logic.ppt
Logic.pptLogic.ppt
Logic.ppt
syedadamiya
 
AI-Unit4.ppt
AI-Unit4.pptAI-Unit4.ppt
AI-Unit4.ppt
ssuserd0df33
 
predicateLogic.ppt
predicateLogic.pptpredicateLogic.ppt
predicateLogic.ppt
MUZAMILALI48
 
Logic
LogicLogic
PropositionalLogic.ppt
PropositionalLogic.pptPropositionalLogic.ppt
PropositionalLogic.ppt
MArunyNandinikkutty
 
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
yaniarianneyani
 
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
AmirMohamedNabilSale
 
Cs6503 theory of computation book notes
Cs6503 theory of computation book notesCs6503 theory of computation book notes
Cs6503 theory of computation book notes
appasami
 
Unit i
Unit iUnit i
Unit i
TPLatchoumi
 
Logic
LogicLogic
Discrete mathematics suraj ppt
Discrete mathematics suraj pptDiscrete mathematics suraj ppt
Discrete mathematics suraj ppt
AshiskumarDash2
 
Inductive definitions
Inductive definitionsInductive definitions
Inductive definitions
lorcap
 
Top school in delhi ncr
Top school in delhi ncrTop school in delhi ncr
Top school in delhi ncr
Edhole.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 logic
PalGov
 
m7-logic.ppt
m7-logic.pptm7-logic.ppt
m7-logic.ppt
CarlosUmaa32
 
l4.pptx
l4.pptxl4.pptx

Similar to 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
 

More from 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 2010
Slideshare
 
Report generation
Report generationReport generation
Report generation
Slideshare
 
Trigger
TriggerTrigger
Trigger
Slideshare
 
Security in Relational model
Security in Relational modelSecurity in Relational model
Security in Relational model
Slideshare
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
Slideshare
 
OLAP
OLAPOLAP
Major issues in data mining
Major issues in data miningMajor issues in data mining
Major issues in data mining
Slideshare
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
Slideshare
 
What is in you
What is in youWhat is in you
What is in you
Slideshare
 
Logical reasoning 21.1.13
Logical reasoning 21.1.13Logical reasoning 21.1.13
Logical reasoning 21.1.13
Slideshare
 
Statistical learning
Statistical learningStatistical learning
Statistical learning
Slideshare
 
Resolution(decision)
Resolution(decision)Resolution(decision)
Resolution(decision)
Slideshare
 
Reinforcement learning 7313
Reinforcement learning 7313Reinforcement learning 7313
Reinforcement learning 7313
Slideshare
 
Neural networks
Neural networksNeural networks
Neural networks
Slideshare
 
Instance based learning
Instance based learningInstance based learning
Instance based learning
Slideshare
 
Statistical learning
Statistical learningStatistical learning
Statistical learning
Slideshare
 
Neural networks
Neural networksNeural networks
Neural networks
Slideshare
 
Logical reasoning
Logical reasoning Logical reasoning
Logical reasoning
Slideshare
 
Instance based learning
Instance based learningInstance based learning
Instance based learning
Slideshare
 
Input & output devices
Input & output devicesInput & output devices
Input & output devices
Slideshare
 

More from 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
 

Recently uploaded

Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
Bisnar Chase Personal Injury Attorneys
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 

Recently uploaded (20)

Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 

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