Algorithm Search⌘K

Theoremresearch

Sigma2P-completeness of disjunctive answer sets

Also called Eiter-Gottlob disjunctive complexity.

Deciding whether a propositional disjunctive logic program has an answer set is Sigma2P-complete.

This theorem of Eiter and Gottlob (1993, 1995) shows that disjunction in rule heads makes answer set programming strictly more expressive than normal programs, unless the polynomial hierarchy collapses. For a disjunctive logic program, a candidate answer set must be a minimal model of its reduct, and this minimality test is itself a coNP problem. So the existence question sits at the second level, Σ2p\Sigma_2^p, of the polynomial hierarchy, and it is complete there by a reduction from 2-QBF. Disjunctive solvers such as DLV pay for this with a second, inner search.

Statement

A finite propositional disjunctive program PP is a finite set of rules 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 over a finite set AA of atoms, with k≥1k \geq 1 and m,n≥0m, n \geq 0. For M⊆AM \subseteq A, the reduct PMP^M deletes each rule with some cj∈Mc_j \in M and deletes the negative literals of the other rules. MM is an answer set of PP if MM is a minimal model of the positive program PMP^M (Gelfond and Lifschitz 1991). For k=1k = 1 in every rule, this is the stable model of a normal program.

Theorem (Eiter and Gottlob 1995). For finite propositional disjunctive programs:

  1. deciding whether PP has an answer set is Σ2p\Sigma_2^p-complete;
  2. deciding whether an atom is in some answer set (brave reasoning) is Σ2p\Sigma_2^p-complete, and hardness holds already for programs without not\mathit{not};
  3. deciding whether an atom is in every answer set (cautious reasoning) is Π2p\Pi_2^p-complete;
  4. deciding whether a given set MM is an answer set (model checking) is coNP-complete.

For head-cycle-free programs (Ben-Eliyahu and Dechter 1994), items 1 and 2 drop to NP and item 3 to coNP, as for normal programs.

In plain words

For an ordinary program you can check a proposed answer by following the rules forward once. With rules that say "one of these atoms is true", that is no longer enough. You must also be sure that no smaller set of atoms would satisfy the rules too, and to be sure of that you must in effect search through all smaller sets. So the problem has two nested searches. The outer search guesses an answer. The inner search tries to find a smaller set that defeats it. Problems of this shape, "is there a choice such that every counter-choice fails?", form their own class, one level above the problems with a single search. This theorem says that disjunctive programs reach exactly that level and no higher.

Proof

Membership. For item 1, guess M⊆AM \subseteq A. Check that MM satisfies PMP^M in polynomial time. Then check with one call to an NP oracle that no N⊊MN \subsetneq M is a model of PMP^M; a model NN is a polynomial certificate that MM is not minimal. So the problem is in NPNP=Σ2p\mathrm{NP}^{\mathrm{NP}} = \Sigma_2^p. Brave reasoning adds the test a∈Ma \in M. Cautious reasoning for aa fails exactly when P∪{←a}P \cup \{\leftarrow a\} has an answer set, where the constraint is written z←a,not zz \leftarrow a, \mathit{not}\ z with a new atom zz, so it is in Π2p\Pi_2^p. Model checking is the minimality test alone, so it is in coNP.

Hardness. The problem "given a DNF formula φ\varphi over disjoint sets XX and YY of variables, is ∃X ∀Y φ\exists X\, \forall Y\, \varphi true?" is Σ2p\Sigma_2^p-complete. For a literal ll, let σ(l)\sigma(l) be the atom xx if l=xl = x and x′x' if l=¬xl = \neg x, and the same for the variables in YY. The program PφP_\varphi has the atoms x,x′x, x' for x∈Xx \in X, y,y′y, y' for y∈Yy \in Y, and ww, and the rules

x∨x′←(x∈X),y∨y′←,y←w,y′←w(y∈Y),x \vee x' \leftarrow \quad (x \in X), \qquad y \vee y' \leftarrow, \quad y \leftarrow w, \quad y' \leftarrow w \quad (y \in Y),
w←σ(l1),…,σ(lr)for each term l1∧⋯∧lr of φ,w←not w.w \leftarrow \sigma(l_1), \ldots, \sigma(l_r) \quad \text{for each term } l_1 \wedge \cdots \wedge l_r \text{ of } \varphi, \qquad w \leftarrow \mathit{not}\ w.

The construction is linear. The proof follows Eiter and Gottlob (1995).

(a) Every answer set contains ww. If w∉Mw \notin M, the reduct contains the fact w←w \leftarrow, so MM is not a model of PMP^M.

