Abstract
In this paper, we present a simple algorithm for pattern matching within a family of trees called linear terms, that have many applications in the design of programming languages, theorem proving and symbolic computation for example. Our algorithm relies on the representation of a tree by words. It has a quadratic worst-case time complexity, which is worse than the best known algorithm, but experimental results on uniformly distributed random binary terms suggest a linear expected time and interesting practical behavior.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
A. V. Aho and M. Ganapathi. Efficient tree pattern matching: an aid to code generation. In ACM Symposium on Principles of Programming Languages, POPL’85, pages 334–340. Assoc. Comput. Mach. Press, 1985.
M.S. Boyer and J. S. Moore. A fast string-searching algorithm. Comm. ACM, 20:762–772, 1977.
J. Cai, R. Paige, and R. E. Tarjan. More efficient bottom-up multi-pattern matching in trees. Theoret. Comput. Sci., 106(1):21–60, 1992.
C. Chauve. Tree pattern matching with a more general notion of occurrence of the pattern. Inform. Process. Letters, 82(4):197–201, 2002.
R. Cole and R. Hariharan. Tree pattern matching and subset matching in randomized O(n log3 m) time. In ACM Symposium on Theory of Computing, STOC’97, pages 66–75. Assoc. Comput. Mach. Press, 1997.
R. Cole, R. Hariharan, and P. Indyk. Tree pattern matching and subset matching in deterministic O(n log3 n)-time. In ACM-SIAM Symposium on Discrete Algorithms, SODA’99, pages 245–254. Assoc. Comput. Mach. Press, 1999.
M. Crochemore and W. Rytter. Text algorithms. Oxford University Press, New York, 1994.
M. Dubiner, Z. Galil, and E. Magen. Faster tree pattern matching. J. Assoc. Comput. Mach., 41(2):205–213, 1994.
C. M. Hoffmann and M.J. O’Donnell. Pattern matching in trees. J. Assoc. Comput. Mach., 29(1):68–95, 1982.
D. E. Knuth, J. H. Jr. Morris, and V. R. Pratt. Fast pattern matching in strings. SI AM J. Comput., 6(2):323–350, 1977.
S.R. Kosaraju. Efficient tree pattern matching. In IEEE Symposium on Foundations of Computer Science, FOCS’89, pages 178–183. IEEE Comput. Soc. Press, 1989.
F. Luccio and L. Pagli. An efficient algorithm for some tree matching problems. Inform. Process. Lett., 39(1):51–57, 1991.
F. Luccio and L. Pagli. Simple solutions for approximate tree matching problems. In Theory and Practice of Software, TAPSOFT’ 91, volume 493 of Lecture Notes in Comput. Sci., pages 193–201. Springer, 1991.
F. Luccio and L. Pagli. Approximate matching for two families of trees. Inform. and Comput., 123(1):111–120, 1995.
B. A. Shapiro and K. Zhang. Comparing multiple RNA secondary structures using tree comparisons. Comput. Appl. Biosci., 6:309–318, 1990.
T. Shibuya. Constructing the suffix tree of a tree with a large alphabet. In International Symposium on Algorithms and Computation, ISAAC’99, volume 1741 of Lecture Notes in Comput. Sci., pages 225–236. Springer, 1999.
J. M. Steyaert and P. Flajolet. Patterns and pattern-matching in trees: an analysis. Inform. and Control, 58(1-3): 19–58, 1983.
M. Thorup. Efficient preprocessing of simple binary pattern forests. J. Algorithms, 20(3):602–612, 1996.
K. Zhang and D. Shasha. Simple fast algorithms for the editing distance between trees and related problems. SIAM J. Comput., 18(6):1245–1262, 1989.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2002 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Chauve, C. (2002). Tree Pattern Matching for Linear Static Terms. In: Laender, A.H.F., Oliveira, A.L. (eds) String Processing and Information Retrieval. SPIRE 2002. Lecture Notes in Computer Science, vol 2476. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45735-6_15
Download citation
DOI: https://doi.org/10.1007/3-540-45735-6_15
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-44158-8
Online ISBN: 978-3-540-45735-0
eBook Packages: Springer Book Archive