Skip to main content

Efficient tree pattern unification

  • Contributed Papers
  • Conference paper
  • First Online:
SOFSEM'96: Theory and Practice of Informatics (SOFSEM 1996)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1175))

  • 120 Accesses

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.

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 to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Aho, A.V.-Corasick, M.J.: Efficient string matching: an aid to bibliographic search. CACM 16, 1975, pp. 333–340.

    Google Scholar 

  2. Apostolico, A.-Iliopoulos, C.-Landau, C.M.-Schieber, B.-Vishkin, U.: Parallel Construction of a Suffix Tree with Applications. Algorithmica, 1988. pp. 347–365.

    Google Scholar 

  3. 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.

    Google Scholar 

  4. Dubiner, M.-Galil, Z.-Magen, M.: Faster tree pattern matching. In Proc. of the 31-st FOCS, 1991, pp. 145–150.

    Google Scholar 

  5. Hoffmann, C.M.-O'Donnell, M.J.: Pattern matching in trees. JACM 29, 1982, pp. 68–95.

    Google Scholar 

  6. Kosaraju, S.R.: Efficient tree pattern matching. In Proc. of the 30-th FOCS, 1989, pp. 178–183.

    Google Scholar 

  7. O'Donnell, M.J.: Equational logic as a programming language. MIT Press. 1985.

    Google Scholar 

  8. Ramesh, R.-Ramakrishnan, I.V.: Nonlinear pattern matching in trees. JACM 39, 1992, pp. 295–316.

    Google Scholar 

  9. Ružička, P.-Prívara, I.: An almost linear Robinson unification algorithm. Acta Informatica 27, 1989, pp. 61–71.

    Google Scholar 

  10. 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.

    Google Scholar 

  11. Vittek, M.: Many-to-one unification for linear terms (in Slovak). In Proc. of the 2-nd LOP, 1989, pp. 47–56.

    Google Scholar 

  12. Weiner, P.: Linear Pattern Matching Algorithm. In Proc. of the 14-th IEEE SWAT (FOCS), 1973, pp. 1–11.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Keith G. Jeffery Jaroslav Král Miroslav Bartošek

Rights and permissions

Reprints 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

Publish with us

Policies and ethics