SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...
Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...
Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...Ashish Duggal
 
Logical Agents
Logical AgentsLogical Agents
Logical AgentsYasir Khan
 
Inference in First-Order Logic
Inference in First-Order Logic Inference in First-Order Logic
Inference in First-Order Logic Junya Tanaka
 
Water jug problem ai part 6
Water jug problem ai part 6Water jug problem ai part 6
Water jug problem ai part 6Kirti Verma
 
Knowledge Engineering in FOL.
Knowledge Engineering in FOL.Knowledge Engineering in FOL.
Knowledge Engineering in FOL.Megha Sharma
 
Finite State Machine.ppt.pptx
Finite State Machine.ppt.pptxFinite State Machine.ppt.pptx
Finite State Machine.ppt.pptxSKUP1
 
AI PPT-ALR_Unit-3-1.pdf
AI PPT-ALR_Unit-3-1.pdfAI PPT-ALR_Unit-3-1.pdf
AI PPT-ALR_Unit-3-1.pdflokesh406075
 
Knnowledge representation and logic lec 11 to lec 15
Knnowledge representation and logic lec 11 to lec 15Knnowledge representation and logic lec 11 to lec 15
Knnowledge representation and logic lec 11 to lec 15Subash Chandra Pakhrin
 
Knowledge Representation & Reasoning
Knowledge Representation & ReasoningKnowledge Representation & Reasoning
Knowledge Representation & ReasoningSajid Marwat
 
Representing uncertainty in expert systems
Representing uncertainty in expert systemsRepresenting uncertainty in expert systems
Representing uncertainty in expert systemsbhupendra kumar
 
Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)SHUBHAM KUMAR GUPTA
 
Turing machine implementation
Turing machine implementationTuring machine implementation
Turing machine implementationSinaRostami7
 
Non- Deterministic Algorithms
Non- Deterministic AlgorithmsNon- Deterministic Algorithms
Non- Deterministic AlgorithmsDipankar Boruah
 
Prolog Programming : Basics
Prolog Programming : BasicsProlog Programming : Basics
Prolog Programming : BasicsMitul Desai
 
Deciability (automata presentation)
Deciability (automata presentation)Deciability (automata presentation)
Deciability (automata presentation)Sagar Kumar
 

Was ist angesagt? (20)

Ai lab manual
Ai lab manualAi lab manual
Ai lab manual
 
5.1 greedy
5.1 greedy5.1 greedy
5.1 greedy
 
Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...
Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...
Artificial Intelligence (AI) | Prepositional logic (PL)and first order predic...
 
Logical Agents
Logical AgentsLogical Agents
Logical Agents
 
Inference in First-Order Logic
Inference in First-Order Logic Inference in First-Order Logic
Inference in First-Order Logic
 
Predicate logic
 Predicate logic Predicate logic
Predicate logic
 
Water jug problem ai part 6
Water jug problem ai part 6Water jug problem ai part 6
Water jug problem ai part 6
 
Knowledge Engineering in FOL.
Knowledge Engineering in FOL.Knowledge Engineering in FOL.
Knowledge Engineering in FOL.
 
Finite State Machine.ppt.pptx
Finite State Machine.ppt.pptxFinite State Machine.ppt.pptx
Finite State Machine.ppt.pptx
 
AI PPT-ALR_Unit-3-1.pdf
AI PPT-ALR_Unit-3-1.pdfAI PPT-ALR_Unit-3-1.pdf
AI PPT-ALR_Unit-3-1.pdf
 
Knnowledge representation and logic lec 11 to lec 15
Knnowledge representation and logic lec 11 to lec 15Knnowledge representation and logic lec 11 to lec 15
Knnowledge representation and logic lec 11 to lec 15
 
Knowledge Representation & Reasoning
Knowledge Representation & ReasoningKnowledge Representation & Reasoning
Knowledge Representation & Reasoning
 
Representing uncertainty in expert systems
Representing uncertainty in expert systemsRepresenting uncertainty in expert systems
Representing uncertainty in expert systems
 
Greedy method
Greedy method Greedy method
Greedy method
 
Randomized algorithms ver 1.0
Randomized algorithms ver 1.0Randomized algorithms ver 1.0
Randomized algorithms ver 1.0
 
Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)
 
Turing machine implementation
Turing machine implementationTuring machine implementation
Turing machine implementation
 
Non- Deterministic Algorithms
Non- Deterministic AlgorithmsNon- Deterministic Algorithms
Non- Deterministic Algorithms
 
Prolog Programming : Basics
Prolog Programming : BasicsProlog Programming : Basics
Prolog Programming : Basics
 
Deciability (automata presentation)
Deciability (automata presentation)Deciability (automata presentation)
Deciability (automata presentation)
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
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
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
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
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
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
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
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
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
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 Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 

Kürzlich hochgeladen (20)

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
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
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
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
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
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
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
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 Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 

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