Skip to main content

Longest Common Extensions in Sublinear Space

  • Conference paper
  • First Online:
Book cover Combinatorial Pattern Matching (CPM 2015)

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

Included in the following conference series:

Abstract

The longest common extension problem (LCE problem) is to construct a data structure for an input string \(T\) of length \(n\) that supports \({\mathrm {LCE}}(i,j)\) queries. Such a query returns the length of the longest common prefix of the suffixes starting at positions \(i\) and \(j\) in \(T\). This classic problem has a well-known solution that uses \(\mathcal {O}(n)\) space and \(\mathcal {O}(1)\) query time. In this paper we show that for any trade-off parameter \(1 \le \tau \le n\), the problem can be solved in \(\mathcal {O}(\frac{n}{\tau })\) space and \(\mathcal {O}(\tau )\) query time. This significantly improves the previously best known time-space trade-offs, and almost matches the best known time-space product lower bound.

P. Bille— Supported by the Danish Research Council and the Danish Research Council under the Sapere Aude Program (DFF 4005-00267).

I. L. Gørtz— Research partly supported by Mikkel Thorup’s Advanced Grant from the Danish Council for Independent Research under the Sapere Aude research career programme and the FNU project AlgoDisc - Discrete Mathematics, Algorithms, and Data Structures.

H. W. Vildhøj— This research was supported by a Grant from the GIF, the German-Israeli Foundation for Scientific Research and Development, and by a BSF grant 2010437.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.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

Institutional subscriptions

References

  1. Amir, A., Lewenstein, M., Porat, E.: Faster algorithms for string matching with k mismatches. J. Algorithms 50(2), 257–275 (2004)

    Article  MATH  MathSciNet  Google Scholar 

  2. Bille, P., Gørtz, I.L., Sach, B., Vildhøj, H.W.: Time-space trade-offs for longest common extensions. J. Discret. Algorithms 25, 42–50 (2014)

    Article  MATH  Google Scholar 

  3. Bille, P., Gørtz, I.L., Knudsen, M.B.T., Lewenstein, M., Vildhøj, H.W.: Longest common extensions in sublinear space. arXiv:1504.02671(2015)

  4. Cole, R., Hariharan, R.: Approximate string matching: a simpler faster algorithm. SIAM J. Comput. 31(6), 1761–1782 (2002)

    Article  MATH  MathSciNet  Google Scholar 

  5. Fine, N.J., Wilf, H.S.: Uniqueness theorems for periodic functions. Proc. AMS 16(1), 109–114 (1965)

    Article  MATH  MathSciNet  Google Scholar 

  6. Gusfield, D., Stoye, J.: Linear time algorithms for finding and representing all the tandem repeats in a string. J. Comput. Syst. Sci. 69, 525–546 (2004)

    Article  MATH  MathSciNet  Google Scholar 

  7. Harel, D., Tarjan, R.E.: Fast algorithms for finding nearest common ancestors. SIAM J. Comput. 13(2), 338–355 (1984)

    Article  MATH  MathSciNet  Google Scholar 

  8. Kärkkäinen, T.I J., Kempa, D.: Faster sparse suffix sorting. In: Proceedings of 31st STACS, vol. 25, pp. 386–396, Dagstuhl, Germany (2014)

    Google Scholar 

  9. Karp, R.M., Rabin, M.O.: Efficient randomized pattern-matching algorithms. IBM J. Res. Dev. 31(2), 249–260 (1987)

    Article  MATH  MathSciNet  Google Scholar 

  10. Kolpakov, R., Kucherov, G.: Searching for gapped palindromes. In: Ferragina, P., Landau, G.M. (eds.) CPM 2008. LNCS, vol. 5029, pp. 18–30. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  11. Landau, G.M., Myers, E.W., Schmidt, J.P.: Incremental string comparison. SIAM J. Comput. 27(2), 557–582 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  12. Landau, G.M., Schmidt, J.P.: An algorithm for approximate tandem repeats. J. Comput. Biol. 8(1), 1–18 (2001)

    Article  Google Scholar 

  13. Landau, G.M., Vishkin, U.: Fast parallel and serial approximate string matching. J. Algorithms 10, 157–169 (1989)

    Article  MATH  MathSciNet  Google Scholar 

  14. Main, M.G., Lorentz, R.J.: An O (n log n) algorithm for finding all repetitions in a string. J. Algorithms 5(3), 422–432 (1984)

    Article  MATH  MathSciNet  Google Scholar 

  15. Manacher, G.: A new linear-time “On-Line” algorithm for finding the smallest initial palindrome of a string. J. ACM 22(3), 346–351 (1975)

    Article  MATH  Google Scholar 

  16. Myers, E.W.: An \(O(ND)\) difference algorithm and its variations. Algorithmica 1(2), 251–266 (1986)

    Article  MATH  MathSciNet  Google Scholar 

  17. Weiner, P.: Linear pattern matching algorithms. In: Proceedings of 14th FOCS (SWAT), pp. 1–11 (1973)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Hjalte Wedel Vildhøj .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Bille, P., Gørtz, I.L., Knudsen, M.B.T., Lewenstein, M., Vildhøj, H.W. (2015). Longest Common Extensions in Sublinear Space. In: Cicalese, F., Porat, E., Vaccaro, U. (eds) Combinatorial Pattern Matching. CPM 2015. Lecture Notes in Computer Science(), vol 9133. Springer, Cham. https://doi.org/10.1007/978-3-319-19929-0_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-19929-0_6

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-19928-3

  • Online ISBN: 978-3-319-19929-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics