We realize that some projects may not fit this mold, so other discussions that are more appropriate will also be acceptable. Check with Jeff or Edwina if you are concerned about what to write.
H :- G1 & G2 & ... Gn
is a CQ Q, and
H :- G1 & G2 & ... Gk
is a minimal equivalent formed from its own subgoals, can we order the subgoals Gk+1 through Gn so that each of the queries
H :- G1 & G2 & ... Gi
for k <= i <= n is equivalent to Q? Either prove informally but clearly, or provide a counterexample.
p(X,Y,Z) :- a(X,X,Y,Z)
p(X,Y,Z) :- p(X,W,Z) & b(W,Y)
p(X,Y,Z) :- p(X,W,X) & p(W,Y,Z)
p(X,Z) :- a(X,Y) & a(Y,Z)
p(X,Y) :- p(X,Y) & p(Y,Z)
and the EDB facts: a(0,1), a(1,2), a(1,3), a(2,3), a(3,4), a(4,5), a(5,2), and a(5,6).
Suppose we wish to compute the query p(0,X).
Represent each schema as a hypergraph, and use GYO reduction to determine if the hypergraph is acyclic. If it is an acyclic hypergraph, give a full reducer for the set of relations.