Logic and Data Management: Part-of Relation and Formalizing Statements - Prof. Bertram T. , Assignments of Computer Science

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

Pre 2010

Uploaded on 07/30/2009

koofers-user-fj2
koofers-user-fj2 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ECS 289F Topics in Scientific Data Management Spring 2006
Dr. Bertram Lud¨ascher May 16
Assignment 2
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 xis 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 xis-part-of y. Hint: think whether xand yare 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 x0sas 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 =/2
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 Ithat allows to derive this answer tuple.
b) Explain the “lineage” of the answer tuple from I, e.g., by giving a proof tree.

Partial preview of the text

Download Logic and Data Management: Part-of Relation and Formalizing Statements - Prof. Bertram T. and more Assignments Computer Science in PDF only on Docsity!

ECS 289F Topics in Scientific Data Management Spring 2006 Dr. Bertram Lud¨ascher May 16

Assignment 2

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.