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 \( RLE _{S}\) of size m in O(m) space and \(O(m \log \sigma _{ 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 \(\alpha \) is the number of outputs, and \(\sigma _{ RLE _{S}}\) is the number of distinct runs of \( RLE _{S}\).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 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 \(\alpha = 0\) for some intervals.
References
Beame, P., Fich, F.E.: Optimal bounds for the predecessor problem and related problems. J. Comput. Syst. Sci. 65(1), 38–72 (2002)
Bender, M.A., Farach-Colton, M.: The LCA problem revisited. In: Gonnet, G.H., Viola, A. (eds.) LATIN 2000. LNCS, vol. 1776, pp. 88–94. Springer, Heidelberg (2000). https://doi.org/10.1007/10719839_9
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)
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)
Hon, W.-K., Thankachan, S.V., Xu, B.: An In-place framework for exact and approximate shortest unique substring queries. In: Elbassioni, K., Makino, K. (eds.) ISAAC 2015. LNCS, vol. 9472, pp. 755–767. Springer, Heidelberg (2015). https://doi.org/10.1007/978-3-662-48971-0_63
Hu, X., Pei, J., Tao, Y.: Shortest unique queries on strings. In: Moura, E., Crochemore, M. (eds.) SPIRE 2014. LNCS, vol. 8799, pp. 161–172. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-11918-2_16
İleri, A.M., Külekci, M.O., Xu, B.: Shortest unique substring query revisited. In: Kulikov, A.S., Kuznetsov, S.O., Pevzner, P. (eds.) CPM 2014. LNCS, vol. 8486, pp. 172–181. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-07566-2_18
Inoue, H., Nakashima, Y., Mieno, T., Inenaga, S., Bannai, H., Takeda, M.: Algorithms and combinatorial properties on shortest unique palindromic substrings. J. Discrete Algorithms 52–53, 122–132 (2018)
Manacher, G.: A new linear-time “on-line” algorithm for finding the smallest initial palindrome of a string. J. ACM 22, 346–351 (1975)
Mieno, T., Inenaga, S., Bannai, H., Takeda, M.: Shortest unique substring queries on run-length encoded strings. In: Proceedings of MFCS 2016, pp. 69:1–69:11 (2016)
Pei, J., Wu, W.C.H., Yeh, M.Y.: On shortest unique substring queries. Proc. ICDE 2013, 937–948 (2013)
Rubinchik, M., Shur, A.M.: EERTRE: an efficient data structure for processing palindromes in strings. Eur. J. Comb. 68, 249–265 (2018)
Tsuruta, K., Inenaga, S., Bannai, H., Takeda, M.: Shortest unique substrings queries in optimal time. In: Geffert, V., Preneel, B., Rovan, B., Štuller, J., Tjoa, A.M. (eds.) SOFSEM 2014. LNCS, vol. 8327, pp. 503–513. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-04298-5_44
Acknowledgments
This work was supported by JSPS KAKENHI Grant Numbers JP18K18002 (YN), JP17H01697 (SI), JP16H02783 (HB), and JP18H04098 (MT).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
Cite this paper
Watanabe, K., Nakashima, Y., Inenaga, S., Bannai, H., Takeda, M. (2019). Shortest Unique Palindromic Substring Queries on Run-Length Encoded Strings. In: Colbourn, C., Grossi, R., Pisanti, N. (eds) Combinatorial Algorithms. IWOCA 2019. Lecture Notes in Computer Science(), vol 11638. Springer, Cham. https://doi.org/10.1007/978-3-030-25005-8_35
Download citation
DOI: https://doi.org/10.1007/978-3-030-25005-8_35
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-25004-1
Online ISBN: 978-3-030-25005-8
eBook Packages: Computer ScienceComputer Science (R0)