SlideShare uma empresa 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

Mais conteúdo relacionado

Mais procurados

Cs2303 theory of computation all anna University question papers
Cs2303 theory of computation all anna University question papersCs2303 theory of computation all anna University question papers
Cs2303 theory of computation all anna University question papersappasami
 
Predicates and Quantifiers
Predicates and QuantifiersPredicates and Quantifiers
Predicates and Quantifiersblaircomp2003
 
Fuzzy logic and application in AI
Fuzzy logic and application in AIFuzzy logic and application in AI
Fuzzy logic and application in AIIldar Nurgaliev
 
Propositional logic
Propositional logicPropositional logic
Propositional logicRushdi Shams
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automatadeepinderbedi
 
knowledge representation using rules
knowledge representation using rulesknowledge representation using rules
knowledge representation using rulesHarini Balamurugan
 
Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AIMegha Sharma
 
Predicate Logic
Predicate LogicPredicate Logic
Predicate Logicgiki67
 
Ch 7 Knowledge Representation.pdf
Ch 7 Knowledge Representation.pdfCh 7 Knowledge Representation.pdf
Ch 7 Knowledge Representation.pdfKrishnaMadala1
 
Lecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceLecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceasimnawaz54
 
ProLog (Artificial Intelligence) Introduction
ProLog (Artificial Intelligence) IntroductionProLog (Artificial Intelligence) Introduction
ProLog (Artificial Intelligence) Introductionwahab khan
 
Undecidable Problem
Undecidable ProblemUndecidable Problem
Undecidable ProblemMGoodhew
 
Lecture 1: Semantic Analysis in Language Technology
Lecture 1: Semantic Analysis in Language TechnologyLecture 1: Semantic Analysis in Language Technology
Lecture 1: Semantic Analysis in Language TechnologyMarina Santini
 

Mais procurados (20)

Cs2303 theory of computation all anna University question papers
Cs2303 theory of computation all anna University question papersCs2303 theory of computation all anna University question papers
Cs2303 theory of computation all anna University question papers
 
Predicates and Quantifiers
Predicates and QuantifiersPredicates and Quantifiers
Predicates and Quantifiers
 
Fuzzy logic and application in AI
Fuzzy logic and application in AIFuzzy logic and application in AI
Fuzzy logic and application in AI
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
First order logic
First order logicFirst order logic
First order logic
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automata
 
knowledge representation using rules
knowledge representation using rulesknowledge representation using rules
knowledge representation using rules
 
Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AI
 
Predicate Logic
Predicate LogicPredicate Logic
Predicate Logic
 
Knowledge based agents
Knowledge based agentsKnowledge based agents
Knowledge based agents
 
Ch 7 Knowledge Representation.pdf
Ch 7 Knowledge Representation.pdfCh 7 Knowledge Representation.pdf
Ch 7 Knowledge Representation.pdf
 
Lecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceLecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inference
 
ProLog (Artificial Intelligence) Introduction
ProLog (Artificial Intelligence) IntroductionProLog (Artificial Intelligence) Introduction
ProLog (Artificial Intelligence) Introduction
 
Undecidable Problem
Undecidable ProblemUndecidable Problem
Undecidable Problem
 
Kleene's theorem
Kleene's theoremKleene's theorem
Kleene's theorem
 
Lecture 1: Semantic Analysis in Language Technology
Lecture 1: Semantic Analysis in Language TechnologyLecture 1: Semantic Analysis in Language Technology
Lecture 1: Semantic Analysis in Language Technology
 
Normal forms
Normal formsNormal forms
Normal forms
 
Kr using rules
Kr using rulesKr using rules
Kr using rules
 
Truth table
Truth tableTruth table
Truth table
 
Predicate logic
 Predicate logic Predicate logic
Predicate logic
 

Semelhante a Propositional Logic Rules and 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
 

Semelhante a Propositional Logic Rules and 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
 

Mais 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
 

Mais 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

Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
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
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
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
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
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
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
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
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 

Último (20)

Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
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
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
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
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
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
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
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
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 

Propositional Logic Rules and 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