Skip to main content

Computing the BWT and the LCP Array in Constant Space

  • Conference paper
  • First Online:
  • 611 Accesses

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

Abstract

We show how to modify the in-place Burrows-Wheeler transform (\(\mathsf {BWT}\)) algorithm proposed by Crochemore et al. [4, 5] to also compute the longest common prefix (\(\mathsf {LCP}\)) array. Our algorithm runs in quadratic time, as its predecessor, constructing both the BWT and the LCP array using just O(1) additional space. It is supported by interesting properties of the \(\mathsf {BWT}\) and of the \(\mathsf {LCP}\) array and inherits its predecessor simplicity.

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   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

Learn about institutional subscriptions

References

  1. Adjeroh, D., Bell, T., Mukherjee, A.: The Burrows-Wheeler transform: data compression, suffix arrays, and pattern matching. Springer, Boston (2008)

    Book  Google Scholar 

  2. Beller, T., Gog, S., Ohlebusch, E., Schnattinger, T.: Computing the longest common prefix array based on the Burrows-Wheeler transform. J. Discrete Algorithms 18, 22–31 (2013)

    Article  MathSciNet  MATH  Google Scholar 

  3. Burrows, M., Wheeler, D.: A block-sorting lossless data compression algorithm. Technical report, Digital SRC Research Report (1994)

    Google Scholar 

  4. Crochemore, M., Grossi, R., Kärkkäinen, J., Landau, G.M.: A constant-space comparison-based algorithm for computing the Burrows–Wheeler transform. In: Fischer, J., Sanders, P. (eds.) CPM 2013. LNCS, vol. 7922, pp. 74–82. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  5. Crochemore, M., Grossi, R., Kärkkäinen, J., Landau, G.M.: Computing the Burrows-Wheeler transform in place and in small space. J. Discrete Algorithms 32, 44–52 (2015). stringMasters 2012 and 2013 Special Issue (Volume 2)

    Article  MathSciNet  Google Scholar 

  6. Dhaliwal, J., Puglisi, S.J., Turpin., A.: Trends in suffix sorting : a survey of low memory algorithms. In: Reynolds, M., Thomas, B.H. (eds.) Proceedings of Australasian Computer Science Conference (ACSC), CRPIT, vol. 122, pp. 91–98. Australian Computer Society, Melbourne, Australia (2012)

    Google Scholar 

  7. Fischer, J.: Inducing the LCP-array. In: Dehne, F., Iacono, J., Sack, J.-R. (eds.) WADS 2011. LNCS, vol. 6844, pp. 374–385. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  8. Franceschini, G., Muthukrishnan, S.M.: In-place suffix sorting. In: Arge, L., Cachin, C., Jurdziński, T., Tarlecki, A. (eds.) ICALP 2007. LNCS, vol. 4596, pp. 533–545. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  9. Gonnet, G.H., Baeza-yates, R., Snider, T.: New Indices for Text: PAT Trees and PAT Arrays. Prentice-Hall Inc., Upper Saddle River (1992)

    Google Scholar 

  10. Gusfield, D.: Algorithms on Strings, Trees, and Sequences: Computer Science and Computational Biology. Cambridge University Press, New York (1997)

    Book  MATH  Google Scholar 

  11. Kärkkäinen, J., Manzini, G., Puglisi, S.J.: Permuted longest-common-prefix array. In: Kucherov, G., Ukkonen, E. (eds.) CPM 2009 Lille. LNCS, vol. 5577, pp. 181–192. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  12. Kärkkäinen, J., Sanders, P., Burkhardt, S.: Linear work suffix array construction. ACM J. 53(6), 918–936 (2006)

    Article  Google Scholar 

  13. Kasai, T., Lee, G.H., 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, p. 181. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  14. Kim, D.K., Sim, J.S., Park, H., Park, K.: Constructing suffix arrays in linear time. J. Discret. Algorithms 3(2–4), 126–142 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  15. Ko, P., Aluru, S.: Space efficient linear time construction of suffix arrays. J. Discret. Algorithms 3(2–4), 143–156 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  16. 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  MATH  Google Scholar 

  17. Manzini, G.: Two space saving tricks for linear time LCP array computation. In: Hagerup, T., Katajainen, J. (eds.) SWAT 2004. LNCS, vol. 3111, pp. 372–383. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  18. Nong, G.: Practical linear-time O(1)-workspace suffix sorting for constant alphabets. ACM Trans. Inform. Syst. 31(3), 1–15 (2013)

    Article  Google Scholar 

  19. Nong, G., Zhang, S., Chan, W.H.: Two efficient algorithms for linear time suffix array construction. IEEE Trans. Comput. 60(10), 1471–1484 (2011)

    Article  MathSciNet  Google Scholar 

  20. Ohlebusch, E.: Bioinformatics Algorithms: Sequence Analysis, Genome Rearrangements, and Phylogenetic Reconstruction. Oldenbusch Verlag, Bremen (2013)

    Google Scholar 

  21. Ohlebusch, E., Gog, S., Kügel, A.: Computing matching statistics and maximal exact matches on compressed full-text indexes. In: Chavez, E., Lonardi, S. (eds.) SPIRE 2010. LNCS, vol. 6393, pp. 347–358. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  22. Okanohara, D., Sadakane, K.: A linear-time Burrows-Wheeler transform using induced sorting. In: Karlgren, J., Tarhio, J., Hyyrö, H. (eds.) SPIRE 2009. LNCS, vol. 5721, pp. 90–101. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  23. Puglisi, S.J., Smyth, W.F., Turpin, A.H.: A taxonomy of suffix array construction algorithms. ACM Comp. Surv. 39(2), 1–31 (2007)

    Article  Google Scholar 

Download references

Acknowledgments

FAL acknowledges the financial support of CAPES. GPT acknowledges the support of CNPq.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Felipe A. Louza .

Editor information

Editors and Affiliations

A Source Code

A Source Code

figure a

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this paper

Cite this paper

Louza, F.A., Telles, G.P. (2016). Computing the BWT and the LCP Array in Constant Space. In: Lipták, Z., Smyth, W. (eds) Combinatorial Algorithms. IWOCA 2015. Lecture Notes in Computer Science(), vol 9538. Springer, Cham. https://doi.org/10.1007/978-3-319-29516-9_26

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-29516-9_26

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-29515-2

  • Online ISBN: 978-3-319-29516-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics