On the Complexity of Horn and Krom Fragments of Second-Order Boolean Logic

Miika Hannula, Juha Kontinen, Martin Lück, Jonni Virtema

TL;DR

This paper maps the computational complexity landscape of second-order Boolean logic ($\text{SO}_2$) when restricted to Horn, Krom (2-CNF), and core (Horn + Krom) formulas. The authors show that while certain syntactic restrictions cause complexity to collapse all the way down to NL or P, the ability to quantify functions often allows formulas to simulate arbitrary logic gates—keeping the problems complete for high levels of the exponential time hierarchy.

What Problem Does This Paper Address?

In quantified Boolean formulas (QBF), we quantify over truth values ($0$ or $1$). In second-order Boolean logic ($\text{SO}_2$), quantifiers range over Boolean functions, vastly increasing expressive power. Unrestricted, deciding truth in $\text{SO}_2$ with $k$ quantifier alternations is complete for the $k$-th level of the exponential hierarchy ($\Sigma_k^\text{E}$ or $\Pi_k^\text{E}$), generalizing problems like Dependency QBF (DQBF).

In propositional SAT and standard QBF, restricting formulas to Horn clauses (at most one positive literal) or Krom clauses (at most two literals per clause) drops the complexity dramatically (e.g., to P or NL). Notably, DQBF with Horn clauses also collapses from NEXP down to P. The authors investigate: When does restricting the formula matrix to Horn or Krom neutralize the high complexity of function quantification, and when does second-order quantification overpower these structural barriers?

Methods

The authors analyze combinations of matrix restrictions (Horn, Krom, core) and term restrictions:

  • Simpleness: Functions cannot take nested function applications as arguments; arguments must be pure propositional variables.
  • Uniqueness: Each function variable must always appear with the exact same sequence of arguments throughout the formula (as in Skolemized forms and DQBF).

Key technical approaches include:

  1. Implication Graph Analysis on "Braided" Formulas: Adapting the classical 2-SAT / Krom QBF graph-reachability algorithm (Aspvall et al.) to second-order functions. By defining a dependency relation between literals and components and tracking cycles, reachability tests can be carried out in nondeterministic logarithmic space (NL).
  2. Universal Expansion: Eliminating the final universal propositional quantifier block by expanding it into an exponential-sized conjunction, turning the matrix into a large propositional Horn/Krom formula solvable in deterministic polynomial time relative to its expanded size.
  3. Function-Simulated Connectives: Showing that without simpleness or uniqueness, existential or universal function quantifiers can simulate logic connectives (like NAND or disjunction), completely rendering clause restrictions meaningless.

Datasets

Not applicable. This is a theoretical computer science paper; no empirical datasets or benchmarks were used.

Key Insights and Ideas

  • Extreme Collapses to NL: For simple, unique Krom and core formulas at the base of the hierarchy ($\Sigma_1$, $\Pi_1$, and $\Pi_2$), truth evaluation collapses all the way to NL-complete, matching the complexity of classical 2-SAT.
  • The Role of Simpleness: Without simpleness (allowing nested function terms like $f(g(x))$), existential function quantifiers can simulate arbitrary disjunctions using unit clauses. Consequently, non-simple $\Sigma_1$ core formulas remain NEXP-complete ($\Sigma_1^\text{E}$-complete).
  • The Cost of Non-Uniqueness: If functions can take different arguments in different clauses, functions can encode tape configurations and transitions across time. As a result:
  • Simple $\Sigma_1$ Krom jumps from NL to PSPACE-complete.
  • Simple $\Sigma_1$ Horn jumps from P to EXP-complete.
  • Quantifier Boundary Matters: Structural collapses in alternation hierarchies (dropping a level from $\Sigma_k^\text{E}$ to $\Sigma_{k-1}^\text{E}$) only occur if the final quantifier block over propositions is universal, which permits expansion into CNF. If the final block is existential, expansion yields DNF, destroying the Horn/Krom clause structure.

Key Results

The authors provide an almost complete classification across all combinations (summarized in Table 1 of the paper):

  • Simple + Unique:
  • $\Sigma_1$ Krom/core: NL-complete.
  • $\Pi_1$ and $\Pi_2$ Krom/core: NL-complete.
  • For $k \ge 3$ (odd) $\Sigma_k$: drops to $\Sigma_{k-1}^\text{E}$-complete; for $k \ge 4$ (even) $\Sigma_k$: remains $\Sigma_k^\text{E}$-complete.
  • Simple + Non-Unique:
  • $\Sigma_1$ Krom/core: PSPACE-complete.
  • $\Sigma_1$ Horn: EXP-complete.
  • $\Pi_1$ core: $\Pi_1^\text{E}$-complete (coNEXP-complete).
  • Non-Simple:
  • $\Sigma_k$ core is $\Sigma_k^\text{E}$-complete for all $k \ge 1$ (even with uniqueness).

Limitations and Future Work

  • The Inverse DQBF-Horn Problem: The complexity of simple, unique $\Pi_1$ Horn formulas remains open; it is currently only bounded between NL and $\Pi_1^\text{E}$. The authors conjecture it is P-complete, mirroring the known P-completeness of $\Sigma_1$ Horn (DQBF-Horn).
  • Higher Horn Fragments: The exact complexity of simple, unique $\Pi_2$ Horn also remains open, likely resolving alongside the $\Pi_1$ case.

Summary updated

Abstract

Second-order Boolean logic is a generalization of QBF, whose constant alternation fragments are known to be complete for the levels of the exponential time hierarchy. We consider two types of restriction of this logic: 1) restrictions to term constructions, 2) restrictions to the form of the Boolean matrix. Of the first sort, we consider two kinds of restrictions: firstly, disallowing nested use of proper function variables, and secondly stipulating that each function variable must appear with a fixed sequence of arguments. Of the second sort, we consider Horn, Krom, and core fragments of the Boolean matrix. We classify the complexity of logics obtained by combining these two types of restrictions. We show that, in most cases, logics with k alternating blocks of function quantifiers are complete for the kth or (k-1)th level of the exponential time hierarchy. Furthermore, we establish NL-completeness for the Krom and core fragments, when k = 1 and both restrictions of the first sort are in effect.
BibTeX
@inproceedings{hannula2021complexity,
  author = {Miika Hannula and Juha Kontinen and Martin Lück and Jonni Virtema},
  title = {{On the Complexity of Horn and Krom Fragments of Second-Order Boolean Logic}},
  booktitle = {CSL},
  year = {2021},
  url = {https://openreview.net/forum?id=4XYOcjjRcbR},
}
Figure