AI Proofs: Understanding Substitutions, Unification, and Refutation, Study notes of Computer Science

An introduction to resolution and refutation proofs in artificial intelligence. It covers topics such as substitutions, unification, generalized modus ponens, resolution definition, refutation proofs, true-or-false questions, and resolution properties. The document also includes examples of forward and backward chaining, as well as instructions for converting first-order logic to canonical conjunctive normal form (cnf) and applying skolemization.

Typology: Study notes

Pre 2010

Uploaded on 03/16/2009

koofers-user-zue-1
koofers-user-zue-1 🇺🇸

10 documents

1 / 21

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Resolution and Refutation Proofs
Resolution and Refutation Proofs
Introduction to Artificial Intelligence
CS440/ECE448
Lecture 13
Homework due March 2
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15

Partial preview of the text

Download AI Proofs: Understanding Substitutions, Unification, and Refutation and more Study notes Computer Science in PDF only on Docsity!

Resolution and Refutation ProofsResolution and Refutation Proofs

Introduction to Artificial Intelligence

CS440/ECE

Lecture 13

Homework due March 2

Last lectureLast lecture

•^

Substitutions and unification

•^

Generalized Modus Ponens

•^

Resolution definition

This lecture^ This lecture

•^

Refutation proofs

•^

True-or-false questions

•^ •

FillFill

- in-in

- the-the

- blanks questions-blanks questions

•^ •

Resolution propertiesResolution properties

Reading^ Reading

•^

Chapter 9

Forward Chaining ExampleForward Chaining Example

•^

White: Facts added in turn

-^

Yellow:

The result of implication of rules.

  1. Buffalo(x)

Pig(y)

Faster(x, y)

  1. Pig(y)

Slug(z)

Faster(y, z)

  1. Faster(x, y)

Faster(y, z)

Faster(x, z)

  1. Buffalo(Bob)

[ Unifies with 1-a ]

  1. Pig(Pat)

[ Unifies with 1-b, GMP Fires ][ Unifies with 2-a ]

  1. Faster(Bob,Pat)

[ Unifies with 3-a, 3-b ]

  1. Slug(Steve)

[ Unifies with 2-b, GMP Fires ]

  1. Faster(Pat, Steve)

[ Unifies with 3-b and with 6,GMP Fires ]

  1. Faster (Bob, Steve) 10. …

Backward Chaining ExampleBackward 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)

Resolution Inference RuleResolution 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

Generalized ResolutionGeneralized Resolution

Generalized resolution rule for first order logic (with variables)If

p

can be unified withj

qk

, then we can apply the resolution rule: p^1

p

∨j

p

m

q^1

q

∨k

q

n

Subst(

θ, (p

p

j-

p

j+

p

m^

q^1

q

k-

q

k+

q

))n

where

θ

= Unify (

pj

,^ ¬

qk

-^

Example:^ KB:

Rich(x)

Unhappy(x)

Rich(Me)

Substitution:

θ^

x/Me

Conclusion:

Unhappy(Me)

Converting any FOL to CNFConverting 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:1. Replace

P

Q

by

P

Q

  1. Move

inwards to literals,

e.g.,

x P

becomes

x^

P

  1. Standardize variables, e.g.,

x P)

∃x Q)

becomes (

x P)

∃y Q)

  1. Move quantifiers left in order, e.g.,

x P

y Q

becomes

x^

∃y P

Q

  1. Eliminate

by Skolemization (next slide)

  1. Drop universal quantifiers7. Distribute

over

, e.g.,

(P

Q)

R

becomes

(P

R)

(Q

R)

  1. Flatten nested conjunctions & disjunctions, e.g.

(P

Q)

R

P

Q

R

SkolemizationSkolemization

(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

G

is a new ``Skolem constant'‘.

-^

More tricky when

is inside

Resolution proofResolution proof

p^1

∨ …

p

∨j …

p

m

q^1

∨ …

q

∨k …

q

n

Subst(

θ, (p

∨ 1 …

p

j-

∨ p

j+

∨ …

p

m^

∨q

∨ 1 …

q

k-

∨ q

k+

∨ …

q

))n

•^

To prove

α

–^

Negate

α

–^

Convert to CNF.

-^

Add to CNF KB.

-^

Infer contradiction using the resolution rule (a contradiction isdetected 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)

Resolution ProofResolution Proof

¬

Rich(Me) ¬

PhD(x)

HighlyQualified(x)

PhD(x)

EarlySalary(x)

¬

HighlyQualified(x)

Rich(x)

¬

EarlySalary(x)

Rich(x)

Resolution ProofResolution Proof

¬

Rich(Me) ¬

PhD(x)

HighlyQualified(x)

PhD(x)

EarlySalary(x)

¬

HighlyQualified(x)

Rich(x)

¬

EarlySalary(x)

Rich(x)

Resolution ProofResolution Proof

¬

Rich(Me) ¬

PhD(x)

HighlyQualified(x)

PhD(x)

EarlySalary(x)

¬

HighlyQualified(x)

Rich(x)

¬

EarlySalary(x)

Rich(x)

FillFill

inin

thethe

blanks Questionblanks Question

•^

Given a database KB and a sentence

with free

variables v

, …, v 1

n^

what are the bindings that

make

true?

•^

Prove that given KB,

v

, …, v 1

n^

•^

i.e., add

to the database, derive a contradiction

and find what is the subsitution leading to it.

•^

Green’s trick: add {

, Ans (v

1

,…, v

)} instead.n

DecidabilityDecidability

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.