BirnBaumBlüte
BirnBaumBlüte

Reputation: 57

Answer set of a program - why is the empty set not an answer set?

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})

Upvotes: 0

Views: 647

Answers (1)

mantrid
mantrid

Reputation: 2840

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)

Upvotes: 3

Related Questions