Resolution and Refutation Proofs - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

Resolution and Refutation Proofs

Description:

Slug(Steve) [ Unifies with 2-b, GMP Fires ] ... Pig(y) Slug(z) Faster (y, z) Slimy(a) Creeps(a) Slug(a) Pig(Pat) Slimy(Steve) Creeps(Steve) ... – PowerPoint PPT presentation

Number of Views:246
Avg rating:3.0/5.0
Slides: 22
Provided by: davidjk
Category:

less

Transcript and Presenter's Notes

Title: Resolution and Refutation Proofs


1
Resolution and Refutation Proofs
  • Introduction to Artificial Intelligence
  • CS440/ECE448
  • Lecture 13
  • Homework due March 2

2
Last lecture
  • Substitutions and unification
  • Generalized Modus Ponens
  • Resolution definition
  • This lecture
  • Refutation proofs
  • True-or-false questions
  • Fill-in-the-blanks questions
  • Resolution properties
  • Reading
  • Chapter 9

3
Generalized Modus Ponens (GMP)
  • p1, p2,, pn, (p1?p2? ?pn ? q)
    where pi? pi?
  • q? for all i
  • For example, let
  • p1 Faster (Bob, Pat)
  • p2 Faster (Pat, Steve)
  • Faster (x, y) ? Faster (y, z) ? Faster (x, z)
  • Unify p1 and p2 with the premise
  • ? x/Bob, y/Pat, z/Steve
  • Apply substitution to the conclusion
  • q? Faster(Bob, Steve)

pi and q atomic sentences Universally quantified
variables
4
Forward Chaining Example
  • White Facts added in turn
  • Yellow The result of implication of rules.
  • Buffalo(x) ?Pig(y) ? Faster(x, y)
  • Pig(y) ?Slug(z) ? Faster(y, z)
  • Faster(x, y) ?Faster(y, z) ? Faster(x, z)
  • Buffalo(Bob) Unifies with 1-a
  • Pig(Pat) Unifies with 1-b, GMP Fires
  • Unifies with 2-a
  • Faster(Bob,Pat) Unifies with 3-a, 3-b
  • Slug(Steve) Unifies with 2-b, GMP Fires
  • Faster(Pat, Steve) Unifies with 3-b and with
    6,GMP Fires
  • Faster (Bob, Steve)

5
Backward Chaining Example
  1. Pig(y)? Slug(z) ? Faster (y, z)
  2. Slimy(a)? Creeps(a) ? Slug(a)
  3. Pig(Pat)
  4. Slimy(Steve)
  5. Creeps(Steve)

6
Refutation Proofs
  • Given
  • a knowledge base KB (collection of true
    sentences),
  • a proposition P,
  • we wish to prove that P is true.
  • Proof by contradiction (refutation)
  • Assume that P is FALSE (i.e., that ?P is TRUE).
  • Show that a contradiction arises.
  • A complete approach to refutation can be obtained
    using a single inference rule resolution.

7
Resolution Inference Rule
  • Idea If ? is true or ? is true
  • and ? is false or ? is true
  • then ? or ? must be true
  • Basic resolution rule from propositional logic
  • ? ? ??? ?? ? ?
  • ? ? ?
  • Can be expressed in terms of implications
  • ?? ? ?, ? ? ?
  • ?? ? ?
  • Note that Resolution rule is a generalization of
    Modus Ponens
  • ?, ? ? ? is equivalent to TRUE ? ?, ? ? ?
  • ? TRUE ? ?

8
Generalized Resolution
  • Generalized resolution rule for first order logic
    (with variables)
  • If pj can be unified with ?qk, then we can apply
    the resolution rule
  • p1 ? ? pj ? ? pm
  • q1 ? ? qk ? ? qn
  • Subst(?, (p1 ? ? pj-1 ? pj1 ? ? pm ?q1 ? ?
    qk-1 ? qk1 ? ? qn))
  • where ? Unify (pj, ?qk)
  • Example
  • KB ? Rich(x) ? Unhappy(x)
  • Rich(Me)
  • Substitution ? x/Me
  • Conclusion Unhappy(Me)

9
Canonical Form
  • For generalized Modus Ponens, entire knowledge
    base is represented as Horn Sentences.
  • For resolution, entire database will be
    represented using Conjunctive Normal Form (CNF)
  • Any first order logic sentence can be converted
    to a Canonical CNF form.
  • Note Can also do resolution with implicative
    form, but lets stick to CNF.

