Skip to main content
Top

09-05-2020

Fast Algorithms for the Shortest Unique Palindromic Substring Problem on Run-Length Encoded Strings

Published in: Theory of Computing Systems | Issue 7/2020

Log in

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract

For a string S, a palindromic substring S[i..j] is said to be a shortest unique palindromic substring (SUPS) for an interval [s,t] in S, if S[i..j] occurs exactly once in S, the interval [i,j] contains [s,t], and every palindromic substring containing [s,t] which is shorter than S[i..j] occurs at least twice in S. In this paper, we study the problem of answering SUPS queries on run-length encoded strings. We show how to preprocess a given run-length encoded string RLES of size m in O(m) space and \(O(m \log \sigma _{\mathit {RLE}_{S}} + m \sqrt {\log m / \log \log m})\) time so that all SUPSs for any subsequent query interval can be answered in \(O(\sqrt {\log m / \log \log m} + \alpha )\) time, where α is the number of outputs, and \(\sigma _{\mathit {RLE}_{S}}\) is the number of distinct runs of RLES. Additionaly, we consider a variant of the SUPS problem where a query interval is also given in a run-length encoded form. For this variant of the problem, we present two alternative algorithms with faster queries. The first one answers queries in \(O(\sqrt {\log \log m /\log \log \log m} + \alpha )\) time and can be built in \(O(m \log \sigma _{\mathit {RLE}_{S}} + m \sqrt {\log m / \log \log m})\) time, and the second one answers queries in \(O(\log \log m + \alpha )\) time and can be built in \(O(m \log \sigma _{\mathit {RLE}_{S}})\) time. Both of these data structures require O(m) space.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Footnotes
1
Throughout this paper, we measure the space complexity of an algorithm with the number of words that the algorithm occupies in the word RAM model, unless otherwise stated.
 
2
It is possible that α = 0 for some intervals.
 
