Documente Academic
Documente Profesional
Documente Cultură
Knowledge
• Deductive
– New knowledge follows from prior knowledge by reasoning
– E.g., Math proofs or logical inference
• Inductive
– New knowledge based on observations of the world
– E.g., we may learn that apples fall from trees as a child by
watching apples fall from trees
• Deduction-induction combination
– E.g., use a theory (e.g., deductive knowledge base) and examples
from world (inductive oriented) to generate new information,
predictions
Logic: Chapter 7
• Deductive reasoning
– Logical inferences in a formal language
– Preserve truth with each inference
– Reasoning assumed to be same as logical proof
• Logical formalisms
– Termed “Knowledge representation”
– Use logical languages
• E.g., propositional logic or predicate calculus
– Application to AI
• A new language
– E.g., to specify start state, goals, knowledge, inference rules
• Inference rules
– A logical way to work from start state to goals using knowledge
Overall Approach
Inputs Processing Outputs
Logical Agent
Goal or task
statement
Reasoning
(search)
Knowledge Goal, plus
steps to
achieve goal
• Let a be (A Ÿ B)
M(a) = {7, 8}
• Would we expect KB |= a ?
Example
• Let KB = { (A⁄C), (B⁄ÿC) }
• Let a = A⁄B
• Is it true that KB |= a ?
• Justification
– To see that unit resolution preserves truth:
• Note that ÿb is true (i.e., ÿb Œ KB),
– Therefore, b is false
– Therefore because a ⁄ b Œ KB,
• a must be true
– Therefore KB |= a
Example
• Given: KB = { (PŸ R) ⁄ Q, ÿQ }
• Prove: PŸ R
– Using unit resolution
Solution
• KB = { (PŸ R) ⁄ Q, ÿQ }
• Let a = (PŸ R), Let b = Q
• KB has wffs of form: a ⁄ b, ÿ b
• By unit resolution, KB |= (PŸ R)
Inference Procedure #4: Resolution
Given that:
a ⁄ b Œ KB Call this
And resolution
g ⁄ ÿb Œ KB
Then:
KB |= a ⁄ g
• Justification
– To see that resolution preserves truth:
• Note that for any symbol P, either P is true or ÿP is true
• So, either b or ÿb is true
– Case 1: b is true
• ÿb is false, therefore g is true (since g ⁄ ÿb Œ KB)
– Case 2: ÿb is true
• b is false, therefore a is true (since a ⁄ b Œ KB)
– Therefore since either Case 1 or Case 2 must apply
• a ⁄ g must be true
– Therefore, KB |= a ⁄ g
Resolution Example
• Given: KB = { (PŸ R) ⁄ Q, ÿQ ⁄ (R ŸS) }
• Prove: (PŸ R) ⁄ (R ŸS)
Solution
• KB = { (PŸ R) ⁄ Q, ÿQ ⁄ (R ŸS) }
• Let a = (PŸ R)
• Let g = (R ŸS)
• Let b = Q
• KB has wffs of form: a ⁄ b, ÿ b ⁄ g
• By resolution, KB |= (PŸ R) ⁄ (R ŸS)
Example Application
• Reasoning about statements in natural language
• Given
– Statements in natural language
– And a goal (theorem) to prove
• Convert statements in natural language to
(propositional) logic
• Convert theorem into logic
• Apply inference “operators” until theorem (goal)
is reached
Example (Exercise 7.9, p. 238)
If the unicorn is mythical, then it is immortal, but if
it is not mythical, then it is a mortal mammal. If the
unicorn is either immortal or a mammal, then it is
horned. The unicorn is magical if it is horned.
• Prove that the unicorn is magical.