Abstract
We consider the parallel time complexity of logic programs without function symbols, called logical query programs, or Datalog programs. We give a PRAM algorithm for computing the minimum model of a logical query program, and show that for programs with the “polynomial fringe property,” this algorithm runs in time that is logarithmic in the input size, assuming that concurrent writes are allowed if they are consistent. As a result, the “linear” and “piecewise linear” classes of logic programs are inN C. Then we examine several nonlinear classes in which the program has a single recursive rule that is an “elementary chain.” We show that certain nonlinear programs are related to GSM mappings of a balanced parentheses language, and that this relationship implies the “polynomial fringe property;” hence such programs are inN C Finally, we describe an approach for demonstrating that certain logical query programs are log space complete forP, and apply it to both elementary single rule programs and nonelementary programs.
Similar content being viewed by others
References
F. Afrati and C. H. Papadimitriou. The parallel complexity of simple chain queries. In6th ACM Symposium on Principles of Database Systems, pp. 210–213, 1987.
A. V. Aho and J. D. Ullman. Universality of data retrieval languages. In6th ACM Symposium on Principles of Programming Languages, pp. 110–120, 1979.
K. R. Apt and M. H. Van Emden. Contributions to the theory of logic programming.J. Assoc. Comput. Math.,29(3):841–862, 1982.
M. J. Atallah and S. E. Hambrusch. Solving tree problems on a mesh-connected processor array. In26th FOCS, pp. 222–231, 1985.
A. Chandra and D. Harel. Structure and complexity of relational queries.J. Comput. System Sci.,25(1):99–128, 1982.
S. A. Cook. An observation on time-storage trade-off.J. Comput. System Sci.,9(3):308–316, 1974.
S. A. Cook. A taxonomy of problems with fast parallel algorithms.Inform. and Control,64(1):2–22, 1985.
S. S. Cosmadakis and P. C. Kanellakis. Parallel evaluation of recursive rule queries. In5th ACM Symposium on Principles of Database Systems, pp. 280–293, 1986.
S. Ginsburg and E. H. Spanier. Finite turn pushdown automata.SIAM J. Control,4(3):429–453, 1966.
S. A. Greibach. A note on undecidable properties of formal languages.Math Systems Theory,2(1):1–6, 1968.
S. A. Greibach. The hardest context-free language.SIAM J. Comput.,2(4):304–310, 1973.
J. E. Hopcroft and J. D. Ullman.Introduction to Automata Theory, Languages, and Computation. Addision-Wesley, Reading, MA, 1979.
N. D. Jones and W. T. Laaser. Complete problems for deterministic polynomial time.Theor. Comput. Sci. 3(1):105–117, 1976.
G. L. Miller and J. H. Reif. Parallel tree contraction and its applications. In26th FOCS, pp. 478–489, 1985.
G. L. Miller, V. Ramachandran, and E. Kaltofen. Efficient parallel evaluation of straight-line code and arithmetic circuits. InVLSI Algorithms and Architectures, pp. 236–245, Springer-Verlag, New York, 1986.
W. L. Ruzzo. Tree-size bounded alternation.J. Comput. System Sci.,21(2):218–235, 1980.
E. Shapiro. Alternation and the computational complexity of logic programs.J. Logic Programming. 1(1):19–23, 1984.
L. Stockmeyer and U. Vishkin. Simulation of parallel random access machines by circuits.SIAM J. Comput.,13(2):409–422, 1984.
J. D. Ullman and A. Van Gelder. Parallel Complexity of Logical Query Programs. Technical Report STAN-CS-85-1089, Dept. of Computer Science, Stanford University, Stanford, CA, 1985 (short version presented at27th FOCS, 1986).
L. G. Valiant, S. Skyum, S. Berkowitz, and C. Rackoff. Fast parallel computation on polynomials using few processors.SIAM J. Comput.,12(4):641–644, 1983.
M. H. Van Emden and R. A. Kowalski. The semantics of predicate logic as a programming language.J. Assoc. Comput. Math.,23(4):733–742, 1976.
A. Van Gelder. Negation as failure using tight derivations for general logic programs. InProc. Third IEEE Symposium on Logic Programming, 1986 (preliminary version also presented in Workshop on Foundations of Deductive Databases and Logic Programming, Washington, DC, 1986).
M. Vardi. Complexity of relational queries. In14th ACM Symposium on Theory of Computing, pp. 137–145, 1982.
M. Y. Vardi. Querying logical databases. In4th PODS, pp. 57–65, 1985.
Author information
Authors and Affiliations
Additional information
Communicated by Jeffrey Scott Vitter.
Supported by NSF Grant IST-84-12791, a grant of IBM Corporation, and ONR contract N00014-85-C-0731.
Rights and permissions
About this article
Cite this article
Ullman, J.D., Van Gelder, A. Parallel complexity of logical query programs. Algorithmica 3, 5–42 (1988). https://doi.org/10.1007/BF01762108
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF01762108