Abstract
This paper is a survey of the many applications of the theory of parallel algorithms and complexity to logic programming problems. The mathematical tools relevant to the analysis of parallel logic programs include: the concept of alternation, the complexity class NC, and parallel algorithms using randomization and/or achieving optimal speed-ups. The logic programming problems addressed are related to query optimization for deductive databases and to fast parallel execution of primitive operations in logic programming languages, such as, fixpoint operators, term unification, and term matching. The formal language we use to illustrate the addition of recursion to database queries is the language of logical query programs (or programs), whose evaluation has been the object of much recent research. Our presentation highlights the fact that all of these results can be stated using the stage function sH(n) of a program H, where n is the size of the database queried. In this context we also present two new observations. (1) Given a linear single rule program H, it is NP-hard to decide whether sH(n)=O(1); this extends the bounded recursion analysis of[57, 42]. (2) There is a program that can be evaluated in s(n)=O(log n) stages, but whose derivation trees (of width 1) are of size exponential in n. An extension of derivation trees from width 1 to constant width properly strengthens the fast evaluation method of [76].
Supported partly by an IBM Faculty Development Award and partly by ONR-DARPA grant N00014-83-K-0146, ARPA Order No. 4786.
This is a preview of subscription content, log in via an institution.
Preview
Unable to display preview. Download preview PDF.
References
Aho, A.V. and Ullman, J.D. Universality of Data Retrieval Languages. Proceedings of the 6th POPL, ACM, 1979.
Afrati, F. Papadimitriou, C.H. The Polynomial Stack Theorem and its Applications. Tech. Rep., National Technical Univ. of Athens, May 1986.
Atallah, M.J., Hambrusch, S.E. Solving Tree Problems on a Mesh-connected Processor Array. Proceedings of the 26th FOCS, IEEE, 1985.
Apt, K.R., van Emden, M.H. "Contributions to the Theory of Logic Programming". JACM 29, 4 (1982), 841–862.
Barwise, J. Moschovakis, Y.N. "Global Inductive Definability". Journal of Symbolic Logic 43, 3 (1978), 521–534.
Bancilhon, F., Maier, D., Sagiv, Y., Ullman, J.D. Magic Sets and Other Strange Ways to Implement Logic Programs. Proceedings of the 5th PODS, ACM, 1986.
Bancilhon, F., Ramakrishnan, R. An Amateur's Introduction to Recursive Query Processing Strategies. Proceedings of the 86 SIGMOD, ACM, 1986.
Chandra, A.K., Harel, D. "Structure and Complexity of Relational Queries". JCSS 25, 1 (1982), 99–128.
Chandra, A.K., Harel, D. "Horn Clause Programs and Generalizations". J. Logic Programming 2 (1985), 1–15.
Chandra, A.K. Maximal Parallelism in Matrix Multiplication. RC 6193, IBM, 1976.
Cosmadakis, S.S., Kanellakis, P.C. Parallel Evaluation of Recursive Rule Queries. Proceedings of the 5th PODS, ACM, 1986.
Chandra, A.K., Kozen, D.C., Stockmeyer, L.J. "Alternation". JACM 28, 1 (1981), 114–133.
Clark, K.L., Gregory, S. A Relational Language for Parallel Programming. Proceedings of the ACM Conference on Functional Programming Languages and Computer Architecture, ACM, 1981.
Clark, K.L. Negation as Failure. In Logic and Databases, Gallaire, H. and Minker, J., Eds., Plenum Press, 1978, pp. 293–324.
Clocksin, W.F., Mellish, C.S., Programming in Prolog. Springer Verlag, 1981.
Codd, E.F. "A Relational Model for Large Shared Data Banks". CACM 13, 6 (June 1970), 377–387.
Cook, S.A. "An Observation on a Time-Storage Trade-off". JCSS 9, 3 (1974), 308–316.
Cook, S.A. "A Taxonomy of Problems with Fast Parallel Algorithms". Information and Control 64 (1985), 2–22.
Cole, R., Vishkin, U. Deterministic Coin Tossing and Accelerating Cascades: Micro and Macro Techniques for Designing Parallel Algorithms. Proceedings of the 17th STOC, ACM, 1986.
Coppersmith, D., Winograd, S. "On the Asymptotic Complexity of Matrix Multiplication". SIAM J. of Computing 11, (1982), 472–492.
deRougemont, M. Uniform Definability of Finite Structures with Successor. Proceedings of the 16th STOC, ACM, 1984.
Dwork, C., Kanellakis, P.C., and Mitchell, J.C. "On the Sequential Nature of Unification". J. Logic Programming 1, 1 (1984), 35–50.
Dwork, C., Kanellakis, P.C., Stockmeyer, L.J. Parallel Algorithms for Term Matching. Proceedings of the 8th International Conference on Automated Deduction, Springer Verlag LNCS, 1986.
Downey, P.J., Sethi, R. and Tarjan, R.E. "Variations on the Common Subexpression Problem". JACM 27, 4 (1980), 758–771.
Fagin, R. "Monadic Generalized Spectra". Zeitschr. f. math. logik 21, (1975), 89–96.
Fagin, R. "Generalized First-Order Spectra and Polynomial-Time Recognizable Sets". SIAM-AMS Proc. 7, 1 (1974), 43–73.
Fortune, S., Wyllie, J. Parallelism in Random access Machines. Proceedings of the 10th STOC, ACM, 1978.
Gaifman, H. January 1986. NAIL Seminar.
Gaifman, H., Vardi, M.Y. "A Simple Proof that Connectivity of Finite Graphs is Not First-Order Definable". Bulletin of the EATCS 26, June (1985), 44–45.
Gallaire, H., Minker, C., Nicolas, J.M. "Logic and Databases: A Deductive Approach". Computing Surveys 16, (1984), 153–185.
Goldschlager, L.M. "The Monotone and Planar Circuit Value Problems are Logspace-complete forP". SIGACT News 9, 2 (1977), 25–29.
Gurevich, Y., Shelah S. Fixed-Point Extensions of First-Order Logic. Proceedings of the 26th FOCS, IEEE, 1985.
Gurevich, Y. Algebra of Feasible Functions. Proceedings of the 24th FOCS, IEEE, 1983.
Gurevich, Y., Lewis, H.R. "A Logic for Constant Depth Circuits". Information and Control 61, (1984), 65–74.
Harel, D., Kozen, D.C. "A Programming Language for the Inductive Sets, and Applications". Information and Control 63, (1984), 118–139.
Henschen, L.J., Naqvi, S.A. "On Compiling Queries in Recursive First-Order Databases". JACM 31, 1 (1984), 47–85.
Hopcroft, J.E. and Ullman, J.D.. Introduction to Automata Theory, Languages, and Computation. Addison-Wesley, 1979.
Huet, G. and Oppen, D. Equations and Rewrite Rules: a Survey. In Formal Languages: Perspectives and Open Problems, Book, R., Ed., Academic Press, 1980, pp. 349–403.
Immerman, N. "Number of Quantifiers is Better than Number of Tape Cells". JCSS 22, 3 (1981), 65–72.
Immerman, N. Relational Queries Computable in Polynomial Time. Proceedings of the 14th STOC, ACM, 1982.
Immerman, N. Languages which Capture complexity Classes. Proceedings of the 15th STOC, ACM, 1983.
Ioannidis, Y.E. A Time Bound on the Materialization of Some Recursively Defined Views. Proceedings of the 85 VLDB, Stockholm, 1985.
Ioannidis, Y.E. On the Computation of the Transitive Closure of Relational Operators. Proceedings of the 86 VLDB, Tokyo, 1986.
Jones, N.D., Laaser, W.T. "Complete Problems for Deterministic Polynomial Time". TCS 3, 2 (1977), 105–117.
Knuth, D.E. and Bendix, P.B. Simple Word Problems in Universal Algebras. In Computational Problems in Abstract Algebra, Leech, J., Ed., Pergamon, Oxford, 1970, pp. 263–297.
Kowalski, R.A.. Logic for Problem-Solving. North Holland, 1979.
Kozen, D. Complexity of Finitely Presented Algebras. Proceedings of the 9th STOC, ACM,, 1977.
Kanellakis, P.C., Papadimitriou, C.H. February 1986. Notes on Monadic Sirups-unpublished.
Karp, R.M., Upfal, E., Wigderson, A. Constructing a Perfect Matching is in Random NC. Proceedings of the 17th STOC, ACM, 1985.
Kowalski, R. Predicate Logic as a Programming Language. Proceedings IFIP 74, Amsterdam, 1974, pp. 569–574.
Mairson, H., Sagiv, Y. February 1986. Personal Communication.
Maluszynski, J., Komorowski, H.J. Unification-free Execution of Horn-clause Programs. Proceedings of the 2nd Logic Programming Symposium, IEEE, 1985.
Martelli, A., Montanari, U. "An efficient Unification Algorithm". ACM Trans. on Programming Languages and Systems 4, 2 (1982).
Miller, G.L., Reif, J.H. Parallel Tree Contraction and its Applications. Proceedings of the 26th FOCS, IEEE, 1985.
Minker, J., Nicolas, J.M. "On Recursive Axioms in Relational Databases". Information Systems 8 (1982), 1–13.
Moschovakis, Y.N.. Elementary Induction on Abstract Structures. North Holland, 1974.
Naughton, J. Data Independent Recursion in Deductive Databases. Proceedings of the 5th PODS, ACM, 1986.
Papadimitriou, C.H. "A Note on the Expressive Power of PROLOG". Bulletin of the EATCS 26, June (1985), 21–23.
Pippenger, N. On Simultaneous Resource Bounds. Proceedings of the 20th FOCS, IEEE, 1979.
Paterson, M.S., Wegman, M.N. "Linear Unification". JCSS 16, (1978), 158–167.
Rabin, M.O. "Probabilistic Algorithm for Testing Primality". J. Number Theory 12 (1980), 128–138.
Reif, J. Optimal Parallel Algorithms for Integer Sorting and Graph Connectivity. Proceedings of the 26th FOCS, IEEE, 1985.
Robinson, J.A. "A Machine Oriented Logic Based on the Resolution Principle", JACM 12, (January 1965), 23–41.
Roussel, P. PROLOG: Manuel de Reference et d' Utilisation, Groupe de IA, UER Luminy. Univ. d' Aix-Marseille, France, 1975.
Ruzzo, W.L. "Tree-size Bounded Alternation". JCSS 21, 2 (1980), 218–235.
Ruzzo, W.L. "On Uniform Circuit Complexity", JCSS 22, 3 (1981), 365–383.
Sagiv, Y. On Computing Restricted Projections of Representative Instances. Proceedings of the 4th PODS, ACM, 1985.
Sacca, D., Zaniolo, C. On the Implementation of a Simple Class of Logic Queries for Databases. Proceedings of the 5th PODS, ACM, 1986.
Sagiv, Y. February 1986. Notes on Uniform Equivalence-unpublished.
Sazonov. A Logical Approach to the Problem P=NP. Proceedings of the MFCS, Springer LNCS 88, 1980.
Schwartz, J.T. "Fast Probabilistic Algorithms for the Verification of Polynomial Identities". JACM 27, 4 (1980), 701–717.
Shapiro, E.Y. A Subset of Concurrent PROLOG and its Interpreter. No. 3, ICOT, Tokyo, 1983.
Tarjan R.E., Vishkin, U. Finding Biconnected Components and Computing Tree Functions in Logarithmic Parallel Time. Proceedings of the 25th FOCS, IEEE, 1984.
Ullman, J.D.. Principles of Database Systems. Computer Science Press, 1983.
Ullman, J.D. "Implementation of Logical query Languages for Databases". ACM Trans. on Database Systems 10 (1985), 289–321.
Ullman, J.D., Van Gelder, A. Parallel Complexity of Logical Query Programs. Proceedings of the 27th FOCS, 1986, to appear.
Vardi, M.Y. Complexity of Relational Query Languages. Proceedings of the 14th STOC, ACM, 1982.
Valduriez, P., Boral, H. Evaluation of Recursive Queries Using Join Indices. Proceedings of the 1rst International Conference on Expert Database Systems, Charleston, South Carolina, 1986.
Vardi, M.Y. May 1985. Personal Communication.
Vardi, M.Y. February 1986. Personal Communication.
van Emden, M.H., Kowalski, R.A. "The Semantics of Predicate Logic as a Programming Language". JACM 23, 4 (1976), 733–742.
Vishkin, U. Randomized Speed-ups in Parallel Computation. Proceedings of the 16th STOC, ACM, 1984.
Verma, R.M., Krishnaprasad, T., Ramakrishnan, I.V. An Efficient Parallel algorithm for Term Matching. Tech. Rep., SUNY Stony Brook, June 1986.
Vitter, J.S., Simons, R. "New Classes for Parallel Complexity: a Study of Unification and Other Complete Problems for P". IEEE Trans. on Computers (1986).
Valiant, L.G., Skyum, S., Berkowitz, S., Rackoff, C. "Fast Parallel Computation on Polynomials Using Few Processors". SIAM J. of Computing 12, 4 (November 1983), 641–644.
Yasuura, H. On the Parallel Computational Complexity of Unification. ER 83-01, Yajima Lab., October 1983.
Yannakakis, M. March 1986. Personal Communication.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1986 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Kanellakis, P.C. (1986). Logic programming and parallel complexity. In: Ausiello, G., Atzeni, P. (eds) ICDT '86. ICDT 1986. Lecture Notes in Computer Science, vol 243. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-17187-8_27
Download citation
DOI: https://doi.org/10.1007/3-540-17187-8_27
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-17187-4
Online ISBN: 978-3-540-47346-6
eBook Packages: Springer Book Archive