Abstract
This research bridges the gap between logic and computational complexity by evaluating First-Order (FO) logic over semirings—algebraic structures representing costs, probabilities, or polynomials—instead of standard Boolean values. The authors introduce generalized machine models and prove a major descriptive complexity result: an extended version of FO logic perfectly characterizes the computing power of constant-depth arithmetic circuits over any commutative, positive semiring.
Introduction: Beyond Boolean Logic
In traditional logic, a statement is either True or False, corresponding to the Boolean semiring. However, modern database theory, particularly the field of "semiring provenance," evaluates queries over arbitrary semirings to answer richer questions. Instead of a binary outcome, researchers ask: "What is the probability of this result?" (Probability semiring), "What is the shortest path between these nodes?" (Tropical semiring), or "How many ways can this query be satisfied?" (Natural numbers).
While the mapping between standard Boolean logic and computational complexity (descriptive complexity) is well-understood, a solid framework for logics evaluated over arbitrary semirings has been lacking. This paper addresses this gap by identifying the computational machine models and circuit classes that correspond to First-Order logic when evaluated over a semiring $K$.
Methodology: Adapting Computational Models
To establish a complexity theory for semirings, the authors adapted several standard computational models:
- Generalized BSS Machines: They adapted Blum-Shub-Smale (BSS) machines to arbitrary semirings ($\text{BSS}_K$). Since semirings generally lack additive and multiplicative inverses, these machines operate without subtraction or division.
- $K$-Turing Machines: A hybrid model was introduced, combining a standard Turing machine tape with a finite set of semiring-valued registers. This model was proven to be polynomially equivalent to the $\text{BSS}_K$ machine.
- Extended FO Logic: Standard FO logic was extended with "formula inequalities," allowing the logic to compare the semiring values of two sub-formulas.
- Circuit Characterization: Structural induction was used to map logical formulas to arithmetic circuit gates, establishing an equivalence between logic and specific circuit families.
Key Insights: Inequalities and Quantifiers
A significant finding is that adding inequality operators ($\leq, <$) between formulas strictly increases expressive power in semirings where multiplication is "expansive," such as the Tropical semiring. This differs from Boolean logic, where such operators do not add expressive power.
Furthermore, the authors generalized Immerman's theorem—which states that FO logic corresponds to constant-depth Boolean circuits ($\text{AC}^0$)—to the algebraic realm. In this framework, logical quantifiers map directly to unbounded arithmetic gates: the existential quantifier ($\exists$) acts as an unbounded addition gate, while the universal quantifier ($\forall$) acts as an unbounded multiplication gate.
Results: Characterizing Arithmetic Circuits
The paper's primary contribution is the formal proof that $\text{FO}_K(O, \text{Arb}_K) = \text{FAC}^0_K[O]$. This means that First-Order logic, equipped with built-in relations and inequality operators, is exactly equal in computing power to constant-depth arithmetic circuits over any commutative, positive semiring.
Additionally, the authors proved that evaluating a fixed FO formula over a semiring interpretation runs in polynomial time ($\text{P}_K$) on their generalized machine models. The general model-checking problem, where the formula is part of the input, resides in $\text{PSPACE}_K$.
Limitations and Future Work
The current circuit equivalence holds for non-uniform circuit families, meaning the proof does not restrict the computational difficulty of constructing the circuit for a given input size. Establishing a uniform version of this theorem is a critical next step. Future research will also explore characterizing larger arithmetic circuit hierarchies (like AC and NC) and adapting Fagin's Theorem—which connects Second-Order logic to NP—to the context of semirings and BSS machines.
Summary updated