Inductive pebble games and the expressive power of datalog

As an alternative to logic-based query languages for recursive queries, we are investigating a graphical query language called G+, which allows, among other things, easy formulation of certain queries involving simple paths in directed graphs. This led us to study whether such queries are expressible in DATALOG, the language of function-free Horn clauses. Since some G+ queries are NP-hard, and all DATALOG queries are polynomial time computable, the answer appears to be negative. However, it would be interesting to have proof techniques and tools for settling such questions with certainty. The objective of this paper is the development of one such tool, inductive pebble games, based on a normal form for DATALOG programs derived here, and its relationship to Alternating Turing Machine computations. As an application, we sketch a proof that the query “find all pairs of nodes connected by a directed simple path of even length” cannot be expressed in DATALOG.

[1]  J. Lloyd Foundations of Logic Programming , 1984, Symbolic Computation.

[2]  J. W. Lloyd,et al.  Foundations of logic programming; (2nd extended ed.) , 1987 .

[3]  John E. Hopcroft,et al.  The Directed Subgraph Homeomorphism Problem , 1978, Theor. Comput. Sci..

[4]  John Wylie Lloyd,et al.  Foundations of Logic Programming , 1987, Symbolic Computation.

[5]  Ehud Y. Shapiro Alternation and the Computational Complexity of Logic Programs , 1984, J. Log. Program..

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

[7]  Alberto O. Mendelzon,et al.  G+: Recursive Queries Without Recursion , 1988, Expert Database Conf..

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

[9]  Michel de Rougemont Second-order and Inductive Definability on Finite Structures , 1987, Math. Log. Q..

[10]  Neil Immerman Upper and lower bounds for first order expressibility , 1980, 21st Annual Symposium on Foundations of Computer Science (sfcs 1980).

[11]  David Harel,et al.  Horn Clauses Queries and Generalizations , 1985, J. Log. Program..

[12]  A. Ehrenfeucht An application of games to the completeness problem for formalized theories , 1961 .

[13]  Jeffrey D. Uuman Principles of database and knowledge- base systems , 1989 .

[14]  Yuri Gurevich,et al.  Toward logic tailored for computational complexity , 1984 .

[15]  Alberto O. Mendelzon,et al.  A graphical query language supporting recursion , 1987, SIGMOD '87.

[16]  Neil Immerman,et al.  Relational queries computable in polynomial time (Extended Abstract) , 1982, STOC '82.

[17]  Ronald Fagin Generalized first-order spectra, and polynomial. time recognizable sets , 1974 .