On the complexity of single-rule datalog queries

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.

[1]  Letizia Tanca,et al.  Logic Programming and Databases , 1990, Surveys in Computer Science.

[2]  Georg Gottlob,et al.  Complexity and expressive power of logic programming , 1997, Proceedings of Computational Complexity. Twelfth Annual IEEE Conference.

[3]  Saso Dzeroski,et al.  Inductive logic programming and learnability , 1994, SGAR.

[4]  Neil Immerman,et al.  Descriptive Complexity , 1999, Graduate Texts in Computer Science.

[5]  P ? ? ? ? ? ? ? % ? ? ? ? , 1991 .

[6]  Erich Grädel,et al.  The Expressive Power of Second Order Horn Logic , 1991, STACS.

[7]  Jerzy Marcinkowski The 3 Frenchmen Method Proves Undecidability of the Uniform Boundedness for Single Recursive Rule Ternary DATALOG Programs , 1996, STACS.

[8]  Erich Grädel,et al.  Capturing Complexity Classes by Fragments of Second-Order Logic , 1991, Theor. Comput. Sci..

[9]  Serge Abiteboul,et al.  Foundations of Databases , 1994 .

[10]  Egon Börger,et al.  Trends in theoretical computer science , 1988 .

[11]  Moshe Y. Vardi The complexity of relational query languages (Extended Abstract) , 1982, STOC '82.

[12]  Philippe Devienne,et al.  Halting Problem of One Binary Horn Clause is Undecidable , 1993, STACS.

[13]  Jeffrey D. Ullman,et al.  Parallel complexity of logical query programs , 1986, 27th Annual Symposium on Foundations of Computer Science (sfcs 1986).

[14]  Jeffrey D. Ullman,et al.  Principles of Database and Knowledge-Base Systems, Volume II , 1988, Principles of computer science series.

[15]  Stål O. Aanderaa On the Decision Problem for Formulas in which all Disjunctions are Binary , 1971 .

[16]  Jörg Flum,et al.  Finite model theory , 1995, Perspectives in Mathematical Logic.

[17]  Yuri Gurevich,et al.  The Classical Decision Problem , 1997, Perspectives in Mathematical Logic.

[18]  Georg Gottlob,et al.  Subsumption and Implication , 1987, Inf. Process. Lett..

[19]  Neil Immerman,et al.  Relational Queries Computable in Polynomial Time , 1986, Inf. Control..

[20]  Ashok K. Chandra,et al.  Optimal implementation of conjunctive queries in relational data bases , 1977, STOC '77.

[21]  Harry R. Lewis Krom Formulas with One Dyadic Predicate Letter , 1976, J. Symb. Log..

[22]  G. G. Stokes "J." , 1890, The New Yale Book of Quotations.

[23]  Jack Minker Foundations of deductive databases and logic programming , 1988 .

[24]  A. Dawar FINITE MODEL THEORY (Perspectives in Mathematical Logic) , 1997 .

[25]  Larry J. Stockmeyer,et al.  The Polynomial-Time Hierarchy , 1976, Theor. Comput. Sci..

[26]  Leszek Pacholski,et al.  Undecidability of the Horn-clause implication problem , 1992, Proceedings., 33rd Annual Symposium on Foundations of Computer Science.

[27]  Johann A. Makowsky,et al.  Embedded implicational dependencies and their inference problem , 1981, STOC '81.

[28]  Jörg Würtz,et al.  Satisfiability of the Smallest Binary Program , 1993, Inf. Process. Lett..

[29]  J. Marcinkowski DATALOG SIRUPs uniform boundedness is undecidable , 1996, Proceedings 11th Annual IEEE Symposium on Logic in Computer Science.

[30]  Harry G. Mairson,et al.  Undecidable Boundedness Problems for Datalog Programs , 1995, J. Log. Program..

[31]  John S. Schlipf,et al.  The Expressive Powers of the Logic Programming Semantics , 1995, J. Comput. Syst. Sci..

[32]  Oded Shmueli,et al.  Decidability and expressiveness aspects of logic queries , 1987, XP7.52 Workshop on Database Theory.

[33]  Serge Abiteboul Boundedness is Undecidable for Datalog Programs with a Single Recursive Rule , 1989, Inf. Process. Lett..

[34]  Paris C. Kanellakis,et al.  Logic Programming and Parallel Complexity , 1986, Foundations of Deductive Databases and Logic Programming..

[35]  Christos H. Papadimitriou,et al.  The parallel complexity of simple logic programs , 1993, JACM.