Literature
1.
go back to reference Apostolico, A., Breslauer, D., Galil, Z.: Parallel detection of all palindromes in a string. Theor Comput. Sci. 141(1&2), 163–173 (1995)MATH Apostolico, A., Breslauer, D., Galil, Z.: Parallel detection of all palindromes in a string. Theor Comput. Sci. 141(1&2), 163–173 (1995)MATH
2.
go back to reference Beame, P., Fich, F.E.: Optimal bounds for the predecessor problem and related problems. J. Comput. Syst. Sci. 65(1), 38–72 (2002)MathSciNetMATH Beame, P., Fich, F.E.: Optimal bounds for the predecessor problem and related problems. J. Comput. Syst. Sci. 65(1), 38–72 (2002)MathSciNetMATH
3.
go back to reference Bender, M.A., Farach-Colton, M.: The LCA problem revisited. In: Proceedings of the 4th Latin American Symposium on Theoretical Informatics, LATIN 2000, pp. 88–94 (2000) Bender, M.A., Farach-Colton, M.: The LCA problem revisited. In: Proceedings of the 4th Latin American Symposium on Theoretical Informatics, LATIN 2000, pp. 88–94 (2000)
4.
go back to reference Droubay, X., Justin, J., Pirillo, G.: Episturmian words and some constructions of de Luca and Rauzy. Theor. Comput. Sci. 255(1-2), 539–553 (2001)MathSciNetMATH Droubay, X., Justin, J., Pirillo, G.: Episturmian words and some constructions of de Luca and Rauzy. Theor. Comput. Sci. 255(1-2), 539–553 (2001)MathSciNetMATH
5.
go back to reference Ganguly, A., Hon, W., Shah, R., Thankachan, S.V.: Space-time trade-offs for finding shortest unique substrings and maximal unique matches. Theor. Comput. Sci. 700, 75–88 (2017)MathSciNetMATH Ganguly, A., Hon, W., Shah, R., Thankachan, S.V.: Space-time trade-offs for finding shortest unique substrings and maximal unique matches. Theor. Comput. Sci. 700, 75–88 (2017)MathSciNetMATH
6.
go back to reference Hon, W.-K., Thankachan, S.V., Xu, B.: An in-place framework for exact and approximate shortest unique substring queries. In: ISAAC 2015, pp. 755–767 (2015) Hon, W.-K., Thankachan, S.V., Xu, B.: An in-place framework for exact and approximate shortest unique substring queries. In: ISAAC 2015, pp. 755–767 (2015)
7.
go back to reference Hu, X., Pei, J., Tao, Y.: Shortest unique queries on strings. In: SPIRE 2014, pp. 161–172 (2014) Hu, X., Pei, J., Tao, Y.: Shortest unique queries on strings. In: SPIRE 2014, pp. 161–172 (2014)
8.
go back to reference Ileri, A.M., Külekci, M.O., Xu, B.: Shortest unique substring query revisited. In: CPM 2014, pp. 172–181 (2014) Ileri, A.M., Külekci, M.O., Xu, B.: Shortest unique substring query revisited. In: CPM 2014, pp. 172–181 (2014)
9.
go back to reference Inoue, H., Nakashima, Y., Mieno, T., Inenaga, S., Bannai, H., Takeda, M.: Algorithms and combinatorial properties on shortest unique palindromic substrings. Journal of Discrete Algorithms 52-53, 122–132 (2018)MathSciNetMATH Inoue, H., Nakashima, Y., Mieno, T., Inenaga, S., Bannai, H., Takeda, M.: Algorithms and combinatorial properties on shortest unique palindromic substrings. Journal of Discrete Algorithms 52-53, 122–132 (2018)MathSciNetMATH
10.
go back to reference Manacher, G.: A new linear-time “on-line” algorithm for finding the smallest initial palindrome of a string. J. ACM 22, 346–351 (1975)MATH Manacher, G.: A new linear-time “on-line” algorithm for finding the smallest initial palindrome of a string. J. ACM 22, 346–351 (1975)MATH
11.
go back to reference Matsubara, W., Inenaga, S., Ishino, A., Shinohara, A., Nakamura, T., Hashimoto, K.: Efficient algorithms to compute compressed longest common substrings and compressed palindromes. Theor. Comput. Sci. 410(8), 900–913 (2009)MathSciNetMATH Matsubara, W., Inenaga, S., Ishino, A., Shinohara, A., Nakamura, T., Hashimoto, K.: Efficient algorithms to compute compressed longest common substrings and compressed palindromes. Theor. Comput. Sci. 410(8), 900–913 (2009)MathSciNetMATH
12.
go back to reference Mieno, T., Inenaga, S., Bannai, H., Takeda, M.: Shortest unique substring queries on run-length encoded strings. In: Proc. MFCS 2016, pp. 69:1–69:11 (2016) Mieno, T., Inenaga, S., Bannai, H., Takeda, M.: Shortest unique substring queries on run-length encoded strings. In: Proc. MFCS 2016, pp. 69:1–69:11 (2016)
13.
go back to reference Pei, J., Wu, W.C.-H., Yeh, M.-Y.: On Shortest Unique Substring Queries. In: Proc. ICDE 2013, pp. 937–948 (2013) Pei, J., Wu, W.C.-H., Yeh, M.-Y.: On Shortest Unique Substring Queries. In: Proc. ICDE 2013, pp. 937–948 (2013)
14.
go back to reference Rubinchik, M., Shur, A.M.: Eertree: an efficient data structure for processing palindromes in strings. Eur. J. Comb. 68, 249–265 (2018)MathSciNetMATH Rubinchik, M., Shur, A.M.: Eertree: an efficient data structure for processing palindromes in strings. Eur. J. Comb. 68, 249–265 (2018)MathSciNetMATH
15.
go back to reference Tsuruta, K., Inenaga, S., Bannai, H., Takeda, M.: Shortest unique substrings queries in optimal time. In: Proc. SOFSEM 2014, pp. 503–513 (2014) Tsuruta, K., Inenaga, S., Bannai, H., Takeda, M.: Shortest unique substrings queries in optimal time. In: Proc. SOFSEM 2014, pp. 503–513 (2014)
16.
go back to reference Watanabe, K., Nakashima, Y., Inenaga, S., Bannai, H., Takeda, M.: Shortest unique palindromic substring queries on run-length encoded strings. In: IWOCA 2019, pp. 430–441 (2019) Watanabe, K., Nakashima, Y., Inenaga, S., Bannai, H., Takeda, M.: Shortest unique palindromic substring queries on run-length encoded strings. In: IWOCA 2019, pp. 430–441 (2019)
Metadata
Title
Fast Algorithms for the Shortest Unique Palindromic Substring Problem on Run-Length Encoded Strings
Publication date
09-05-2020
Published in
Theory of Computing Systems / Issue 7/2020
Print ISSN: 1432-4350
Electronic ISSN: 1433-0490
DOI
https://doi.org/10.1007/s00224-020-09980-x

Premium Partner