12.07.2015 Views

COMP9414: Artificial Intelligence First-Order Logic - Sorry

COMP9414: Artificial Intelligence First-Order Logic - Sorry

COMP9414: Artificial Intelligence First-Order Logic - Sorry

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>COMP9414</strong>, Wednesday 13 April, 2005 <strong>First</strong>-<strong>Order</strong> <strong>Logic</strong> 12<strong>COMP9414</strong>, Wednesday 13 April, 2005 <strong>First</strong>-<strong>Order</strong> <strong>Logic</strong> 14CNF — Example 1Unification∀x[∀yP(x, y) → ¬∀y(Q(x, y) → R(x, y))]1. ∀x[¬∀yP(x, y) ∨ ¬∀y(¬Q(x, y) ∨ R(x, y))]2, 3. ∀x[∃y¬P(x, y) ∨ ∃y(Q(x, y) ∧ ¬R(x, y))]4. ∀x[∃y¬P(x, y) ∨ ∃z(Q(x, z) ∧ ¬R(x, z))]5. ∀x∃y∃z[¬P(x, y) ∨ (Q(x, z) ∧ ¬R(x, z))]6. ∀x[¬P(x, f (x)) ∨ (Q(x, g(x)) ∧ ¬R(x, g(x)))]7. ¬P(x, f (x)) ∨ (Q(x, g(x)) ∧ ¬R(x, g(x)))8. (¬P(x, f (x)) ∨ Q(x, g(x))) ∧ (¬P(x, f (x)) ∨ ¬R(x, g(x)))8. {¬P(x, f (x)) ∨ Q(x, g(x)), ¬P(x, f (x)) ∨ ¬R(x, g(x))} A unifier of two atomic formulae is a substitution that makes themidentical◮ Each variable has at most one associated expression◮ Apply substitutions simultaneously Unifier of P(x, f (a), z) and P(z, z, u) : {x/ f (a), z/ f (a), u/ f (a)} Substitution σ 1 is a more general unifier than a substitution σ 2 if forsome substitution τ, σ 2 = σ 1 τ (i.e. σ 1 followed by τ) Theorem. If two atomic formulae are unifiable, they have a mostgeneral unifier<strong>COMP9414</strong> c○UNSW, 2005 Generated: 13 April 2005<strong>COMP9414</strong> c○UNSW, 2005 Generated: 13 April 2005<strong>COMP9414</strong>, Wednesday 13 April, 2005 <strong>First</strong>-<strong>Order</strong> <strong>Logic</strong> 13<strong>COMP9414</strong>, Wednesday 13 April, 2005 <strong>First</strong>-<strong>Order</strong> <strong>Logic</strong> 15CNF — Example 2Examples¬∃x∀y∀z((P(y) ∨ Q(z)) → (P(x) ∨ Q(x)))1. ¬∃x∀y∀z(¬(P(y) ∨ Q(z)) ∨ P(x) ∨ Q(x))2. ∀x¬∀y∀z(¬(P(y) ∨ Q(z)) ∨ P(x) ∨ Q(x))2. ∀x∃y¬∀z(¬(P(y) ∨ Q(z)) ∨ P(x) ∨ Q(x))2. ∀x∃y∃z¬(¬(P(y) ∨ Q(z)) ∨ P(x) ∨ Q(x))2. ∀x∃y∃z((P(y) ∨ Q(z)) ∧ ¬(P(x) ∨ Q(x)))6. ∀x((P( f (x)) ∨ Q(g(x))) ∧ ¬P(x) ∧ ¬Q(x))7. (P( f (x)) ∨ Q(g(x)) ∧ ¬P(x) ∧ ¬Q(x)8. {P( f (x)) ∨ Q(g(x)), ¬P(x), ¬Q(x)} {P(x,a),P(b,c)} is not unifiable {P( f (x),y),P(a,w)} is not unifiable {P(x,c),P(b,c)} is unifiable by {x/b} {P( f (x),y),P( f (a),w)} is unifiable byσ = {x/a,y/w}, τ = {x/a,y/a,w/a}, υ = {x/a,y/b,w/b}Note that σ is an m.g.u. and τ = σθ where θ = ...? {P(x),P( f (x))} is not unifiable (c.f. occur check!)<strong>COMP9414</strong> c○UNSW, 2005 Generated: 13 April 2005<strong>COMP9414</strong> c○UNSW, 2005 Generated: 13 April 2005

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!