Suppose A(c,d) is an EDB relation containing the tuples (1,2), (2,3), (3,4), and
ID: 3716011 • Letter: S
Question
Suppose A(c,d) is an EDB relation containing the tuples (1,2), (2,3), (3,4), and (4,1). Also, B(c) is an EDB relation containing the tuples (1) and (2). The following is a Datalog program:
Compute the stratified fixedpoint (i.e., the stratified "model" in the terms used by logicians) for this program and EDB. Demonstrate your knowledge by identifying, from the list below, the tuple that is in the stratified model.
4. Suppose A(c,d) is an EDB relation containing the tuples (1,2), (2,3), (3,4), and (4,1). Also, B(c) is an EDB relation containing the tuples (1) and (2). The following is a Datalog program: P(x) 0(x) R(x) A(x, y) ?-A(x,y) ?-A(x,y) AND AND AND NOT B (y) NOT P(y) NOT Q(y) Compute the stratified fixedpoint (i.e., the stratified "model" in the terms used by logicians) for this program and EDB Demonstrate your knowledge by identifying, from the list below, the tuple that is in the stratified model. a) P(4) b) R(3) c) Q(3) d) R(2)Explanation / Answer
the program is stratified. the stratum of the EDB predicates A,P is 0, the stratum of Q is 1and B is 2
the stratified model for the IDB predicates A and Q and given EDB is {1,2,3,4} and {}
another minimal model for the IDB predicates P and B and given EDB is {4} and {1,2,3}
p(4) is the tuple from the list
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.