Skip to main content

Direct Linear Time Construction of Parameterized Suffix and LCP Arrays for Constant Alphabets

  • Conference paper
  • First Online:
String Processing and Information Retrieval (SPIRE 2019)

Abstract

We present the first worst-case linear time algorithm that directly computes the parameterized suffix and LCP arrays for constant sized alphabets. Previous algorithms either required quadratic time or the parameterized suffix tree to be built first. More formally, for a string over static alphabet \(\varSigma \) and parameterized alphabet \(\varPi \), our algorithm runs in \(O(n\pi )\) time and O(n) words of space, where \(\pi \) is the number of distinct symbols of \(\varPi \) in the string.

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. Baker, B.S.: A program for identifying duplicated code. Comput. Sci. Stat. 24, 49–57 (1992)

    Google Scholar 

  2. Baker, B.S.: Parameterized pattern matching: algorithms and applications. J. Comput. Syst. Sci. 52(1), 28–42 (1996). https://doi.org/10.1006/jcss.1996.0003. https://doi.org/10.1006/jcss.1996.0003

    Article  MathSciNet  MATH  Google Scholar 

  3. Baker, B.S.: Parameterized duplication in strings: algorithms and an application to software maintenance. SIAM J. Comput. 26(5), 1343–1362 (1997). https://doi.org/10.1137/S0097539793246707

    Article  MathSciNet  MATH  Google Scholar 

  4. Beal, R., Adjeroh, D.: Variations of the parameterized longest previous factor. J. Discrete Algorithms 16, 129–150 (2012). https://doi.org/10.1016/j.jda.2012.05.004. http://www.sciencedirect.com/science/article/pii/S1570866712001013, selected papers from the 22nd International Workshop on Combinatorial Algorithms (IWOCA 2011)

    Article  MathSciNet  MATH  Google Scholar 

  5. Beal, R., Adjeroh, D.A.: p-suffix sorting as arithmetic coding. J. Discrete Algorithms 16, 151–169 (2012). https://doi.org/10.1016/j.jda.2012.05.001

    Article  MathSciNet  MATH  Google Scholar 

  6. Crochemore, M., Ilie, L.: Computing longest previous factor in linear time and applications. Inf. Process. Lett. 106(2), 75–80 (2008). https://doi.org/10.1016/j.ipl.2007.10.006. http://www.sciencedirect.com/science/article/pii/S0020019007002979

    Article  MathSciNet  MATH  Google Scholar 

  7. Deguchi, S., Higashijima, F., Bannai, H., Inenaga, S., Takeda, M.: Parameterized suffix arrays for binary strings. In: Holub, J., Zdárek, J. (eds.) Proceedings of the Prague Stringology Conference 2008, Prague, Czech Republic, 1–3 September 2008. pp. 84–94. Prague Stringology Club, Department of Computer Science and Engineering, Faculty of Electrical Engineering, Czech Technical University in Prague (2008), http://www.stringology.org/event/2008/p08.html

  8. Diptarama, Katsura, T., Otomo, Y., Narisawa, K., Shinohara, A.: Position heaps for parameterized strings. In: Kärkkäinen, J., Radoszewski, J., Rytter, W. (eds.) 28th Annual Symposium on Combinatorial Pattern Matching, CPM 2017, July 4–6, 2017, Warsaw, Poland. LIPIcs, vol. 78, pp. 8:1–8:13. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik (2017). https://doi.org/10.4230/LIPIcs.CPM.2017.8, https://doi.org/10.4230/LIPIcs.CPM.2017.8

  9. Ehrenfeucht, A., McConnell, R.M., Osheim, N., Woo, S.W.: Position heaps: a simple and dynamic text indexing data structure. J. Discrete Algorithms 9(1), 100–121 (2011). https://doi.org/10.1016/j.jda.2010.12.001. http://www.sciencedirect.com/science/article/pii/S1570866710000535, 20th Anniversary Edition of the Annual Symposium on Combinatorial Pattern Matching (CPM 2009)

    Article  MathSciNet  MATH  Google Scholar 

  10. Fischer, J., Heun, V.: Theoretical and practical improvements on the RMQ-Problem, with applications to LCA and LCE. In: Lewenstein, M., Valiente, G. (eds.) CPM 2006. LNCS, vol. 4009, pp. 36–48. Springer, Heidelberg (2006). https://doi.org/10.1007/11780441_5

    Chapter  Google Scholar 

  11. Fujisato, N., Nakashima, Y., Inenaga, S., Bannai, H., Takeda, M.: Right-to-left online construction of parameterized position heaps. CoRR abs/1808.01071 (2018). http://arxiv.org/abs/1808.01071

  12. Ganguly, A., Hon, W., Huang, Y., Pissis, S.P., Shah, R., Thankachan, S.V.: Parameterized text indexing with one wildcard. In: 2019 Data Compression Conference (DCC), pp. 152–161. March 2019. https://doi.org/10.1109/DCC.2019.00023

  13. Ganguly, A., Shah, R., Thankachan, S.V.: pbwt: achieving succinct data structures for parameterized pattern matching and related problems. In: Klein, P.N. (ed.) Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2017, Barcelona, Spain, Hotel Porta Fira, January 16–19, pp. 397–407. SIAM (2017). https://doi.org/10.1137/1.9781611974782.25, https://doi.org/10.1137/1.9781611974782.25

  14. I, T., Deguchi, S., Bannai, H., Inenaga, S., Takeda, M.: Lightweight parameterized suffix array construction. In: Fiala, J., Kratochvíl, J., Miller, M. (eds.) IWOCA 2009. LNCS, vol. 5874, pp. 312–323. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-10217-2_31

    Chapter  Google Scholar 

  15. Kärkkäinen, J., Sanders, P., Burkhardt, S.: Linear work suffix array construction. J. ACM 53(6), 918–936 (2006). https://doi.org/10.1145/1217856.1217858

    Article  MathSciNet  MATH  Google Scholar 

  16. 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. (ed.) CPM 2001. LNCS, vol. 2089, pp. 181–192. Springer, Heidelberg (2001). https://doi.org/10.1007/3-540-48194-X_17

    Chapter  Google Scholar 

  17. Kim, D.K., Sim, J.S., Park, H., Park, K.: Constructing suffix arrays in linear time. J. Discrete Algorithms 3(2–4), 126–142 (2005). https://doi.org/10.1016/j.jda.2004.08.019

    Article  MathSciNet  MATH  Google Scholar 

  18. Ko, P., Aluru, S.: Space efficient linear time construction of suffix arrays. J. Discrete Algorithms 3(2–4), 143–156 (2005). https://doi.org/10.1016/j.jda.2004.08.002

    Article  MathSciNet  MATH  Google Scholar 

  19. Kosaraju, S.R.: Faster algorithms for the construction of parameterized suffix trees (preliminary version). In: 36th Annual Symposium on Foundations of Computer Science, Milwaukee, Wisconsin, USA, 23–25 October 1995, pp. 631–637. IEEE Computer Society (1995). https://doi.org/10.1109/SFCS.1995.492664

  20. Shibuya, T.: Generalization of a suffix tree for RNA structural pattern matching. Algorithmica 39(1), 1–19 (2004). https://doi.org/10.1007/s00453-003-1067-9

    Article  MathSciNet  MATH  Google Scholar 

  21. Weiner, P.: Linear pattern matching algorithms. In: 14th Annual Symposium on Switching and Automata Theory, Iowa City, Iowa, USA, October 15–17, 1973, pp. 1–11. IEEE Computer Society (1973). https://doi.org/10.1109/SWAT.1973.13

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Noriki Fujisato .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Fujisato, N., Nakashima, Y., Inenaga, S., Bannai, H., Takeda, M. (2019). Direct Linear Time Construction of Parameterized Suffix and LCP Arrays for Constant Alphabets. In: Brisaboa, N., Puglisi, S. (eds) String Processing and Information Retrieval. SPIRE 2019. Lecture Notes in Computer Science(), vol 11811. Springer, Cham. https://doi.org/10.1007/978-3-030-32686-9_27

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-32686-9_27

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-32685-2

  • Online ISBN: 978-3-030-32686-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics