English

Circuits and Formulas for Datalog over Semirings

Databases 2025-04-15 v1 Computational Complexity

Abstract

In this paper, we study circuits and formulas for provenance polynomials of Datalog programs. We ask the following question: given an absorptive semiring and a fact of a Datalog program, what is the optimal depth and size of a circuit/formula that computes its provenance polynomial? We focus on absorptive semirings as these guarantee the existence of a polynomial-size circuit. Our main result is a dichotomy for several classes of Datalog programs on whether they admit a formula of polynomial size or not. We achieve this result by showing that for these Datalog programs the optimal circuit depth is either Θ(logm)\Theta(\log m) or Θ(log2m)\Theta(\log^2 m), where mm is the input size. We also show that for Datalog programs with the polynomial fringe property, we can always construct low-depth circuits of size O(log2m)O(\log^2 m). Finally, we give characterizations of when Datalog programs are bounded over more general semirings.

Cite

@article{arxiv.2504.08914,
  title  = {Circuits and Formulas for Datalog over Semirings},
  author = {Austen Z. Fan and Paraschos Koutris and Sudeepa Roy},
  journal= {arXiv preprint arXiv:2504.08914},
  year   = {2025}
}

Comments

To appear in PODS 2025

R2 v1 2026-06-28T22:55:27.608Z