is true in all worlds (rows) where kb is true…so it is entailed
DESCRIPTION
is true in all worlds (rows) Where KB is true…so it is entailed. Using CSP To do propositional inference. KB&~ a. False False False False False False False False. So, to check if KB entails a , negate a , add it to the KB, try to show that the resultant (propositional) CSP - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/1.jpg)
![Page 2: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/2.jpg)
![Page 3: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/3.jpg)
![Page 4: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/4.jpg)
Prop logic
First order predicate logic(FOPC)
Prob. Prop. logic
Objects,relations
Degree ofbelief
First order Prob. logic
Objects,relations
Degree ofbelief
Degree oftruth
Fuzzy Logic
Time
First order Temporal logic(FOPC)
![Page 5: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/5.jpg)
![Page 6: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/6.jpg)
![Page 7: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/7.jpg)
![Page 8: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/8.jpg)
![Page 9: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/9.jpg)
![Page 10: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/10.jpg)
![Page 11: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/11.jpg)
is true in all worlds (rows) Where KB is true…so it is entailed
![Page 12: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/12.jpg)
![Page 13: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/13.jpg)
KB&~
FalseFalseFalseFalseFalseFalseFalseFalse
So, to check if KB entails , negate , add it to the KB, try to show that the resultant (propositional) CSP has no solutions (must have to use systematic methods)
Using CSPTo do propositional inference
![Page 14: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/14.jpg)
Inference rules
• Sound (but incomplete)
– Modus Ponens• A=>B, A |= B
– Modus tollens• A=>B,~B |= ~A
– Abduction (??)• A => B,~A |= ~B
– Chaining• A=>B,B=>C |= A=>C
• Complete (but unsound)– “Python” logic
How about SOUND & COMPLETE? --Resolution (needs normal forms)
![Page 15: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/15.jpg)
Python logic
Tell me what you do with witches?BurnAnd what do you burn apart from witches? More witches! Shh! Wood! So, why do witches burn? [pause] B--... 'cause they're made of... wood? Good! Heh heh. Oh, yeah. Oh. So, how do we tell whether she is made of wood? []. Does wood sink in water? No. No. No, it floats! It floats! Throw her into the pond! The pond! Throw her into the pond! What also floats in water? Bread! Apples! Uh, very small rocks!
ARTHUR: A duck! CROWD: Oooh. BEDEVERE: Exactly. So, logically... VILLAGER #1: If... she... weighs... the same as a duck,... she's made of wood. BEDEVERE:
And therefore? VILLAGER #2: A witch! VILLAGER #1: A witch!
![Page 16: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/16.jpg)
Lecture of 6th Nov
rtificial IntelligenceCSE471 Introduction to
![Page 17: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/17.jpg)
![Page 18: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/18.jpg)
![Page 19: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/19.jpg)
Conversion to CNF form
• CNF clause= Disjunction of literals
– Literal = a proposition or a negated proposition
– Conversion:
• Remove implication
• Pull negation
• Use demorgans laws to distribute disjunction over conjunction
BVC
AVCCBA
B
ABABABA
B
ABA
BABA
)(
)()(
ANY propositional logic sentencecan be converted into CNF formTry: ~(P&Q)=>~(R V W)
![Page 20: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/20.jpg)
Need for resolution
Yankees win, it is Destiny ~YVDDbacks win, it is Destiny ~Db V DYankees or Dbacks win Y V DbIs it Destiny either way? |= D?
Can Modus Ponens derive it? Not until Sunday, when Db won
DVY
DVD == D
Resolution does case analysis
Don’t need to use otherequivalences if we useresolution in refutation style~D ~Y~Y V D~Db V D Y V Db
~Db~D
![Page 21: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/21.jpg)
Steps in Resolution Refutation• Consider the following problem
– If the grass is wet, then it is either raining or the sprinkler is on• GW => R V SP ~GW V R V SP
– If it is raining, then Timmy is happy• R => TH ~R V TH
– If the sprinklers are on, Timmy is happy• SP => TH ~SP V TH
– If timmy is happy, then he sings• TH => SG ~TH V SG
– Timmy is not singing• ~SG ~SG
– Prove that the grass is not wet• |= ~GW? GW R V SP
TH V SP
SG V SP
SPTHSG
Is there search in inference? Yes!! Many possible inferences can be done Only few are actually relevant --Idea: Set of Support At least one of the resolved clauses is a goal clause, or a descendant of a clause derived from a goal clause -- Used in the example here!!
![Page 22: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/22.jpg)
Search in Resolution
• Convert the database into clausal form Dc
• Negate the goal first, and then convert it into clausal form DG
• Let D = Dc+ DG
• Loop – Select a pair of Clauses C1 and C2 from D
• Different control strategies can be used to select C1 and C2
– Resolve C1 and C2 to get C12
– If C12 is empty clause, QED!! Return Success (We proved the theorem; )
– D = D + C12
– End loop
• If we come here, we couldn’t get empty clause. Return “Failure”
![Page 23: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/23.jpg)
Complexity of Inference
• Any sound and complete inference procedure has to be Co-NP-Complete (since model-theoretic entailment computation is Co-NP-Complete (since model-theoretic satisfiability is NP-complete))
• Given a propositional database of size d– Any sentence S that follows from the database by modus ponens can be
derived in linear time• If the database has only HORN sentences (sentences whose CNF form
has at most one +ve clause), then MP is complete for that database.– PROLOG uses (first order) horn sentences
– Deriving all sentences that follow by resolution is Co-NP-Complete (exponential)
• Anything that follows by unit-resolution can be derived in linear time. – Unit resolution: At least one of the clauses should be a clause of length 1
![Page 24: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/24.jpg)
Consistency enforcement as inference
A:{1,2} B:{1,2}A<BA=1 V A=2B=1 V B=2~(A=1) V ~(B=1)~(A=2) V ~(B=1)~(A=2) V ~(B=2)
A=2 V ~(B=1)
~(B=1) V ~(B=1) = ~(B=1)
A:{1,2} B:{1,2} A<B Currently, B=2A=1 V A=2B=1 V B=2~(A=1) V ~(B=1)~(A=2) V ~(B=1)~(A=2) V ~(B=2) B=2 ~(A=2)
1-level “unit resolution”
One of the resolvers isDerived from A’s domainConstraint. The other is a Inter-variable constraint ofSize 2
![Page 25: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/25.jpg)
Inference/Theorem Proving
Satisfaction“Conditioning”
Inferencesatisfaction
Inference/Satisfaction (Conditioning) Duality
“Try to explicate hidden structure”
“Try to split cases (disjunction) into search tree (by committing)”
![Page 26: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/26.jpg)
Summary of Propositional Logic
• Syntax• Semantics (entailment)• Entailment computation
– Model-theoretic• Using CSP techniques
– Proof-theoretic• Resolution refutation
– Heuristics to limit type of resolutions» Set of support
• Connection to CSP– K-consistency can be seen as a form of limited inference
![Page 27: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/27.jpg)
Probabilistic Propositional Logic
![Page 28: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/28.jpg)
Why FOPC
If your thesis is utter vacuousUse first-order predicate calculus.With sufficient formalityThe sheerest banality
Will be hailed by the critics: "Miraculous!"
![Page 29: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/29.jpg)
![Page 30: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/30.jpg)
![Page 31: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/31.jpg)
![Page 32: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/32.jpg)
![Page 33: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/33.jpg)
![Page 34: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/34.jpg)
![Page 35: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/35.jpg)
![Page 36: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/36.jpg)
![Page 37: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/37.jpg)
![Page 38: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/38.jpg)
![Page 39: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/39.jpg)
![Page 40: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/40.jpg)
![Page 41: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/41.jpg)
![Page 42: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/42.jpg)
![Page 43: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/43.jpg)
![Page 44: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/44.jpg)
![Page 45: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/45.jpg)
![Page 46: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/46.jpg)
![Page 47: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/47.jpg)
![Page 48: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/48.jpg)
![Page 49: is true in all worlds (rows) Where KB is true…so it is entailed](https://reader036.vdocuments.net/reader036/viewer/2022062520/5681584b550346895dc5a251/html5/thumbnails/49.jpg)