Abstract
The problem of many-to-one unification, i.e. a simultaneous weak unification of pattern terms against all subterms of a target term, is studied for linear terms. Two algorithms proposed in [10] generalize either the many-to-one tree pattern matching algorithm [5] based on the path counting principle or the rooted many-to-one tree pattern unification algorithm [11] based on the pattern elimination principle. In both cases, the asymptotical worst-case time complexity of tree pattern unification is quadratic as in the special case of tree pattern matching. However, the expected time complexity of the “patterneliminating” algorithm is linear according to the size of the input. In this paper we improve the worst-case time bound result by designing an O(nm 0.75 logk m) algorithm for finding all occurrences of a pattern term-tree of the size m in a target term-tree of the size n, for some fixed k. The algorithm is extensible to many-to-one version of tree pattern unification problem and is also suitable for applications with dynamically changing set of patterns.
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
This research has been partially supported by the EC Cooperative Action IC 1000 (project ALTEC: Algorithms for Future Technologies) and by the Slovak GAV project 1/1447/94.
This is a preview of subscription content, log in via an institution.
Preview
Unable to display preview. Download preview PDF.
References
Aho, A.V.-Corasick, M.J.: Efficient string matching: an aid to bibliographic search. CACM 16, 1975, pp. 333–340.
Apostolico, A.-Iliopoulos, C.-Landau, C.M.-Schieber, B.-Vishkin, U.: Parallel Construction of a Suffix Tree with Applications. Algorithmica, 1988. pp. 347–365.
Cai, J.-Paige, R.-Tarjan, R.: More efficient bottom-up pattern matching. In Proc. of the CAAP, LNCS 577, Springer-Verlag, 1992, pp. 72–86.
Dubiner, M.-Galil, Z.-Magen, M.: Faster tree pattern matching. In Proc. of the 31-st FOCS, 1991, pp. 145–150.
Hoffmann, C.M.-O'Donnell, M.J.: Pattern matching in trees. JACM 29, 1982, pp. 68–95.
Kosaraju, S.R.: Efficient tree pattern matching. In Proc. of the 30-th FOCS, 1989, pp. 178–183.
O'Donnell, M.J.: Equational logic as a programming language. MIT Press. 1985.
Ramesh, R.-Ramakrishnan, I.V.: Nonlinear pattern matching in trees. JACM 39, 1992, pp. 295–316.
Ružička, P.-Prívara, I.: An almost linear Robinson unification algorithm. Acta Informatica 27, 1989, pp. 61–71.
Ružička, P.-Prívara, I.: On tree pattern unification problems. In Proc. of the 9-th FCT, LNCS 710, Springer-Verlag, 1993, pp. 418–429.
Vittek, M.: Many-to-one unification for linear terms (in Slovak). In Proc. of the 2-nd LOP, 1989, pp. 47–56.
Weiner, P.: Linear Pattern Matching Algorithm. In Proc. of the 14-th IEEE SWAT (FOCS), 1973, pp. 1–11.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1996 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Ružička, P. (1996). Efficient tree pattern unification. In: Jeffery, K.G., Král, J., Bartošek, M. (eds) SOFSEM'96: Theory and Practice of Informatics. SOFSEM 1996. Lecture Notes in Computer Science, vol 1175. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0037425
Download citation
DOI: https://doi.org/10.1007/BFb0037425
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-61994-9
Online ISBN: 978-3-540-49588-8
eBook Packages: Springer Book Archive