Skip to main content

Extracting the Sparse Longest Common Prefix Array from the Suffix Binary Search Tree

  • Conference paper
  • First Online:
Book cover String Processing and Information Retrieval (SPIRE 2021)

Abstract

Given a text T of length n, the sparse suffix sorting problem asks for the lexicographic order of suffixes starting at m selectable text positions P. The suffix binary search tree [Irving and Love, JDA’03] is a dynamic data structure that can answer this problem dynamically in the sense that insertions and deletions of positions in P are allowed. While a standard binary search tree on strings needs to store two longest-common prefix (LCP) values per node for providing the same query bounds, each suffix binary search tree node only stores a single LCP value and a bit flag. Its tree topology induces the sorting of the m suffixes by an Euler tour in \({{\mathcal {O}}}(m)\) time. However, it has not been addressed how to compute the lengths of the longest common prefixes of two suffixes with neighboring ranks with this data structure. We show that we can compute these lengths again by an Euler tour in \({{\mathcal {O}}}(m)\) time.

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

Notes

  1. 1.

    A precursor of this research is the technical report [10, Section 5] and a PhD thesis [18].

References

  1. Adelson-Velsky, G.M., Landis, E.M.: An algorithm for organization of information. Dokl. Akad. Nauk SSSR 146, 263–266 (1962)

    MathSciNet  Google Scholar 

  2. Bille, P., Fischer, J., Gørtz, I.L., Kopelowitz, T., Sach, B., Vildhøj, H.W.: Sparse text indexing in small space. ACM Trans. Algorithms 12(3), 39:1–39:19 (2016)

    Google Scholar 

  3. Birenzwige, O., Golan, S., Porat, E.: Locally consistent parsing for text indexing in small space. In: Proceedings of SODA, pp. 607–626 (2020)

    Google Scholar 

  4. Burrows, M., Wheeler, D.J.: A block sorting lossless data compression algorithm. Technical report 124, Digital Equipment Corporation, Palo Alto, California (1994)

    Google Scholar 

  5. Chien, Y., Hon, W., Shah, R., Thankachan, S.V., Vitter, J.S.: Geometric BWT: compressed text indexing via sparse suffixes and range searching. Algorithmica 71(2), 258–278 (2015)

    Article  MathSciNet  Google Scholar 

  6. Ferragina, P., Fischer, J.: Suffix arrays on words. In: Ma, B., Zhang, K. (eds.) CPM 2007. LNCS, vol. 4580, pp. 328–339. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-73437-6_33

    Chapter  Google Scholar 

  7. Fischer, J., I, T., Köppl, D.: Deterministic sparse suffix sorting in the restore model. ACM Trans. Algorithms 16(4), 50:1–50:53 (2020)

    Google Scholar 

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

    Google Scholar 

  9. I, T., Köppl, D.: Load-balancing succinct B trees. arXiv CoRR abs/2104.08751 (2021)

    Google Scholar 

  10. Irving, R.W., Love, L.: Suffix binary search trees and suffix arrays. University of Glasgow, Technical report (2001)

    Google Scholar 

  11. Irving, R.W., Love, L.: The suffix binary search tree and suffix AVL tree. J. Discret. Algorithms 1(5–6), 387–408 (2003)

    Article  MathSciNet  Google Scholar 

  12. Kärkkäinen, J., Kempa, D.: LCP array construction using O(sort(n)) (or Less) I/Os. In: Inenaga, S., Sadakane, K., Sakai, T. (eds.) SPIRE 2016. LNCS, vol. 9954, pp. 204–217. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-46049-9_20

    Chapter  Google Scholar 

  13. Kärkkäinen, J., Ukkonen, E.: Sparse suffix trees. In: Cai, J.-Y., Wong, C.K. (eds.) COCOON 1996. LNCS, vol. 1090, pp. 219–230. Springer, Heidelberg (1996). https://doi.org/10.1007/3-540-61332-3_155

    Chapter  Google Scholar 

  14. Khan, Z., Bloom, J.S., Kruglyak, L., Singh, M.: A practical algorithm for finding maximal exact matches in large sequence datasets using sparse suffix arrays. Bioinform. 25(13), 1609–1616 (2009)

    Article  Google Scholar 

  15. Kolpakov, R., Kucherov, G., Starikovskaya, T.A.: Pattern matching on sparse suffix trees. In: Proceedings of CCP, pp. 92–97 (2011)

    Google Scholar 

  16. Köppl, D.: Exploring regular structures in strings. Ph.D. thesis, TU Dortmund (2018)

    Google Scholar 

  17. Kosolobov, D., Sivukhin, N.: Construction of sparse suffix trees and LCE indexes in optimal time and space. arXiv CoRR abs/2105.03782 (2021)

    Google Scholar 

  18. Love, L.: The suffix binary search tree. Ph.D. thesis, University of Glasgow, UK (2001)

    Google Scholar 

  19. Manber, U., Myers, E.W.: Suffix arrays: a new method for on-line string searches. SIAM J. Comput. 22(5), 935–948 (1993)

    Article  MathSciNet  Google Scholar 

  20. Prezza, N.: In-place sparse suffix sorting. In: Proceedings of SODA, pp. 1496–1508 (2018)

    Google Scholar 

  21. Uemura, T., Arimura, H.: Sparse and truncated suffix trees on variable-length codes. In: Giancarlo, R., Manzini, G. (eds.) CPM 2011. LNCS, vol. 6661, pp. 246–260. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-21458-5_22

    Chapter  Google Scholar 

  22. Vyverman, M., Baets, B.D., Fack, V., Dawyndt, P.: essaMEM: finding maximal exact matches using enhanced sparse suffix arrays. Bioinform. 29(6), 802–804 (2013)

    Article  Google Scholar 

Download references

Acknowledgments

This work was supported by JSPS KAKENHI Grant Numbers JP21K17701 (DK) and JP19K20213 (TI). We thank the four anonymous reviewers of SPIRE’21 for their valuable comments on our manuscript. They give additional inspiration for Corollary 1 and proposed the problem of how to efficiently merge two suffix binary search tree instances. Tackling this problem could indeed be useful for building and updating FM-indexes and other related indexing data structures.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Dominik Köppl .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

I, T., Irving, R.W., Köppl, D., Love, L. (2021). Extracting the Sparse Longest Common Prefix Array from the Suffix Binary Search Tree. In: Lecroq, T., Touzet, H. (eds) String Processing and Information Retrieval. SPIRE 2021. Lecture Notes in Computer Science(), vol 12944. Springer, Cham. https://doi.org/10.1007/978-3-030-86692-1_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-86692-1_12

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-86691-4

  • Online ISBN: 978-3-030-86692-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics