Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
On(A,B) On(B,C) (Or some suchwe havent yet specified the details of how we will express change and actions.)
Our Plan
Look at
deduction in FOPC. some efficiency considerations and trade-offs. the world, generally change and action in FOPC.
Such a sentence is called a goal or a query. A retriever that works this way would be doing deductive information retrieval.
Again, the details of how the goal is true might also be useful.
Deduction
Ideally, wed like an inference procedure that would be
Sound Complete Fast
Unfortunately, there is no analogy to truth tables for general deduction for FOPC.
Now we pay attention to those we believe are true. And now, look at the combinations that are all true.
Now we pay attention to those we believe are true. And now, look at the combinations that are all true. Q is true in these cases, so we have proven it.
But In FOPC
Suppose x P(x)Q(x), P(A) and we want to know if Q(A). We can build a table, but we cant fill it in:
P(A) false false true true Q(A) false true false true x P(x) Q(x) ? ? false ?
I.e., the general sentence never follows from any these instances.
Rules of Inference
But, as in Proposition Logic, we can still have rules of inference consisting of If we have sentences that match the premises of the rule, we may infer sentences matching the conclusions. We would like our rules to be sound, i.e., if the premises are true, then the conclusions will in fact be true. Well have to specify procedures to use these, and ask if they are sound, complete, efficient.
Expect trade-offs. a set of sentences, called the premises a set of sentences, called the conclusions
Or introduction:
And elimination:
Resolution:
And introduction:
Substitutions (cont)
Note that
this isnt part of FOPC per se; its just a convenient notation. it only makes sense to substitute for unbound variables but it is okay to substitute one variable for another. E.g., {x/y, w/z} is a perfectly fine, if not obviously useful, substitution.
Example: From
can conclude
x President(x,US) President(Somejoe,US)
as long as F is a new function (and contains no variables other than y). In the most general case: where F is a new function of all the universal variables. These are sometimes called Skolem functions.
y1,...,yn x y1,...,yn {x,F(y1,...yn)}
Existential Introduction
The dual of (the simple form of) Existential Instantiation is: x {G/x} E.g., given President(Bush,US) rule lets us conclude x President(x,US) A more general rule would undo the general case of Existential Instantiation.
Inference Procedures
Now, we can take these rules, and use them somehow to make inferences from a KB in hopes of proving a goal. Remember, ideally, we would like an inference procedure in which
Everything that we deduce is logically implied. (soundness) Everything that is logically implied is derivable. (completeness) Inferences can be made efficiently.
Not obvious that our rules thus far will guarantee us a proof for everything logically implied!
Effective schemes, it turns out, are inefficient in principle. In general, we have trade-offs:
Sound, complete, inefficient schemes Sound, incomplete, more efficient schemes Unsound, incomplete, efficient schemes?
But just getting back a yes or no answer may not be good enough. E.g., suppose the query is
z Loves(z,Jan)
If we just return yes, well be disappointed. Instead, we would like to know all the ways it might be true.
Matching Formulae
Intuitively, many inference procedures have a step in which two FOPC sentences match each other, i.e., are the same assuming some flexible method of variable matching. E.g.:
Loves(z,Jan) matches Loves(x,x) and Loves(Pat,Jan) Loves(Jan,Jan) matches Loves(x,x)
Unification
of matching. Two sentences unify with one another if there is a substitution of variables which, when applied to both sentences, denotes the same sentence. E.g., consider Loves(x,x) and Loves(z,Jan):
Loves(x,x)/{x/Jan,z/Jan} denotes Loves(Jan,Jan) Loves(z,Jan)/{x/Jan,z/Jan} denotes Loves(Jan,Jan) so Loves(x,x) and Loves(z,Jan) unify, with the unifier {x/Jan,z/Jan}.
Unification (cont)
Many pairs of sentences can have more than one unifier. E.g.: can be unified by
{x/Pat,z/Pat} {x/Lynn,z/Lynn} {x/Pat,z/Pat,w/George} {x/z} Loves(x,Jan) Loves(z,Jan)
A most general unifier makes the least commitment possible. When we unify two expressions, we want to compute a MGU.
Examples
Formula 1
Loves(x,Jan) Loves(x,Jan) Loves(x,Jan) Loves(Jan,Pat) Loves(x,Father(x)) Loves(x,Father(x)) Loves(x,Father(x))
Formula 2
Loves(Lynn,y) Loves(x,Pat) Loves(Pat,x) Loves(Jan,Pat) Loves(Lynn,y) Loves(y,y)
MGU
{x/Lynn,y/Jan} Tilt! Tilt! {} {x/Lynn,y/Father(Lynn)} Tilt!
Loves(x,Father(Pat)) {x/Pat}
An Application of Unification
Unifiers are a nice way to express the idea of how something can be true. E.g., given the query z Loves(z,Jan) and the DB x Loves(x,x), Loves(Pat,Jan) the unifiers {z/Jan} {z/Pat} each reflect a different way the query might be supported by the knowledge base. So, in general, deductive retrievers to return lists, or streams, of unifiers, each presenting a different way the query might be true.
This will succeed, but produce { } (which a program is likely to represent by the empty list). The unification fails (which a program is likely to represent as nil).
Summary
There are inference rules for FOPC:
The inference rules and equivalences of propositional calculus carry over. There are some additional rules for quantified sentences.
We promised
complete, sound, but costly