Range LCP | SpringerLink
Skip to main content

Range LCP

  • Conference paper
Algorithms and Computation (ISAAC 2011)

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

Included in the following conference series:

  • 1911 Accesses

Abstract

In this paper, we define the Range LCP problem as follows. Preprocess a string S, of length n, to enable efficient solutions of the following query:

Given \([i,j],\ \ 0< i \leq j \leq n\), compute max ℓ, k ∈ {i,…,j} LCP(S , S k ), where LCP(S , S k ) is the length of the longest common prefix of the suffixes of S starting at locations ℓ and k. This is a natural generalization of the classical LCP problem.

Surprisingly, while it is known how to preprocess a string in linear time to enable LCP computation of two suffixes in constant time, this seems quite difficult in the Range LCP problem. It is trivial to answer such queries in time O(|j − i|2) after a linear-time preprocessing and easy to show an O(1) query algorithm after an O(|S|2) time preprocessing. We provide algorithms that solve the problem with the following complexities:

  1. 1

    Preprocessing Time: O(|S|), Space: O(|S|), Query Time: O(|j − i|loglogn).

  2. 2

    Preprocessing Time: no preprocessing, Space: O(|j − i|log|j − i|), Query Time: O(|j − i|log|j − i|). However, the query just gives the pairs with the longest LCP, not the LCP itself.

  3. 3

    Preprocessing Time: O(|S|log2 |S|), Space: O(|S|log1 + ε |S|) for arbitrary small constant ε, Query Time: O(loglog|S|).

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

Access this chapter

Subscribe and save

Springer+ Basic
¥17,985 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
JPY 3498
Price includes VAT (Japan)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
JPY 5719
Price includes VAT (Japan)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
JPY 7149
Price includes VAT (Japan)
  • 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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. Apostolico, A., Preparata, F.P.: Optimal off-line detection of repetitions in a string. Theoretical Computer Science 22, 297–315 (1983)

    Article  MathSciNet  MATH  Google Scholar 

  2. Berkman, O., Breslauer, D., Galil, Z., Schieber, B., Vishkin, U.: Highly parallelizable problems. In: Proc. 21st ACM Symposium on Theory of Computation, pp. 309–319 (1989)

    Google Scholar 

  3. Chan, T.M., Larsen, K.G., Pǎtraşcu, M.: Orthogonal range searching on the ram, revisited. In: Proc. 27th ACM Symposium on Computational Geometry (SoCG), pp. 1–10 (2011)

    Google Scholar 

  4. Cormode, G., Muthukrishnan, S.: Substring compression problems. In: Proc. 16th annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 321–330 (2005)

    Google Scholar 

  5. Farach, M.: Optimal suffix tree construction with large alphabets. In: Proc. 38th IEEE Symposium on Foundations of Computer Science, pp. 137–143 (1997)

    Google Scholar 

  6. Harel, D., Tarjan, R.E.: Fast algorithms for finding nearest common ancestor. Journal of Computer and System Science 13, 338–355 (1984)

    MathSciNet  MATH  Google Scholar 

  7. Iacono, J., Özkan, Ö.: Mergeable Dictionaries. In: Abramsky, S., Gavoille, C., Kirchner, C., Meyer auf der Heide, F., Spirakis, P.G. (eds.) ICALP 2010. LNCS, Part I, vol. 6198, pp. 164–175. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  8. Kärkkäinen, J., Sanders, P.: Simple Linear Work Suffix Array Construction. In: Baeten, J.C.M., Lenstra, J.K., Parrow, J., Woeginger, G.J. (eds.) ICALP 2003. LNCS, vol. 2719, pp. 943–955. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  9. Kasai, T., Lee, G., Arimura, H., Arikawa, S., Park, K.: Linear-Time Longest-Common-Prefix Computation in Suffix Arrays and Its Applications. In: Amir, A., Landau, G.M. (eds.) CPM 2001. LNCS, vol. 2089, pp. 181–192. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  10. Keller, O., Kopelowitz, T., Landau, S., Lewenstein, M.: Generalized Substring Compression. In: Kucherov, G., Ukkonen, E. (eds.) CPM 2009 Lille. LNCS, vol. 5577, pp. 26–38. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  11. Landau, G.M., Vishkin, U.: Fast parallel and serial approximate string matching. Journal of Algorithms 10(2), 157–169 (1989)

    Article  MathSciNet  MATH  Google Scholar 

  12. Lempel, A., Ziv, J.: On the complexity of finite sequences. IEEE Transactions on Information Theory 22, 75–81 (1976)

    Article  MathSciNet  MATH  Google Scholar 

  13. McCreight, E.M.: A space-economical suffix tree construction algorithm. J. of the ACM 23, 262–272 (1976)

    Article  MathSciNet  MATH  Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

  15. van Emde Boas, P., Kaas, R., Zijlstra, E.: Design and implementation of an efficient priority queue. Mathematical Systems Theory 10, 99–127 (1977)

    Article  MathSciNet  MATH  Google Scholar 

  16. Weiner, P.: Linear pattern matching algorithm. In: Proc. 14 IEEE Symposium on Switching and Automata Theory, pp. 1–11 (1973)

    Google Scholar 

  17. Yuan, H., Atallah, M.J.: Data structures for range minimum queries in multidimensional arrays. In: Proc. 21st ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 150–160 (2010)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Amir, A., Apostolico, A., Landau, G.M., Levy, A., Lewenstein, M., Porat, E. (2011). Range LCP. In: Asano, T., Nakano, Si., Okamoto, Y., Watanabe, O. (eds) Algorithms and Computation. ISAAC 2011. Lecture Notes in Computer Science, vol 7074. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-25591-5_70

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-25591-5_70

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-25590-8

  • Online ISBN: 978-3-642-25591-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics