Algorithm Search⌘K

Definitionadvanced

Disjunctive logic program

Also called disjunctive answer set program.

A program whose rule heads are disjunctions of atoms, with answer sets defined as minimal models of the reduct.

A disjunctive logic program allows rules such as a∨b←ca \vee b \leftarrow c, which say that when cc holds, at least one of aa and bb holds, without saying which. Gelfond and Lifschitz (1991) gave these programs a semantics that extends stable models: an answer set is a minimal model of the reduct. Disjunction expresses incomplete information directly, and it makes the existence of an answer set Σ2p\Sigma_2^p-complete, one level above normal programs.

Definition

Let AA be a finite set of atoms. A disjunctive rule is an expression

a1∨⋯∨ak←b1,…,bm,not c1,…,not cna_1 \vee \cdots \vee a_k \leftarrow b_1, \ldots, b_m, \mathit{not}\ c_1, \ldots, \mathit{not}\ c_n

with atoms ai,bi,cj∈Aa_i, b_i, c_j \in A, k≥1k \geq 1 and m,n≥0m, n \geq 0. The head is H={a1,…,ak}H = \{a_1, \ldots, a_k\}, and the body has the positive part B+={b1,…,bm}B^+ = \{b_1, \ldots, b_m\} and the negative part B−={c1,…,cn}B^- = \{c_1, \ldots, c_n\}. A disjunctive program is a finite set of disjunctive rules. It is normal if every head has one atom and positive if every B−B^- is empty.

A set M⊆AM \subseteq A is a model of a positive program QQ if for each rule of QQ with B+⊆MB^+ \subseteq M, the head meets MM. A model is minimal if no proper subset of it is a model. A positive disjunctive program can have several minimal models, unlike a positive normal program, which has a least model.

For a disjunctive program PP and M⊆AM \subseteq A, the reduct PMP^M deletes every rule with B−∩M≠∅B^- \cap M \neq \emptyset and deletes the negative body of the other rules. MM is an answer set of PP if MM is a minimal model of PMP^M (Gelfond and Lifschitz 1991). For a normal program, this is the stable model condition, since the least model is the only minimal model.

Head cycles. The positive dependency graph of PP has an edge from bb to aa for each rule with a∈Ha \in H and b∈B+b \in B^+. PP is head-cycle-free if no rule has two distinct head atoms in the same strongly connected component of this graph (Ben-Eliyahu and Dechter 1994). Shifting replaces each rule by the kk normal rules

ai←b1,…,bm,not c1,…,not cn,not a1,…,not ai−1,not ai+1,…,not ak.a_i \leftarrow b_1, \ldots, b_m, \mathit{not}\ c_1, \ldots, \mathit{not}\ c_n, \mathit{not}\ a_1, \ldots, \mathit{not}\ a_{i-1}, \mathit{not}\ a_{i+1}, \ldots, \mathit{not}\ a_k.

For head-cycle-free programs, shifting preserves the answer sets.

Examples and non-examples

  • One disjunction. The program a∨b←a \vee b \leftarrow has the answer sets {a}\{a\} and {b}\{b\}. The set {a,b}\{a, b\} is a model of the reduct but not a minimal one, so it is not an answer set.
  • Disjunction is not exclusive. The program a∨b←a \vee b \leftarrow, a←a \leftarrow, b←ab \leftarrow a has the single answer set {a,b}\{a, b\}: both head atoms are true because other rules force them. Without the fact a←a \leftarrow, the program a∨b←a \vee b \leftarrow, b←ab \leftarrow a has the single answer set {b}\{b\}.
  • Disjunction with negation. The program a∨b←a \vee b \leftarrow, a←not ba \leftarrow \mathit{not}\ b has the answer sets {a}\{a\} and {b}\{b\}. For M={b}M = \{b\} the reduct is a∨b←a \vee b \leftarrow, whose minimal models are {a}\{a\} and {b}\{b\}, and MM is one of them.
  • A head cycle. The program a∨b←a \vee b \leftarrow, a←ba \leftarrow b, b←ab \leftarrow a has the single answer set {a,b}\{a, b\}. The atoms aa and bb form a cycle and are both in the head of the first rule, so the program is not head-cycle-free. Its shifted program a←not ba \leftarrow \mathit{not}\ b, b←not ab \leftarrow \mathit{not}\ a, a←ba \leftarrow b, b←ab \leftarrow a has no answer set.
  • Non-example: a choice rule. The choice rule {a,b}←\{a, b\} \leftarrow has the four answer sets ∅,{a},{b},{a,b}\emptyset, \{a\}, \{b\}, \{a, b\}. A choice rule does not ask for minimality and is not a disjunctive rule.
  • Non-example: classical disjunction. In classical logic, a∨ba \vee b has the three models {a},{b},{a,b}\{a\}, \{b\}, \{a, b\}. The answer set semantics keeps only the minimal ones, so a∨b←a \vee b \leftarrow does not entail ¬(a∧b)\neg(a \wedge b) classically but does make a∧ba \wedge b false in every answer set.
  • Non-example: a constraint. The rule ←a,b\leftarrow a, b has an empty head, so it is not a disjunctive rule with k≥1k \geq 1. It can be written f←a,b,not ff \leftarrow a, b, \mathit{not}\ f with a new atom ff.
  • Normal program and stable model. A disjunctive program with k=1k = 1 in every rule is a normal program, and its answer sets are its stable models. Existence is NP-complete for normal programs (Marek and Truszczyński) and Σ2p\Sigma_2^p-complete for disjunctive programs.
  • Minimal models and circumscription. For a positive disjunctive program, the answer sets are the minimal models. Reasoning over minimal models is also the propositional core of circumscription.
  • Extended disjunctive program. Gelfond and Lifschitz (1991) also allow classical negation ¬a\neg a in heads and bodies. For the consistent answer sets, treat ¬a\neg a as a new atom a′a' and add the constraint ←a,a′\leftarrow a, a', so this extension adds no complexity.
  • Disjunctive solvers. DLV (Leone et al. 2006) computes answer sets of disjunctive programs with a candidate search and a separate minimality check, which matches the two levels of the complexity.

References

  1. Michael Gelfond and Vladimir Lifschitz, Classical negation in logic programs and disjunctive databases, New Generation Computing 9(3-4), 365 to 385 (1991), the definition of answer sets for disjunctive programs with classical negation, by the reduct and minimal models
  2. Rachel Ben-Eliyahu and Rina Dechter, Propositional semantics for disjunctive logic programs, Annals of Mathematics and Artificial Intelligence 12(1-2), 53 to 87 (1994), the definition of head-cycle-free programs and the proof that shifting preserves their answer sets
  3. Thomas Eiter and Georg Gottlob, On the computational cost of disjunctive logic programming, propositional case, Annals of Mathematics and Artificial Intelligence 15(3-4), 289 to 323 (1995), the complexity of answer sets of propositional disjunctive programs
  4. Nicola Leone, Gerald Pfeifer, Wolfgang Faber, Thomas Eiter, Georg Gottlob, Simona Perri and Francesco Scarcello, The DLV system for knowledge representation and reasoning, ACM Transactions on Computational Logic 7(3) (2006), the language of disjunctive programs supported by DLV

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/DBCEQ3/text.yaml