
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A university assignment from ecs 289f topics in scientific data management, spring 2006. It includes three problems that require students to formalize the part-of relation in logic and datalog, as well as formalizing statements about persons and their relationships using logic formulas and datalog rules. Problem 3 asks students to find an example database instance and explain the derivation of an answer tuple using a proof tree.
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

ECS 289F Topics in Scientific Data Management Spring 2006 Dr. Bertram Lud¨ascher May 16
Due: Tuesday, May 23rd (in class, after class)
Problem 1. Assume you want to formalize in logic a notion of “part-of”, i.e., a binary relation part of(X, Y ) that is true for a pair (x, y) if and only if x is a part of y. For example, one might say that a cellular compartment is part of a neuron, or that engine is part of car.
a) Give different “readings” or meanings of x is-part-of y. Hint: think whether x and y are instances (of some classes/concepts), or whether they are classes/concepts themselves. Also think about whether it means that some/all y’s have some/only x′s as their parts.
b) Give a set of logic formulas or Datalog rules that capture some basic properties of part of/2. Hint: e.g., you might want to state that part of is asymmetric, i.e., if part of(x, y) then it cannot be that part of(y, x).
c) Give a relation that is distinct from part of/2, yet satisfies the same axioms that you gave in (b). Briefly discuss what this tells us about our axioms.
Problem 2. Formalize the following statements as logic formulas or Datalog rules:
a) For every person x, there exist persons y and z, such that x has parents y and z, where y and z are distinct persons. Hint: use relations person/1, hasParent/2, and =/
b) For every married person x, there is a person y, different from x, to which x is married. Hint: use relations married/1, married to/2 (and possibly others, as needed).
c) A bachelor x is a person who is not married to anyone.
Problem 3. Consider the slideset # 2 (Querying Relational Data [2-rel-fo.pdf]), and specifi- cally the slides #19 (Datalog Summary) and #20 (Relational Operators in Datalog).
Assume that the rule
boss(E, Mgr) ←− employee(E, Sal, Dept), dept(Dept, Mgr)
derives some concrete answer tuple boss(e, m)
a) Give an example database instance I that allows to derive this answer tuple.
b) Explain the “lineage” of the answer tuple from I, e.g., by giving a proof tree.