Abstract
In this paper, we consider the unordered pseudo-tree matching problem, which is a problem of, given two unordered labeled trees P and T, finding all occurrences of P in T via such many-one embeddings that preserve node labels and parent-child relationship. This problem is closely related to tree pattern matching problem for XPath queries with child axis only. If m > w , we present an efficient algorithm that solves the problem in \(O(nm\ log(w)/w)\) time using O(hm/w + mlog(w)/w) space and O(m log(w)) preprocessing on a unit-cost arithmetic RAM model with addition, where m is the number of nodes in P, n is the number of nodes in T, h is the height of T, and w is the word length. We also discuss a modification of our algorithm for the unordered tree homeomorphism problem, which corresponds to a tree pattern matching problem for XPath queries with descendant axis only.
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
Baeza-Yates, R.A., Gonnet, G.H.: A new approach to text searching. Communications of the ACM 35(10), 74–82 (1992)
Bille, P., Gørtz, I.L.: The tree inclusion problem: In optimal space and faster. In: Caires, L., Italiano, G.F., Monteiro, L., Palamidessi, C., Yung, M. (eds.) ICALP 2005. LNCS, vol. 3580, pp. 66–77. Springer, Heidelberg (2005)
Bille, P.: New algorithms for regular expression matching. In: Bugliesi, M., Preneel, B., Sassone, V., Wegener, I. (eds.) ICALP 2006. LNCS, vol. 4051, pp. 643–654. Springer, Heidelberg (2006)
Götz, M., Koch, C., Martens, W.: Efficient algorithms for descendant-only tree pattern queries. Inf. Syst. 34(7), 602–623 (2009)
Jordan, C.: Sur les assemblages de lignes. Journal für die Reine und Angewandte Mathematik 70, 185–190 (1869)
Kaneta, Y., Arimura, H.: Fast bit-parallel algorithm for unordered pseudo-tree matching and tree homeomorphism. TCS-TR-A-10-43, Hokkaido University (2010)
Kaneta, Y., Minato, S., Arimura, H.: Fast bit-parallel matching for network and regular expressions. In: Chavez, E., Lonardi, S. (eds.) SPIRE 2010. LNCS, vol. 6393, pp. 372–384. Springer, Heidelberg (2010)
Kilpeläinen, P.: Tree matching problems with applications to structured text databases. Ph.D Thesis, Report A-1992-6, DCS, University of Helsinki (1992)
Kilpeläinen, P., Mannila, H.: Ordered and unordered tree inclusion. SIAM Journal on Computing 24(2), 340–356 (1995)
Myers, E.W.: A four Russian algorithm for regular expression pattern matching. Journal of the ACM 39(2), 430–448 (1992)
Navarro, G., Raffinot, M.: Flexible Pattern Matching in Strings: Practical On-Line Search Algorithms for Texts and Biological Sequences, Cambridge (2002)
Tsuji, H., Ishino, A., Takeda, M.: A bit-parallel tree matching algorithm for patterns with horizontal VLDC’s. In: Consens, M., Navarro, G. (eds.) SPIRE 2005. LNCS, vol. 3772, pp. 388–398. Springer, Heidelberg (2005)
W3C, Extensive Markup Language (XML) 1.0 (Second Edition), W3C Recommendation (October 2000), http://www.w3.org/TR/REC-xml
Valiente, G.: Constrained tree inclusion. Journal of Discrete Algorithms 3(2-4), 431–447 (2005)
Wu, S., Manber, U.: Fast text searching: allowing errors. Communications of the ACM 35(10), 83–91 (1992)
Yamamoto, H., Takenouchi, D.: Bit-parallel tree pattern matching algorithms for unordered labeled trees. In: Dehne, F., Gavrilova, M., Sack, J.-R., Tóth, C.D. (eds.) WADS 2009. LNCS, vol. 5664, pp. 554–565. Springer, Heidelberg (2009)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Kaneta, Y., Arimura, H. (2011). Faster Bit-Parallel Algorithms for Unordered Pseudo-tree Matching and Tree Homeomorphism. In: Iliopoulos, C.S., Smyth, W.F. (eds) Combinatorial Algorithms. IWOCA 2010. Lecture Notes in Computer Science, vol 6460. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-19222-7_8
Download citation
DOI: https://doi.org/10.1007/978-3-642-19222-7_8
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-19221-0
Online ISBN: 978-3-642-19222-7
eBook Packages: Computer ScienceComputer Science (R0)