(b) The answer sets are the sets MI=I∪{y,y′:y∈Y}∪{w}M_I = I \cup \{y, y' : y \in Y\} \cup \{w\}, where II contains exactly one of x,x′x, x' for each x∈Xx \in X and the corresponding assignment of XX makes ∀Y φ\forall Y\, \varphi true. By (a), w∈Mw \in M, so the rule w←not ww \leftarrow \mathit{not}\ w is deleted, and the rules y←wy \leftarrow w and y′←wy' \leftarrow w force all of y,y′y, y' into MM. Any model N⊊MN \subsetneq M of PMP^M that keeps ww must keep all of YY and Y′Y', so MM can be minimal only if it contains exactly one of x,x′x, x' for each xx. A model N⊊MN \subsetneq M that drops ww keeps II, picks at least one of y,y′y, y' for each yy, and makes no term body true. A choice of exactly one of y,y′y, y' for each yy is such a model exactly when the assignment of YY it gives makes every term false under II. So MIM_I is minimal exactly when no assignment of YY falsifies φ\varphi under II, that is, when ∀Y φ\forall Y\, \varphi holds under II.

By (b), PφP_\varphi has an answer set if and only if ∃X ∀Y φ\exists X\, \forall Y\, \varphi is true. Remove the rule w←not ww \leftarrow \mathit{not}\ w to get a positive program Pφ+P^+_\varphi. Its answer sets are its minimal models, the sets MIM_I of (b) together with the minimal models without ww, and so ww is in some answer set of Pφ+P^+_\varphi if and only if the formula is true. This gives item 2 for positive programs. Item 3 follows from item 1: with a new atom zz that occurs in no rule, zz is in every answer set of PP exactly when PP has none. Item 4 is coNP-hard by a similar reduction from the validity of a DNF formula, with XX empty: M=Y∪Y′∪{w}M = Y \cup Y' \cup \{w\} is an answer set of PφP_\varphi exactly when ∀Y φ\forall Y\, \varphi is true. □\square

Examples. For ∃x ∀y ((x∧y)∨(x∧¬y))\exists x\, \forall y\, ((x \wedge y) \vee (x \wedge \neg y)), which is true, PφP_\varphi has exactly one answer set, {w,x,y,y′}\{w, x, y, y'\}, and Pφ+P^+_\varphi has the three answer sets {w,x,y,y′}\{w, x, y, y'\}, {x′,y}\{x', y\} and {x′,y′}\{x', y'\}. For ∃x ∀y ((x∧y)∨(¬x∧¬y))\exists x\, \forall y\, ((x \wedge y) \vee (\neg x \wedge \neg y)), which is false, PφP_\varphi has no answer set, and Pφ+P^+_\varphi has the two answer sets {x,y′}\{x, y'\} and {x′,y}\{x', y\}, neither of which contains ww.

Consequences

  • Disjunction adds expressive power. Unless the polynomial hierarchy collapses to its first level, disjunctive programs cannot be translated into normal programs in polynomial time with the same answer sets on the original atoms. In particular, the translation that replaces a∨b←Ba \vee b \leftarrow B by a←B,not ba \leftarrow B, \mathit{not}\ b and b←B,not ab \leftarrow B, \mathit{not}\ a (shifting) must fail on some programs.
  • Solvers need two searches. A disjunctive solver generates candidates with an NP-style search and checks the minimality of each candidate with a second search, usually a SAT call. DLV (Leone et al. 2006) is built this way.
  • Problems at the second level. Every problem in Σ2p\Sigma_2^p has a polynomial encoding as a disjunctive program, through 2-QBF and the construction above. Normal programs have no such encoding unless the hierarchy collapses.
  • Link to other nonmonotonic logics. The main reasoning tasks of circumscription, default logic and autoepistemic logic are also at the second level. The 1993 paper of Eiter and Gottlob applies the disjunctive results to these logics.

Tightness

  • Negation is needed for item 1. A positive disjunctive program always has an answer set, because every finite model contains a minimal one and the set of all atoms is a model. So the hardness of existence uses not\mathit{not} or constraints. The single rule w←not ww \leftarrow \mathit{not}\ w is enough.
  • Head cycles are needed. If no rule has two head atoms on a common cycle of the positive dependency graph, shifting is correct and the program becomes a normal program of the same size, so existence is in NP. With a head cycle, shifting can lose answer sets. A small example is a∨b←a \vee b \leftarrow, a←ba \leftarrow b, b←ab \leftarrow a: it has the answer set {a,b}\{a, b\}, and its shifted version has none.
  • Model checking. For normal programs model checking is polynomial; for disjunctive programs it is coNP-complete, so the gap already shows in the inner test.
  • Variables. For disjunctive programs with variables and no function symbols, the problem is complete for NEXPTIMENP\mathrm{NEXPTIME}^{\mathrm{NP}} when the program is part of the input and Σ2p\Sigma_2^p-complete when the program is fixed (Dantsin, Eiter, Gottlob and Voronkov 2001).

History

Gelfond and Lifschitz (1991) extended stable models to disjunctive programs with classical negation, and called them answer sets. Eiter and Gottlob presented the complexity of disjunctive logic programming at ILPS 1993 and published the full propositional study in 1995, which covered the stable, minimal model and other semantics. Ben-Eliyahu and Dechter (1994) identified head-cycle-free programs as the class where disjunction does not raise the complexity. The DLV system (Leone et al. 2006) was designed for the full Σ2p\Sigma_2^p case.

References

  1. 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 results on the stable model semantics of propositional disjunctive programs, existence, brave and cautious reasoning, and model checking
  2. Thomas Eiter and Georg Gottlob, Complexity results for disjunctive logic programming and application to nonmonotonic logics, in Dale Miller (ed.), Logic Programming: Proceedings of the 1993 International Symposium (ILPS 1993), MIT Press, 266 to 278 (1993), the conference version of the complexity results
  3. 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 as minimal models of the reduct
  4. 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), head-cycle-free programs, their translation to normal programs, and the resulting NP bound
  5. Evgeny Dantsin, Thomas Eiter, Georg Gottlob and Andrei Voronkov, Complexity and expressive power of logic programming, ACM Computing Surveys 33(3), 374 to 425 (2001), the survey of the complexity of disjunctive logic programming, in the propositional case and with variables
  6. 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 solver for disjunctive programs and its check of answer set candidates

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/9CD50Z/text.yaml