Practice problems - Exam 2
---------------------------
Compute weak well-founded as well as well-founded models
for the following programs:
---------------------------------------------------------
r(1,2).
r(2,3).
r(3,4).
p(X,X) :- r(X,Y), not q(Y).
q(X) :- r(Y,X), not p(X,Y).
---------------------------------------------------------
a.
c :- not b, a 
b :- not c 
e :- not d 
f :- e 
f :- not a 
---------------------------------------------------------
t(Z) :- t0(Z).
t(Z) :- g(X,Y,Z),t(X).
t(Z) :- g(X,Y,Z), not t(Y).
t0(1).
g(1,2,3).
g(2,5,4).
g(2,4,5).
g(5,3,6).
g(1,2,4).
---------------------------------------------------------