Faster Bit-Parallel Algorithms for Unordered Pseudo-tree Matching and Tree Homeomorphism
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.
Unable to display preview. Download preview PDF.
- 6.Kaneta, Y., Arimura, H.: Fast bit-parallel algorithm for unordered pseudo-tree matching and tree homeomorphism. TCS-TR-A-10-43, Hokkaido University (2010)Google Scholar
- 8.Kilpeläinen, P.: Tree matching problems with applications to structured text databases. Ph.D Thesis, Report A-1992-6, DCS, University of Helsinki (1992)Google Scholar
- 11.Navarro, G., Raffinot, M.: Flexible Pattern Matching in Strings: Practical On-Line Search Algorithms for Texts and Biological Sequences, Cambridge (2002)Google Scholar
- 13.W3C, Extensive Markup Language (XML) 1.0 (Second Edition), W3C Recommendation (October 2000), http://www.w3.org/TR/REC-xml