Introduction to Artificial Intelligence – Unit 5 Inference in first-order logic Course 67842 The Hebrew University of Jerusalem School of Engineering and Computer Science Academic Year: 2008/2009
Outline Substitution, Unification MGU Resolution
Examples of Computing MGU (1) Literal 1: Parents (x, Father(x), Mother (Bill)) Literal 2: Parents (Bill, Father(Bill), y) Step 1: s = x, t = Bill variables(s) = true, x is not a variable of t. We can write: theta = {[Bill/x]} Literal 1: Parents (Bill, Father(Bill), Mother (Bill)) And call Unify again.
Examples of Computing MGU (1) Step 2: s = Mother (Bill), t = y variables(t) = true, y is not a variable of s. We can write: theta = {[Bill/x], [Mother (Bill)/y]} Literal 1: Parents (Bill, Father(x), Mother (Bill)) Literal 2: Parents (Bill, Father(Bill), Mother (Bill)) And we are done.
Examples of Computing MGU (2) Literal 1: g(x,f(x)) Literal 2: g(f(y),y) Step 1: s = x, t = f(y) variables(s) = true, x is not a variable of t. We can write: theta = {[f(y)/x]} Literal 1: g(f(y),f(f(y)) And call Unify again.
Examples of Computing MGU (2) Step 2: s = f(f(y)), t = y s and t share a variable (y) and thus we cannot substitute them. We got failure !
Using Resolution to Prove a Statement
Using Resolution to Prove a Statement
Converting a Sentence to CNF
Converting a Sentence to CNF
Converting a Sentence to CNF
Converting a Sentence to CNF
Converting a Sentence to CNF
Converting a Sentence to CNF
Converting a Sentence to CNF
Converting a Sentence to CNF
Converting a Sentence to CNF
Converting a Sentence to CNF
Skolemization Example
Skolemization Example Original meaning allows each person to fail to love a different animal or to be loved by a different person. This is also the meaning of (2). The meaning of (1) is that everyone either fails to love a particular animal A or is loved by some particular animal B.
Resolution Example
Resolution Example
Resolution Example
Resolution Example