On the complexity of single-rule datalog queries

  • Authors:
  • Georg Gottlob;Christos Papadimitriou

  • Affiliations:
  • Institut für Informationssysteme, Technische Universität Wien, Favoritenstrasse 9-11, A-1040 Wien, Austria;Department of Electrical Engineering and Computer Science, Computer Science Division, University of California, Berkeley, CA

  • Venue:
  • Information and Computation - Special issue: ICC '99
  • Year:
  • 2003

Quantified Score

Hi-index 0.00

Visualization

Abstract

Datalog programs containing a unique rule and possibly some facts are known as single rule programs, or sirups. We study the complexity of evaluating sirups over variable and fixed databases, respectively, as well as the descriptive complexity of sirups, i.e., their expressive power. In all cases it turns out that even very restricted classes of sirups have the same complexity and essentially the same expressive power as general datalog programs. In particular, the evaluation of single clause programs is EXPTIME complete (combined complexity) and, if restricted to linear recursive rules, PSPACE complete. Moreover, sirups with one recursive rule and one fact capture PTIME on ordered structures, if a certain data representation is assumed and certain predefined relations are provided. We also prove that the datalog clause implication problem, i.e., deciding whether a datalog clause implies another one, is EXPTIME complete. Our main technical tool is a product construction which maps a datalog programs to an essentially equivalent sirup.