Advertisement

Faster Bit-Parallel Algorithms for Unordered Pseudo-tree Matching and Tree Homeomorphism

  • Yusaku Kaneta
  • Hiroki Arimura
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6460)

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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Baeza-Yates, R.A., Gonnet, G.H.: A new approach to text searching. Communications of the ACM 35(10), 74–82 (1992)CrossRefGoogle Scholar
  2. 2.
    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)CrossRefGoogle Scholar
  3. 3.
    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)CrossRefGoogle Scholar
  4. 4.
    Götz, M., Koch, C., Martens, W.: Efficient algorithms for descendant-only tree pattern queries. Inf. Syst. 34(7), 602–623 (2009)CrossRefGoogle Scholar
  5. 5.
    Jordan, C.: Sur les assemblages de lignes. Journal für die Reine und Angewandte Mathematik 70, 185–190 (1869)CrossRefGoogle Scholar
  6. 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
  7. 7.
    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)CrossRefGoogle Scholar
  8. 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
  9. 9.
    Kilpeläinen, P., Mannila, H.: Ordered and unordered tree inclusion. SIAM Journal on Computing 24(2), 340–356 (1995)CrossRefzbMATHGoogle Scholar
  10. 10.
    Myers, E.W.: A four Russian algorithm for regular expression pattern matching. Journal of the ACM 39(2), 430–448 (1992)CrossRefzbMATHGoogle Scholar
  11. 11.
    Navarro, G., Raffinot, M.: Flexible Pattern Matching in Strings: Practical On-Line Search Algorithms for Texts and Biological Sequences, Cambridge (2002)Google Scholar
  12. 12.
    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)CrossRefGoogle Scholar
  13. 13.
    W3C, Extensive Markup Language (XML) 1.0 (Second Edition), W3C Recommendation (October 2000), http://www.w3.org/TR/REC-xml
  14. 14.
    Valiente, G.: Constrained tree inclusion. Journal of Discrete Algorithms 3(2-4), 431–447 (2005)CrossRefzbMATHGoogle Scholar
  15. 15.
    Wu, S., Manber, U.: Fast text searching: allowing errors. Communications of the ACM 35(10), 83–91 (1992)CrossRefGoogle Scholar
  16. 16.
    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)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Yusaku Kaneta
    • 1
  • Hiroki Arimura
    • 1
  1. 1.Hokkaido UniversitySapporoJapan

Personalised recommendations