Skip to main content

Subsequence Covers of Words

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

Abstract

We introduce subsequence covers (s-covers, in short), a new type of covers of a word. A word C is an s-cover of a word S if the occurrences of C in S as subsequences cover all the positions in S.

The s-covers seem to be computationally much harder than standard covers of words (cf. Apostolico et al., Inf. Process. Lett. 1991), but, on the other hand, much easier than the related shuffle powers (Warmuth and Haussler, J. Comput. Syst. Sci. 1984).

We give a linear-time algorithm for testing if a candidate word C is an s-cover of a word S over a polynomially-bounded integer alphabet. We also give an algorithm for finding a shortest s-cover of a word S, which in the case of a constant-sized alphabet, also runs in linear time. Furthermore, we complement our algorithmic results with a lower and an upper bound on the length of a longest word without non-trivial s-covers, which are both exponential in the size of the alphabet.

J. Radoszewski and T. Waleń—Supported by the Polish National Science Center, grant no. 2018/31/D/ST6/03991.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /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
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    The optimized C++ code used for the experiments can be found at https://www.mimuw.edu.pl/~jrad/code.cpp. The program reads k and computes \(\gamma (k)\); it finishes within 1 min for \(k \le 4\).

References

  1. Apostolico, A., Farach, M., Iliopoulos, C.S.: Optimal superprimitivity testing for strings. Inf. Process. Lett. 39(1), 17–20 (1991). https://doi.org/10.1016/0020-0190(91)90056-N

    Article  MathSciNet  MATH  Google Scholar 

  2. Breslauer, D.: An on-line string superprimitivity test. Inf. Process. Lett. 44(6), 345–347 (1992). https://doi.org/10.1016/0020-0190(92)90111-8

    Article  MathSciNet  MATH  Google Scholar 

  3. Bulteau, L., Vialette, S.: Recognizing binary shuffle squares is NP-hard. Theor. Comput. Sci. 806, 116–132 (2020). https://doi.org/10.1016/j.tcs.2019.01.012

    Article  MathSciNet  MATH  Google Scholar 

  4. Buss, S., Soltys, M.: Unshuffling a square is NP-hard. J. Comput. Syst. Sci. 80(4), 766–776 (2014). https://doi.org/10.1016/j.jcss.2013.11.002

    Article  MathSciNet  MATH  Google Scholar 

  5. Czajka, P., Radoszewski, J.: Experimental evaluation of algorithms for computing quasiperiods. Theor. Comput. Sci. 854, 17–29 (2021). https://doi.org/10.1016/j.tcs.2020.11.033

    Article  MathSciNet  MATH  Google Scholar 

  6. Flouri, T., et al.: Enhanced string covering. Theor. Comput. Sci. 506, 102–114 (2013). https://doi.org/10.1016/j.tcs.2013.08.013

    Article  MathSciNet  MATH  Google Scholar 

  7. Kociumaka, T., Pissis, S.P., Radoszewski, J., Rytter, W., Waleń, T.: Fast algorithm for partial covers in words. Algorithmica 73(1), 217–233 (2014). https://doi.org/10.1007/s00453-014-9915-3

    Article  MathSciNet  MATH  Google Scholar 

  8. Kociumaka, T., Pissis, S.P., Radoszewski, J., Rytter, W., Walen, T.: Efficient algorithms for shortest partial seeds in words. Theor. Comput. Sci. 710, 139–147 (2018). https://doi.org/10.1016/j.tcs.2016.11.035

    Article  MathSciNet  MATH  Google Scholar 

  9. Kolpakov, R., Podolskiy, M., Posypkin, M., Khrapov, N.: Searching of gapped repeats and subrepetitions in a word. In: Kulikov, A.S., Kuznetsov, S.O., Pevzner, P. (eds.) CPM 2014. LNCS, vol. 8486, pp. 212–221. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-07566-2_22

    Chapter  Google Scholar 

  10. Lothaire, M.: Algebraic Combinatorics on Words. Encyclopedia of Mathematics and its Applications, Cambridge University Press (2002). https://doi.org/10.1017/CBO9781107326019

  11. Moore, D.W.G., Smyth, W.F.: A correction to “An optimal algorithm to compute all the covers of a string". Inf. Process. Lett. 54(2), 101–103 (1995). https://doi.org/10.1016/0020-0190(94)00235-Q

    Article  Google Scholar 

  12. Rizzi, R., Vialette, S.: On recognizing words that are squares for the shuffle product. In: Bulatov, A.A., Shur, A.M. (eds.) CSR 2013. LNCS, vol. 7913, pp. 235–245. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-38536-0_21

    Chapter  Google Scholar 

  13. Warmuth, M.K., Haussler, D.: On the complexity of iterated shuffle. J. Comput. Syst. Sci. 28(3), 345–358 (1984). https://doi.org/10.1016/0022-0000(84)90018-7

    Article  MathSciNet  MATH  Google Scholar 

Download references

Acknowledgements

We thank Juliusz Straszyński for his help in conducting computer experiments.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Panagiotis Charalampopoulos .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Charalampopoulos, P., Pissis, S.P., Radoszewski, J., Rytter, W., Waleń, T., Zuba, W. (2022). Subsequence Covers of Words. In: Arroyuelo, D., Poblete, B. (eds) String Processing and Information Retrieval. SPIRE 2022. Lecture Notes in Computer Science, vol 13617. Springer, Cham. https://doi.org/10.1007/978-3-031-20643-6_1

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-20643-6_1

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-20642-9

  • Online ISBN: 978-3-031-20643-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics