ai=knowledge representation & reasoning
DESCRIPTION
AI=Knowledge Representation & Reasoning. Syntax Semantics Inference Procedure Algorithm Sound? Complete? Complexity. Some KR Languages. Propositional Logic Predicate Calculus Frame Systems Rules with Certainty Factors Bayesian Belief Networks Influence Diagrams - PowerPoint PPT PresentationTRANSCRIPT
1
AI=Knowledge Representation & Reasoning
SyntaxSemanticsInference Procedure
Algorithm Sound? Complete? Complexity
2
Some KR LanguagesPropositional LogicPredicate CalculusFrame SystemsRules with Certainty FactorsBayesian Belief NetworksInfluence DiagramsSemantic NetworksConcept Description LanguagesNonmonotonic Logic
3
Propositional LogicSyntax
Atomic sentences: P, Q, … Connectives: , , ,
Semantics Truth Tables
Inference Modus Ponens Resolution Soundness and completeness
Complexity issues.
4
SemanticsSyntax: a description of the legal
arrangements of symbols (Def “sentences”)Semantics: what the arrangement of
symbols means in the world
Sentences
FactsFacts
Sentences
Representation
World
Semantics
Semantics
Inference
5
Propsitional Logic: Syntax
AtomsLiteralsSentences
Any literal is a sentence If S1 and S2 are sentences, then
Then (S1 S2) is a sentenceThen (S1 S2) is a sentenceThen (S1 S2) is a sentenceThen S1 is a sentence
6
Propositional Logic: SEMANTICSAn interpretation is an assignment to each variable either True or False.Assignments to compound sentences are defined by the standard truth tables:
A propositional knowledge base says which sentences must be true in the world.
PT
T
F
F
Q
PT
T
F
F
Q
P Q P Q P
T
F F
F
F
T T
T T
F
Q
PT
F
T
F
7
Example Knowledge Base
(Smoke fire) <=> AlarmAlarm
8
More Definitionsvalid = tautology = always truesatisfiable = sometimes trueunsatisfiable = never true
1) smoke fire
2) smoke smoke
3) smoke fire fire
4) (smoke fire) (smoke fire)
9
Making Inferences
A knowledge base gives us partial information about the world: it constrains the world to a set of possible truth assignments.
By inference, we decide what else holds in all of the truth assignments allowed by the knowledge base.
Inference question: does KB = S ?
10
Proof Procedures
To decide whether KB = S, we can try to look for a proof of S from KB.
A proof procedure is some algorithm that we apply to a KB to produce its logical consequences.
A proof uses: the knowledge base, axiom schemas inference rules.
11
Soundness and Completeness
KB |- S: S is provable from KB.A proof procedure is sound if:
If KB |- S, then KB |= S. That is, the procedure produces only correct
consequences.A proof procedure is complete if:
If KB |= S, then KB |- S. That is, the procedure produces all the consequences.
Ideally, the procedure should be sound and complete. (Ideals are nice in theory).
12
Modus Ponens
From A and A B, infer B.Modus ponens with a few axiom schemas
is sound and complete: A (B A) A (B C) ((A B) (A C)) ( A B) (B A) More in the book.
13
Normal Forms
CNF = Conjunctive Normal FormConjunction of disjuncts (each disjunct =
“clause”)
(P Q) R
(P Q) R
(P Q) R P Q R
(P Q) R
(P R) (Q R)
14
Resolution
A B C, C D E A B D E
Refutation Complete Given an unsatisfiable KB in CNF, Resolution will eventually deduce the empty clause
Proof by Contradiction To show = Q Show {Q} is unsatisfiable!
15
Resolution Example prove P(A B C) (B) (B D) (C A D) (D P Q) (Q)
16
Computational Complexity
Determining satisfiability is NP-complete. Even when all clauses have at most 3 literals.Hence, also validity and entailment testing are
NP-completeIf all clauses have at most 2 literals, it is
polynomial.But if the KB is in DNF, satisfiability is polynomial.
What does this tell us about transforming a CNF into a DNF knowledge base?
17
Horn Clauses
If every sentence in KB is of the form:
• Then Modus Ponens is– Polynomial time, and– Complete!
A B C ... F Z
equivalently A B C ... F Z
Clause mean
s a
big disjuncti
on
At most one
positive literal