Skip to main content

String Covers of a Tree Revisited

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

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 14240))

Included in the following conference series:

  • 352 Accesses

Abstract

We consider covering labeled trees with a collection of paths with the same string label, called a (string) cover of a tree. This problem was originated by Radoszewski et al. (SPIRE 2021), who show how to compute all covers of a directed rooted labeled tree in \(O(n \log n / \log \log n)\) time and all covers of an undirected labeled tree in \(O(n^2)\) time and space, or \(O(n^2 \log n)\) time and O(n)-space. (Here n denotes the number of nodes of a given tree). We improve those results by proposing a linear time algorithm for reporting all covers of a directed tree, and showing an \(O(n^2)\) time and O(n)-space algorithm for computing undirected tree covers. Both algorithms assume that labeling characters come from an integer alphabet.

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

    https://students.mimuw.edu.pl/~lk385775/string_tree_covers_ref_impl.zip.

  2. 2.

    https://students.mimuw.edu.pl/~lk385775/string_tree_covers_extended.pdf.

References

  1. Alstrup, S., Husfeldt, T., Rauhe, T.: Marked ancestor problems. In: 39th Annual Symposium on Foundations of Computer Science, FOCS 1998, 8–11 November 1998, Palo Alto, California, USA, pp. 534–544. IEEE Computer Society (1998)

    Google Scholar 

  2. Apostolico, A., Ehrenfeucht, A.: Efficient detection of quasiperiodicities in strings. Theor. Comput. Sci. 119(2), 247–265 (1993)

    Article  MathSciNet  MATH  Google Scholar 

  3. Apostolico, A., Farach, M., Iliopoulos, C.S.: Optimal superprimitivity testing for strings. Inf. Process. Lett. 39(1), 17–20 (1991)

    Article  MathSciNet  MATH  Google Scholar 

  4. Breslauer, D.: An on-line string superprimitivity test. Inf. Process. Lett. 44(6), 345–347 (1992)

    Article  MathSciNet  MATH  Google Scholar 

  5. Brlek, S., Lafrenière, N., Provençal, X.: Palindromic complexity of trees. In: Potapov, I. (ed.) DLT 2015. LNCS, vol. 9168, pp. 155–166. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-21500-6_12

    Chapter  Google Scholar 

  6. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 2nd edn. The MIT Press, Cambridge (2001)

    MATH  Google Scholar 

  7. Crochemore, M., et al.: The maximum number of squares in a tree. In: Kärkkäinen, J., Stoye, J. (eds.) CPM 2012. LNCS, vol. 7354, pp. 27–40. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-31265-6_3

    Chapter  Google Scholar 

  8. Czajka, P., Radoszewski, J.: Experimental evaluation of algorithms for computing quasiperiods. Theor. Comput. Sci. 854, 17–29 (2021)

    Article  MathSciNet  MATH  Google Scholar 

  9. Funakoshi, M., Nakashima, Y., Inenaga, S., Bannai, H., Takeda, M.: Computing maximal palindromes and distinct palindromes in a trie. In: Holub, J., Zdárek, J. (eds.) Prague Stringology Conference 2019, Prague, Czech Republic, 26–28 August 2019, pp. 3–15. Czech Technical University in Prague, Faculty of Information Technology, Department of Theoretical Computer Science (2019)

    Google Scholar 

  10. Gawrychowski, P., Kociumaka, T., Rytter, W., Waleń, T.: Tight bound for the number of distinct palindromes in a tree. In: Iliopoulos, C., Puglisi, S., Yilmaz, E. (eds.) SPIRE 2015. LNCS, vol. 9309, pp. 270–276. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-23826-5_26

    Chapter  MATH  Google Scholar 

  11. Gawrychowski, P., Kociumaka, T., Rytter, W., Waleń, T.: Tight bound for the number of distinct palindromes in a tree. Electron. J. Comb. 30, 04 (2023)

    MathSciNet  MATH  Google Scholar 

  12. Kociumaka, T., Pachocki, J., Radoszewski, J., Rytter, W., Waleń, T.: Efficient counting of square substrings in a tree. Theor. Comput. Sci. 544, 60–73 (2014)

    Article  MathSciNet  MATH  Google Scholar 

  13. Kociumaka, T., Radoszewski, J., Rytter, W., Waleń, T.: String powers in trees. Algorithmica 79(3), 814–834 (2017)

    Article  MathSciNet  MATH  Google Scholar 

  14. Mhaskar, N., Smyth, W.F.: String covering: a survey. CoRR, abs/2211.11856 (2022)

    Google Scholar 

  15. 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)

    Article  Google Scholar 

  16. Radoszewski, J., Rytter, W., Straszyński, J., Waleń, T., Zuba, W.: String covers of a tree. In: Lecroq, T., Touzet, H. (eds.) SPIRE 2021. LNCS, vol. 12944, pp. 68–82. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-86692-1_7

    Chapter  MATH  Google Scholar 

  17. Shibuya, T.: Constructing the suffix tree of a tree with a large alphabet. In: ISAAC 1999. LNCS, vol. 1741, pp. 225–236. Springer, Heidelberg (1999). https://doi.org/10.1007/3-540-46632-0_24

    Chapter  Google Scholar 

  18. Stroustrup, B.: The C++ Programming Language - Special Edition, 3rd edn. Addison-Wesley (2007)

    Google Scholar 

  19. Sugahara, R., Nakashima, Y., Inenaga, S., Bannai, H., Takeda, M.: Efficiently computing runs on a trie. Theor. Comput. Sci. 887, 143–151 (2021)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Łukasz Kondraciuk .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

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

Kondraciuk, Ł. (2023). String Covers of a Tree Revisited. In: Nardini, F.M., Pisanti, N., Venturini, R. (eds) String Processing and Information Retrieval. SPIRE 2023. Lecture Notes in Computer Science, vol 14240. Springer, Cham. https://doi.org/10.1007/978-3-031-43980-3_24

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-43980-3_24

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-43979-7

  • Online ISBN: 978-3-031-43980-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics