1 / 38

Knowledge Model

Computational Logic Lecture 3. Knowledge Model. Michael Genesereth Autumn 2001. Knowledge Model. Data expresses relationships between objects. Knowledge expresses relationships between relations, notably definitions and constraints.

andie
Download Presentation

Knowledge Model

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computational Logic Lecture 3 Knowledge Model Michael Genesereth Autumn 2001

  2. Knowledge Model Data expresses relationships between objects. Knowledge expresses relationships between relations, notably definitions and constraints. In this course, knowledge is synonymous with logic. father(x,y) :- parent(x,y)  male(x) NB: In this course, we concentrate only on data integration, not knowledge integration. However, as we shall see, logic is useful for encoding mapping knowledge.

  3. Databases Each row in a relation can be represented as an atomic sentence. A database is an arbitrary set of atomic sentences in which all arguments are constants.

  4. Rule Bases • A rule base is a set of logical expressions, called rules. • Types of Rules • Simple Rules • Functional Rules • Negative Rules • Disjunctive Rules • Semantics • Evaluative Semantics - whether database satisfies rule • Constructive Semantics - consequences of rules on partial databases to produce more complete databases

  5. Simple Rules A simple rule is an expression in the following form. subgoal … subgoal head body where p is a relation constant xi and xijare constants or variables

  6. Rule Instances An instance of a rule is an expression obtained by consistently replacing variables with constants from a Herbrand universe (the set of constants used in a database). Sample Rule: Universe of Discourse: Instances: Non-Instances:

  7. Single Rule Semantics A database D satisfies a simple rule if and only if, for every instance, if all of the subgoals are in D, then the head is in D. Sample Rule: Databases that does not satisfy this rule: Databases that satisfy this rule:

  8. Multiple Rule Semantics A database satisfies a set of rules if and only if it satisfies each of the rules in the set. Sample Rules: Database that satisfies the rules: Database that does not satisfy the rules:

  9. Functional Rules A functional rule is one containing functional terms. A database D satisfies a functional rule if and only if functional constants name functions on the universe of discourse such that, for every instance, when functional terms are replaced by their values, if all of the subgoals are in D, then the head is in D. Database that satisfies this rule: Database that does not satisfy this rule

  10. Negative Rules A negative rule is one with a negation in the head or body. A database D satisfies a negative rule if and only if, for every instance, if all of the positive subgoals are in D and none of the negative subgoals are in D, then the head is in D if positive or the head is not in D if negative. Database that satisfies this rule:

  11. Disjunctive Rules A disjunctive rule is one with more than one element in the head. A database D satisfies a disjunctive rule if and only if, for every instance, if all of the subgoals are in D, then at leastone of the consequences from the is in D. Database that satisfies this rule:

  12. Negation and Disjunction Disjunction Conjunctive Normal Form Negation

  13. Extensional and Intensional Relations Typical database applications start with a partial database,i.e. tables for some relations (the extensional relations) and not others (the intensional relations). Rules are then written to define the intensional relations in terms of the extensional relations. rules Extensional Intensional

  14. Closure Given an extensional database D and a knowledge base K, we can obtain the corresponding closure by computing all supersets of D that satisfies the rules and taking their intersection. Note the closure of D and K does not necessarily satisfy K. Database: Satisfiers: Rulebase: Closure:

  15. Safety A rule is safe if and only if every variable in the head appears in some subgoal in the body. Safe Rule: Unsafe Rule: In this course, we look only at rules that are safe.

  16. Dependency Graph The dependency graph for a set of rules is a directed graph in which (1) the nodes are the relations mentioned in the head and bodies of the rules and (2) there is an arc from a node p to a node q whenever p occurs with the body of a rule in which q is in the head. t s r p q A set of rules is recursive if it contains a cycle. Otherwise, it is non-recursive.

  17. Single Rule The value of a single non-recursive rule on a database D is the set of all rule heads obtained by consistently substituting constants from D for variables in such a way that the substituted subgoals are all in D. Sample Rule: Sample Database: Value:

  18. Multiple Rules The value of a set ofrules with a common relation on a database D is the union of the values on the individual rules. Sample Rules: Sample Database: Value:

  19. Multiple Relations The value of a set of non-recursive rules with different head relations is obtained by evaluating rules in order in which their head relations appear in the corresponding dependency graph. Sample Rules: Value Computation:

  20. Recursion To compute the value of a recursive rule, start with the empty relation. Compute the value using multiple rule computation. Iterate till no new tuples are added. Sample Rules: Value Computation:

  21. Functional Rules Computation is the same as for simple rules. However, the occurrence of a functional term in the head of a rule means that functional terms may appear in the value of the rule. Sample Rule: Sample Database: Value:

  22. Utility of Functional Rules Definition: Definition: Expansion of gggp(x,z):

  23. Negation There are various ways to compute the value of negative rules. In negation as failure, a negation is true if and only if the negated sentence is not known to be true. This is the norm in database systems. In classical negation, a negation is true only if the negated sentence is known to be false (i.e. there must be rules concluding negated sentences). This is the norm in computational logic systems. In semipositive negation, the negation of an extensional relation is treated using negation as failure and the negation of an intensional relation is treated as classical negation.

  24. Negation as Failure Definition: Value Computation:

  25. Negation as Failure Definition: Value Computation:

  26. Classical Negation Definition: Value Computation:

  27. Classical Negation Definition: Value Computation:

  28. Semipositive Negation Definition: Value Computation:

  29. Knowledge Interchange Format Simple Prefix Notation (teaches jennifer cs145) (teacher mike cs157) (teacher mike cs246) (teacher zohar cs157) Mathematical Notation, aka Epilog/Prolog teaches(jennifer, cs145) teaches(mike, cs157) teaches(mike, cs246) teaches(zohar, cs157)

  30. Rules

  31. Multiple Rule Formats Epilog/Prolog QBE KIF

More Related