Computing All Subtree Repeats in Ordered Ranked Trees

  • Michalis Christou
  • Maxime Crochemore
  • Tomáš Flouri
  • Costas S. Iliopoulos
  • Jan Janoušek
  • Bořivoj Melichar
  • Solon P. Pissis
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7024)

Abstract

We consider the problem of finding all subtree repeats in a given ordered ranked tree. Specifically, we transform the given tree to a string representing its postfix notation, and then propose an algorithm based on the bottom-up technique. The proposed algorithm is divided into two phases: the preprocessing phase, and the phase where all subtree repeats are computed. The linear runtime of the algorithm, as well as the use of linear auxiliary space, are important aspects of its quality.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Aho, A.V., Lam, M.S., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, and Tools, 2nd edn. Addison-Wesley, Reading (2006)MATHGoogle Scholar
  2. 2.
    Crochemore, M.: An optimal algorithm for computing the repetitions in a word. Inf. Process. Lett. 12(5), 244–250 (1981)MathSciNetCrossRefMATHGoogle Scholar
  3. 3.
    Downey, P.J., Sethi, R., Tarjan, R.E.: Variations on the common subexpression problem. J. ACM 27, 758–771 (1980)MathSciNetCrossRefMATHGoogle Scholar
  4. 4.
    Dubiner, M., Galil, Z., Magen, E.: Faster tree pattern matching. J. ACM 41, 205–213 (1994)MathSciNetCrossRefMATHGoogle Scholar
  5. 5.
    Flajolet, P., Sipala, P., Steyaert, J.M.: Analytic variations on the common subexpression problem. In: Proceedings of the Seventeenth International Colloquium on Automata, Languages and Programming, pp. 220–234. Springer-Verlag New York, Inc., New York (1990)CrossRefGoogle Scholar
  6. 6.
    Flouri, T., Janoušek, J., Melichar, B.: Subtree matching by pushdown automata. Computer Science and Information Systems/ComSIS 7(2), 331–357 (2010)CrossRefGoogle Scholar
  7. 7.
    Grossi, R.: On finding common subtrees. Theor. Comput. Sci. 108(2), 345–356 (1993)MathSciNetCrossRefMATHGoogle Scholar
  8. 8.
    Hoffmann, C.M., O’Donnell, M.J.: Pattern matching in trees. J. ACM 29, 68–95 (1982)MathSciNetCrossRefMATHGoogle Scholar
  9. 9.
    Janousek, J.: String suffix automata and subtree pushdown automata. In: Holub, J., Zdárek, J. (eds.) Stringology. pp. 160–172. Prague Stringology Club, Department of Computer Science and Engineering, Faculty of Electrical Engineering, Czech Technical University in Prague (2009)Google Scholar
  10. 10.
    Karp, R.M., Miller, R.E., Rosenberg, A.L.: Rapid identification of repeated patterns in strings, trees and arrays. In: Proceedings of the Fourth Annual ACM Symposium on Theory of Computing, STOC 1972, pp. 125–136. ACM, New York (1972)CrossRefGoogle Scholar
  11. 11.
    Kosaraju, S.R.: Efficient tree pattern matching. In: Proceedings of the 30th Annual Symposium on Foundations of Computer Science, pp. 178–183. IEEE Computer Society, Washington, DC (1989)CrossRefGoogle Scholar
  12. 12.
    Kuboyama, T.: Matching and Learning in Trees. Ph.D. thesis, University of Tokyo (2007)Google Scholar
  13. 13.
    Mauri, G., Pavesi, G.: Algorithms for pattern matching and discovery in rna secondary structure. Theor. Comput. Sci. 335, 29–51 (2005)MathSciNetCrossRefMATHGoogle Scholar
  14. 14.
    Melichar, B.: Arbology: Trees and pushdown automata. In: Dediu, A.-H., Fernau, H., Martín-Vide, C. (eds.) LATA 2010. LNCS, vol. 6031, pp. 32–49. Springer, Heidelberg (2010)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Michalis Christou
    • 1
  • Maxime Crochemore
    • 1
    • 2
  • Tomáš Flouri
    • 3
  • Costas S. Iliopoulos
    • 1
    • 4
  • Jan Janoušek
    • 3
  • Bořivoj Melichar
    • 3
  • Solon P. Pissis
    • 1
  1. 1.Dept. of InformaticsKing’s College LondonUK
  2. 2.Université Paris-EstFrance
  3. 3.Dept. of Theoretical Computer Science, Faculty of Information TechnologyCzech Technical UniversityPragueCzech Republic
  4. 4.Digital Ecosystems & Business Intelligence InstituteCurtin UniversityPerthAustralia

Personalised recommendations