我得到了以下答案集编程问题,但不确定我的答案是否正确:
以下是我的Clingo代码:
g(t1).
g(t2).
-e(t2).
u(t3).
e(X) :- a(X), not -e(X).
-e(X) :- u(X), not e(X).
e(X) :- g(X), not -e(X).
u(X) :- g(X).
a(X) :- u(X), not -a(X).
clingo 0 pm.lp是:
Reading from pm.lp
pm.lp:9:15-24: info: atom does not occur in any rule head:
not (-a(X))
Solving...
Answer: 1
g(t1) g(t2) u(t3) -e(t2) u(t1) u(t2) a(t3) a(t1) a(t2) e(t3) e(t1)
Answer: 2
g(t1) g(t2) u(t3) -e(t2) u(t1) u(t2) a(t3) a(t1) a(t2) e(t3) -e(t1)
Answer: 3
g(t1) g(t2) u(t3) -e(t2) u(t1) u(t2) a(t3) a(t1) a(t2) -e(t3) e(t1)
Answer: 4
g(t1) g(t2) u(t3) -e(t2) u(t1) u(t2) a(t3) a(t1) a(t2) -e(t3) -e(t1)
SATISFIABLE
不确定我的代码是否正确且完整?