GL(M) = EDB + {p(1), p(2)} = M
M is a stable model.
GL(M) = EDB + {p(2)} <> M
M is not a stable model (in fact, M is not a model).
GL(M) = {t, q} <> M
M is not a stable model.
GL(M) = {p, s, r} = M
M is a stable model.
Round 1:
greenPath(1,2), monopoly(1,2), and monopoly(2,3) are inferred.
Round 2:
No new inferences are made.
The inflationary model is EDB + {greenPath(1,2), monopoly(1,2), monopoly(2,3)}.
Round 1:
win(Y) is false for any Y, so subgoals of the form NOT win(Y) are true
and can be eliminated. We are left with rules of the form:
win(X) :- move(X,Y).
We can infer win(X) if there exists some Y such that move(X,Y) is
in the EDB.
Round 2:
No more inferences can be made.
The inflationary model is EDB + {win(X) | move(X,Y) is in the EDB}.
A solution that works for the general case is:
Round 2:
We can infer win(3) from the third rule. Delete the last two
rules, since the head is known to be true. The largest
unfounded set is {win(3)}. Infer NOT win(3). Delete the body
of the second rule, since NOT win(3) is true.
Round 3:
We can infer win(1).
The WF model is {win(1), NOT win(2), win(3), NOT win(4)}
There is SOMETIMES a 2-valued well-founded model if the move graph is cyclic. Move graphs is parts a and b both has cycles. Part a has a 2-valued well-founded model, but part b doesn't have a 2-valued well-founded model.