Skip to main content
Log in

Efficient parallel term matching and anti-unification

  • Published:
Journal of Automated Reasoning Aims and scope Submit manuscript

Abstract

In this paper we present optimal processor x time parallel algorithms for term matching and anti-unification of terms represented as trees. Term matching is the special case of unification in which one of the terms is restricted to contain no variables. It has wide applicability to logic programming, term rewriting systems and symbolic pattern matching. Anti-unification is the dual problem of unification in which one computes the most specific generalization of two terms. It has application to inductive inference and theorem proving. Our algorithms run in O(log2 N) time using N/log2 N processors on a shared-memory model of computation that prohibits simultaneous reads or writes (EREW PRAM). These algorithms are the first polylogarithmic-time EREW algorithms with a processor x time product of the same order as that of their sequential counterparts, thereby permitting optimal speed-ups using any number of processors up to N/log2 N. We also use the techniques developed in the paper to provide an N/log N-processor, O(log N)-time algorithm for a shared-memory model that allows both simultaneous reads and simultaneous writes (CRCW PRAM).

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. BrentR. P., ‘The parallel evaluation of general arithmetic expressions’, J. Assoc. Computing Machinery 21(2), 201–208 (1974).

    Google Scholar 

  2. ClarkK. L. and GregoryS., ‘PARLOG: Parallel programming in logic’, ACM Trans. Programming Languages Systems 8(1), 1–49 (January 1986).

    Article  Google Scholar 

  3. ColeR., ‘Parallel merge sort’, SIAM J. Computing 17(4), 770–785 (1988).

    Google Scholar 

  4. Cole, R. and Vishkin, U., ‘Deterministic coin tossing with applications to optimal parallel list ranking’, Information Control 70 (1986).

  5. ColeR. and VishkinU., ‘Approximate parallel scheduling. Part I: The basic technique with applications to optimal parallel list ranking in logarithmic time’, SIAM J. Computing 17(1), 128–142 (1988).

    Google Scholar 

  6. Delcher, A. L. and Kasif, S., ‘Term matching on a mesh-connected parallel computer’, in: Proceedings of the 5th Israeli Symposium on Artificial Intelligence, Vision and Pattern Recognition 441–452 (1989).

  7. DworkC., KanellakisP. C., and MitchellJ. C., ‘On the sequential nature of unification’, J. Logic Programming 1(1), 35–50 (June 1984).

    Article  Google Scholar 

  8. DworkC., KanellakisP. C., and StockmeyerL., ‘Parallel algorithms for term matching’, SIAM J. Computing 17(4), 711–731 (August 1988).

    Google Scholar 

  9. GareyM. R. and JohnsonD. S., Computers and Intractability: A Guide to NP-Completeness, Freeman and Company, San Francisco (1979).

    Google Scholar 

  10. HirschbergD. S., ChandraA. K., and SarwateD. V., ‘Computing connected components on parallel computers’, Comm. ACM 22(8), 461–464 (1979).

    Article  Google Scholar 

  11. Huet, G. and Oppen, D., ‘Equations and rewrite rules: A survey’, in: R. V. Book (Ed.), Formal Language Theory: Perspectives and Open Problems, Academic Press (1980).

  12. Karp, R. M. and Ramachandran, V., ‘A survey of parallel algorithms for shared-memory machines’, in J. Van Leewen et al.: Handbook of Theoretical Computer Science, 869–941, MIT Press (1990).

  13. Kedem, Z. M. and Palem, K. V., ‘Optimal parallel algorithms for forest and term matching’, Technical report, IBM Thomas J. Watson Research Center (June 1988).

  14. Kuper, G. M., McAloon, K. W., Palem, K. V., and Perry, K. J., ‘Efficient parallel algorithms for anti-unification and relative complement’, Technical report, IBM (1987).

  15. Maluszynski, J. and Komorowski, H. J., ‘Unification-free execution of horn clause programs’, in: Proceedings of the 2nd Logic Symposium, 78–86 (1985).

  16. Naish, L. and Lassez, J.-L., ‘Most specific logic programs’, Technical report, Melbourne University (1984).

  17. NathD. and MaheshwariS. N., ‘Parallel algorithms for the connected components and minimal spanning tree problems’, Information Processing Letters 14(1), 7–11 (1982).

    Article  Google Scholar 

  18. Plotkin, G., ‘A note on inductive generalization’, in: B. Meltzer and D. Michie (Eds.), Machine Intelligence 5, pp. 153–163, American Elsevier (1970).

  19. Plotkin, G., ‘A further note on inductive generalization’, in: B. Meltzer and D. Michie (Eds.), Machine Intelligence 6, pp. 101–124, American Elsevier (1971).

  20. RameshR., VermaR. M., KrishnaprasadT., and RamakrishnanI. V., ‘Term matching on parallel computers’, J. Logic Programming 6(3), 213–228 (1989).

    Article  Google Scholar 

  21. Reynolds, J. C., ‘Transformational systems and the algebraic structure of atomic formulas’, in: B. Meltzer and D. Michie (Eds.), Machine Intelligence 5, pp. 135–151, American Elsevier (1970).

  22. Shapiro, E. Y., ‘A subset of concurrent Prolog and its interpreter’, Technical report TR-003, ICOT (1983).

  23. TarjanR. E. and VishkinU., ‘Finding biconnected components and computing tree functions in logarithmic parallel time’, SIAM J. Computing 14(4), 862–874 (1985).

    Google Scholar 

  24. VitterJ. S. and SimonsR. A., ‘New classes for parallel complexity: A study of unification and other complete problems in P’, IEEE Trans. Computers C-35(5), 403–418 (1986).

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Additional information

Supported by NSF Grant IRI-88-09324 and NSF/DARPA Grant CCR-8908092.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Delcher, A.L., Kasif, S. Efficient parallel term matching and anti-unification. Journal of Automated Reasoning 9, 391–406 (1992). https://doi.org/10.1007/BF00245298

Download citation

  • Accepted:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF00245298

Key words

Navigation