10
Converting any FOL to CNF
  • Literal (possibly negated) atomic sentence,
    e.g., ? Rich(Me)
  • Clause disjunction of literals, e.g., ?
    Rich(Me) ? Unhappy(Me)
  • The KB is a conjunction of clauses
  • Any FOL sentence can be converted to CNF as
    follows
  • Replace P ? Q by ?P ? Q
  • Move ? inwards to literals, e.g., ??x P
    becomes ?x ?P
  • Standardize variables, e.g., (?x P) ? (?x Q)
    becomes (?x P) ? (?y Q)
  • Move quantifiers left in order, e.g., ?x P ? ?y
    Q becomes ?x ?y P ? Q
  • Eliminate ? by Skolemization (next slide)
  • Drop universal quantifiers
  • Distribute ? over ? , e.g., (P ? Q) ? R
    becomes (P ? R) ? (Q ? R)
  • Flatten nested conjunctions disjunctions, e.g.
    (P ? Q) ? R ? P ? Q ? R

11
Skolemization
  • (Thoralf Skolem 1920)
  • The process of removing existential quantifiers
    by elimination.
  • Simple case No universal quantifiers.
  • ? Existential Elimination Rule
  • For example
  • ?x Rich(x)
  • becomes
  • Rich(G1)
  • where G1 is a new Skolem constant'.
  • More tricky when ? is inside ?.

12
Skolemization continued
  • More tricky when ? is inside ?
  • E.g., Everyone has a heart''
  • ?x Person(x) ? ? y Heart(y) ? Has(x,y)
  • Incorrect
  • ?x Person(x) ? Heart(H1) ? Has(x,H1)
  • This means everyone has the same heart called H1.
  • Problem is that for each person, we need another
    heart i.e., consider the heart to be a
    function of the person.
  • Correct
  • ? Person(x) ? Heart(H(x)) ? Has(x,H(x))
  • where H is a new symbol (Skolem function'')
  • Skolem function arguments all enclosing
    universally quantified variables.

13
Resolution proof
  • p1 ? ? pj ? ? pm
  • q1 ? ? qk ? ? qn
  • Subst(?, (p1 ? ? pj-1 ? pj1 ? ? pm ?q1 ? ?
    qk-1 ? qk1 ? ? qn))
  • To prove ?
  • Negate ?.
  • Convert to CNF.
  • Add to CNF KB.
  • Infer contradiction using the resolution rule (a
    contradiction is detected when resolution derives
    the empty clause).
  • E.g., to prove Rich(Me), add ? Rich(Me) to the
    CNF KB, then
  • ?PhD(x) ? HighlyQualified(x)
  • PhD(x) ? EarlySalary(x)
  • ?HighlyQualified(x) ? Rich(x)
  • ?EarlySalary(x) ? Rich(x)

14
Resolution Proof
? Rich(Me) ?PhD(x) ? HighlyQualified(x) PhD(x) ?
EarlySalary(x) ?HighlyQualified(x) ? Rich(x)
?EarlySalary(x) ? Rich(x)
15
Resolution Proof
? Rich(Me) ?PhD(x) ? HighlyQualified(x) PhD(x) ?
EarlySalary(x) ?HighlyQualified(x) ? Rich(x)
?EarlySalary(x) ? Rich(x)
16
Resolution Proof
? Rich(Me) ?PhD(x) ? HighlyQualified(x) PhD(x) ?
EarlySalary(x) ?HighlyQualified(x) ? Rich(x)
?EarlySalary(x) ? Rich(x)
17
Resolution Proof
? Rich(Me) ?PhD(x) ? HighlyQualified(x) PhD(x) ?
EarlySalary(x) ?HighlyQualified(x) ? Rich(x)
?EarlySalary(x) ? Rich(x)
18
True-or-False Question
  • The Knowledge base
  • 1. ?Bird(x)? Flies(x)
  • 2. ?Bird(y)??Swims(y)
  • Bird(Pete)
  • The query
  • ? Flies ( Pete)
  • Applying Resolution
  • 5. ?Swims(Pete) 2,3
  • ? Bird(Pete) 1,4
  • 3,6
  • All birds fly.
  • No bird swims
  • Pete is a bird
  • Does Pete Fly?

19
Fill-in-the-blanks Question
  • Given a database KB and a sentence ? with free
    variables v1, , vn what are the bindings that
    make ? true?
  • Prove that given KB, ? v1, , vn ?
  • i.e., add ?? to the database, derive a
    contradiction and find what is the subsitution
    leading to it.
  • Greens trick add ??, Ans (v1 ,, vn) instead.

20
Decidability
  • How hard is it to determine if KB entails ??
  • Propositional logic (zeroth order) is decidable
  • Can determine whether or not KB entails ? in
    finite time.
  • Second order logic is undecidable
  • Cannot determine whether KB entails ? in finite
    time.
  • First order logic is semi-decidable
  • If KB entails ? or ??, then a proof will be
    found in finite time.
  • But, if KB neither entails ? or ??, then proof
    process may never terminate.

21
Resolution properties
  • Resolution is sound.
  • Resolution refutation is complete. (See Section
    9.5 for proof.)
  • Resolution (and any proof procedure) is at best
    semi-decidable.
  • Note checking consistency of a database is also
    semidecidable.
Write a Comment
User Comments (0)
About PowerShow.com