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).
Similar content being viewed by others
References
BrentR. P., ‘The parallel evaluation of general arithmetic expressions’, J. Assoc. Computing Machinery 21(2), 201–208 (1974).
ClarkK. L. and GregoryS., ‘PARLOG: Parallel programming in logic’, ACM Trans. Programming Languages Systems 8(1), 1–49 (January 1986).
ColeR., ‘Parallel merge sort’, SIAM J. Computing 17(4), 770–785 (1988).
Cole, R. and Vishkin, U., ‘Deterministic coin tossing with applications to optimal parallel list ranking’, Information Control 70 (1986).
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).
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).
DworkC., KanellakisP. C., and MitchellJ. C., ‘On the sequential nature of unification’, J. Logic Programming 1(1), 35–50 (June 1984).
DworkC., KanellakisP. C., and StockmeyerL., ‘Parallel algorithms for term matching’, SIAM J. Computing 17(4), 711–731 (August 1988).
GareyM. R. and JohnsonD. S., Computers and Intractability: A Guide to NP-Completeness, Freeman and Company, San Francisco (1979).
HirschbergD. S., ChandraA. K., and SarwateD. V., ‘Computing connected components on parallel computers’, Comm. ACM 22(8), 461–464 (1979).
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).
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).
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).
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).
Maluszynski, J. and Komorowski, H. J., ‘Unification-free execution of horn clause programs’, in: Proceedings of the 2nd Logic Symposium, 78–86 (1985).
Naish, L. and Lassez, J.-L., ‘Most specific logic programs’, Technical report, Melbourne University (1984).
NathD. and MaheshwariS. N., ‘Parallel algorithms for the connected components and minimal spanning tree problems’, Information Processing Letters 14(1), 7–11 (1982).
Plotkin, G., ‘A note on inductive generalization’, in: B. Meltzer and D. Michie (Eds.), Machine Intelligence 5, pp. 153–163, American Elsevier (1970).
Plotkin, G., ‘A further note on inductive generalization’, in: B. Meltzer and D. Michie (Eds.), Machine Intelligence 6, pp. 101–124, American Elsevier (1971).
RameshR., VermaR. M., KrishnaprasadT., and RamakrishnanI. V., ‘Term matching on parallel computers’, J. Logic Programming 6(3), 213–228 (1989).
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).
Shapiro, E. Y., ‘A subset of concurrent Prolog and its interpreter’, Technical report TR-003, ICOT (1983).
TarjanR. E. and VishkinU., ‘Finding biconnected components and computing tree functions in logarithmic parallel time’, SIAM J. Computing 14(4), 862–874 (1985).
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).
Author information
Authors and Affiliations
Additional information
Supported by NSF Grant IRI-88-09324 and NSF/DARPA Grant CCR-8908092.
Rights 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
Accepted:
Issue Date:
DOI: https://doi.org/10.1007/BF00245298