0

I'm a little confused by the definition of an answer set.

S is an answer set of P if S is the least model of P.

When I have a program

b :- a
a.

Then I know my answer set has to be {a,b}, because a is a fact.

What happens if I have something like

a :- b

In the slides I found, they state that a is an answer set. But by my understanding the rule is satisfied, when b = true implies a = true.

So if I set a = false and b = false then the rule would be satisfied as well.

Why is the empty set not the answer set? (as it would be a subset of {a})

1 Answers1

3

Empty set is an answer set of a :- b.. Try running your example online: https://potassco.org/clingo/run/

clingo version 5.3.0
Reading from stdin
-:1:6-7: info: atom does not occur in any rule head:
  b

Solving...
Answer: 1

SATISFIABLE

Models       : 1

(note empty line between "Answer: 1" and "SATISFIABLE" -> empty set)

mantrid
  • 2,830
  • 21
  • 18