Skip to main content

O(n 2 log n) Time On-Line Construction of Two-Dimensional Suffix Trees

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 3595))

Abstract

The two-dimensional suffix tree of an n × n square matrix A is a compacted trie that represents all square submatrices of A [9]. For the off-line case, i.e., A is given in advance to the algorithm, it is known how to build it in optimal time, for any type of alphabet size [9,15]. Motivated by applications in Image Compression [18], Giancarlo and Guaiana [12] considered the on-line version of the two-dimensional suffix tree and presented an O(n 2log2 n)-time algorithm, which we refer to as GG. That algorithm is a non-trivial generalization of Ukkonen’s on-line algorithm for standard suffix trees [19]. The main contribution in this paper is an O(log n) factor improvement in the time complexity of the GG algorithm, making it optimal for unbounded alphabets [7]. Moreover, the ideas presented here also lead to a major simplification of the GG algorithm. Technically, we are able to preserve most of the structure of the original GG algorithm, by reducing a computational bottleneck to a primitive operation, i.e., comparison of Lcharacters, which is here implemented in constant time rather than O(log n) time as in GG. However, preserving that structure comes at a price. Indeed, in order to make everything work, we need a careful reorganization of another fundamental algorithm: Weiner’s algorithm for the construction of standard suffix trees [20]. Specifically, here we provide a version of that algorithm which takes linear time and works on-line and concurrently over a set of strings.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Amir, A., Farach-Colton, M.: Two-dimensional matching algorithms. In: Apostolico, A., Galil, Z. (eds.) Pattern Matching Algorithms, pp. 267–292. Oxford University Press, Oxford (1997)

    Google Scholar 

  2. Apostolico, A.: The myriad virtues of subword trees. In: Apostolico, A., Galil, Z. (eds.) Combinatorial Algorithms on Words, pp. 85–95. Springer, Heidelberg (1985)

    Chapter  Google Scholar 

  3. Chen, M.T., Seiferas, J.: Efficient and elegant subword tree construction. In: Apostolico, A., Galil, Z. (eds.) Combinatorial Algorithms on Words. F, vol. 12, pp. 97–107. NATO Advanced Science Institutes, Springer, Heidelberg (1985)

    Chapter  Google Scholar 

  4. Cole, R., Hariharan, R.: Dynamic LCA queries on trees. In: Proceedings of the 10th ACM-SIAM Symposium on Discrete Algorithms, pp. 235–244 (1999)

    Google Scholar 

  5. Cole, R., Hariharan, R.: Faster suffix tree construction with missing suffix links. In: Proceedings of the 30th Annual ACM Symposium on Theory of Computing, pp. 407–415 (2000)

    Google Scholar 

  6. Crochemore, M., Rytter, W.: Jewels of Stringology. World Scientific Publishing, Singapore (2002)

    Book  Google Scholar 

  7. Farach-Colton, M., Ferragina, P., Muthukrishnan, S.: On the sorting-complexity of suffix tree construction. Journal of the ACM 47(6), 987–1011 (2000)

    Article  MathSciNet  MATH  Google Scholar 

  8. Giancarlo, R.: An index data structure for matrices, with applications to fast twodimensional pattern matching. In: Proceedings of Workshop on Algorithm and Data Structures, pp. 337–348. Springer, Heidelberg (1993)

    Chapter  Google Scholar 

  9. Giancarlo, R.: A generalization of the suffix tree to square matrices, with application. SIAM Journal on Computing 24(3), 520–562 (1995)

    Article  MathSciNet  MATH  Google Scholar 

  10. Giancarlo, R., Grossi, R.: On the construction of classes of suffix trees for square matrices: Algorithms and applications. Information and Computation 130(2), 151–182 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  11. Giancarlo, R., Grossi, R.: Suffix tree data structures for matrices. In: Apostolico, A., Galil, Z. (eds.) Pattern Matching Algorithms, ch. 11, pp. 293–340. Oxford University Press, Oxford (1997)

    Google Scholar 

  12. Giancarlo, R., Guaiana, D.: On-line construction of two-dimensional suffix trees. Journal of Complexity 15(1), 72–127 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  13. Gusfield, D.: Algorithms on Strings, Tree, and Sequences. Cambridge University Press, Cambridge (1997)

    Book  Google Scholar 

  14. Kim, D.K., Kim, Y.A., Park, K.: Generalizations of suffix arrays to multidimensional matrices. Theoretical Computer Science 302(1-3), 401–416 (2003)

    Article  MathSciNet  MATH  Google Scholar 

  15. Kim, D.K., Park, K.: Linear-time construction of two-dimensional suffix trees. In: Proceedings of the 26th International Colloquium on Automata, Languages, and Programming, pp. 463–372 (1999)

    Google Scholar 

  16. Manber, U., Myers, G.: Suffix arrays: A new method for on-line string searches. SIAM Journal on Computing 22(5), 935–948 (1993)

    Article  MathSciNet  MATH  Google Scholar 

  17. McCreight, E.M.: A space-economical suffix tree construction algorithms. Journal of the ACM 23(2), 262–272 (1976)

    Article  MathSciNet  MATH  Google Scholar 

  18. Storer, J.A.: Lossless image compression using generalized LZ1-type methods. In: Proceedings of Data Compression Conference, pp. 290–299 (1996)

    Google Scholar 

  19. Ukkonen, E.: On-line construction of suffix trees. Algorithmica 14(3), 249–260 (1995)

    Article  MathSciNet  MATH  Google Scholar 

  20. Weiner, P.: Linear pattern matching algorithms. In: Proceedings of the 14th IEEE Symposium on Switching and Automata Theory, pp. 1–11 (1973)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2005 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Na, J.C., Giancarlo, R., Park, K. (2005). O(n 2 log n) Time On-Line Construction of Two-Dimensional Suffix Trees. In: Wang, L. (eds) Computing and Combinatorics. COCOON 2005. Lecture Notes in Computer Science, vol 3595. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11533719_29

Download citation

  • DOI: https://doi.org/10.1007/11533719_29

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-28061-3

  • Online ISBN: 978-3-540-31806-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics